From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- testing/web-platform/tests/html/canvas/META.yml | 6 + testing/web-platform/tests/html/canvas/README.md | 1 + .../2d.conformance.requirements.basics.html | 62 + .../2d.conformance.requirements.delete.html | 29 + .../2d.conformance.requirements.drawings.html | 28 + .../2d.conformance.requirements.missingargs.html | 141 + .../2d.text-outside-of-the-flat-tree-ref.html | 9 + .../element/2d.text-outside-of-the-flat-tree.html | 19 + .../canvas-context/2d.canvas.context.exists.html | 26 + .../2d.canvas.context.extraargs.cache.html | 31 + .../2d.canvas.context.extraargs.create.html | 31 + .../2d.canvas.context.invalid.args.html | 34 + .../2d.canvas.context.prototype.html | 28 + .../canvas-context/2d.canvas.context.shared.html | 30 + .../2d.canvas.context.type.exists.html | 26 + .../2d.canvas.context.type.extend.html | 33 + .../2d.canvas.context.type.prototype.html | 35 + .../2d.canvas.context.type.replace.html | 34 + .../canvas-context/2d.canvas.context.unique.html | 26 + .../2d.canvas.host.initial.reset.2dstate.html | 102 + .../canvas-host/2d.canvas.host.readonly.html | 30 + .../canvas-host/2d.canvas.host.reference.html | 26 + .../canvas-host/2d.canvas.host.scaled-manual.html | 29 + .../element/canvas-host/2d.canvas.host.scaled.png | Bin 0 -> 219 bytes ....canvas.host.size.attributes.parse.decimal.html | 30 + ...d.canvas.host.size.attributes.parse.decimal.png | Bin 0 -> 137 bytes .../2d.canvas.host.size.attributes.parse.em.html | 30 + .../2d.canvas.host.size.attributes.parse.em.png | Bin 0 -> 137 bytes ...2d.canvas.host.size.attributes.parse.empty.html | 29 + .../2d.canvas.host.size.attributes.parse.empty.png | Bin 0 -> 272 bytes .../2d.canvas.host.size.attributes.parse.exp.html | 30 + .../2d.canvas.host.size.attributes.parse.exp.png | Bin 0 -> 137 bytes .../2d.canvas.host.size.attributes.parse.hex.html | 30 + .../2d.canvas.host.size.attributes.parse.junk.html | 29 + .../2d.canvas.host.size.attributes.parse.junk.png | Bin 0 -> 272 bytes ...2d.canvas.host.size.attributes.parse.minus.html | 29 + .../2d.canvas.host.size.attributes.parse.minus.png | Bin 0 -> 272 bytes ...2d.canvas.host.size.attributes.parse.octal.html | 30 + .../2d.canvas.host.size.attributes.parse.octal.png | Bin 0 -> 137 bytes ...anvas.host.size.attributes.parse.onlyspace.html | 29 + ...canvas.host.size.attributes.parse.onlyspace.png | Bin 0 -> 272 bytes ....canvas.host.size.attributes.parse.percent.html | 30 + ...d.canvas.host.size.attributes.parse.percent.png | Bin 0 -> 137 bytes .../2d.canvas.host.size.attributes.parse.plus.html | 30 + .../2d.canvas.host.size.attributes.parse.plus.png | Bin 0 -> 137 bytes ...2d.canvas.host.size.attributes.parse.space.html | 30 + .../2d.canvas.host.size.attributes.parse.space.png | Bin 0 -> 137 bytes ...as.host.size.attributes.parse.trailingjunk.html | 30 + ...vas.host.size.attributes.parse.trailingjunk.png | Bin 0 -> 137 bytes ...nvas.host.size.attributes.parse.whitespace.html | 32 + ...anvas.host.size.attributes.parse.whitespace.png | Bin 0 -> 137 bytes .../2d.canvas.host.size.attributes.parse.zero.html | 30 + ....host.size.attributes.setAttribute.decimal.html | 32 + ...s.host.size.attributes.setAttribute.decimal.png | Bin 0 -> 137 bytes ...anvas.host.size.attributes.setAttribute.em.html | 32 + ...canvas.host.size.attributes.setAttribute.em.png | Bin 0 -> 137 bytes ...as.host.size.attributes.setAttribute.empty.html | 31 + ...vas.host.size.attributes.setAttribute.empty.png | Bin 0 -> 272 bytes ...nvas.host.size.attributes.setAttribute.exp.html | 32 + ...anvas.host.size.attributes.setAttribute.exp.png | Bin 0 -> 137 bytes ...nvas.host.size.attributes.setAttribute.hex.html | 32 + ...vas.host.size.attributes.setAttribute.junk.html | 31 + ...nvas.host.size.attributes.setAttribute.junk.png | Bin 0 -> 272 bytes ...as.host.size.attributes.setAttribute.minus.html | 31 + ...vas.host.size.attributes.setAttribute.minus.png | Bin 0 -> 272 bytes ...as.host.size.attributes.setAttribute.octal.html | 32 + ...vas.host.size.attributes.setAttribute.octal.png | Bin 0 -> 137 bytes ...ost.size.attributes.setAttribute.onlyspace.html | 31 + ...host.size.attributes.setAttribute.onlyspace.png | Bin 0 -> 272 bytes ....host.size.attributes.setAttribute.percent.html | 32 + ...s.host.size.attributes.setAttribute.percent.png | Bin 0 -> 137 bytes ...vas.host.size.attributes.setAttribute.plus.html | 32 + ...nvas.host.size.attributes.setAttribute.plus.png | Bin 0 -> 137 bytes ...as.host.size.attributes.setAttribute.space.html | 32 + ...vas.host.size.attributes.setAttribute.space.png | Bin 0 -> 137 bytes ....size.attributes.setAttribute.trailingjunk.html | 32 + ...t.size.attributes.setAttribute.trailingjunk.png | Bin 0 -> 137 bytes ...st.size.attributes.setAttribute.whitespace.html | 32 + ...ost.size.attributes.setAttribute.whitespace.png | Bin 0 -> 137 bytes ...vas.host.size.attributes.setAttribute.zero.html | 32 + .../compositing/2d.composite.canvas.clear.html | 36 + .../compositing/2d.composite.canvas.clear.png | Bin 0 -> 117 bytes .../compositing/2d.composite.canvas.copy.html | 36 + .../compositing/2d.composite.canvas.copy.png | Bin 0 -> 220 bytes .../2d.composite.canvas.destination-atop.html | 36 + .../2d.composite.canvas.destination-atop.png | Bin 0 -> 221 bytes .../2d.composite.canvas.destination-in.html | 36 + .../2d.composite.canvas.destination-in.png | Bin 0 -> 220 bytes .../2d.composite.canvas.destination-out.html | 36 + .../2d.composite.canvas.destination-out.png | Bin 0 -> 220 bytes .../2d.composite.canvas.destination-over.html | 36 + .../2d.composite.canvas.destination-over.png | Bin 0 -> 223 bytes .../compositing/2d.composite.canvas.lighter.html | 36 + .../compositing/2d.composite.canvas.lighter.png | Bin 0 -> 209 bytes .../2d.composite.canvas.source-atop.html | 36 + .../2d.composite.canvas.source-atop.png | Bin 0 -> 223 bytes .../compositing/2d.composite.canvas.source-in.html | 36 + .../compositing/2d.composite.canvas.source-in.png | Bin 0 -> 220 bytes .../2d.composite.canvas.source-out.html | 36 + .../compositing/2d.composite.canvas.source-out.png | Bin 0 -> 220 bytes .../2d.composite.canvas.source-over.html | 36 + .../2d.composite.canvas.source-over.png | Bin 0 -> 223 bytes .../compositing/2d.composite.canvas.xor.html | 36 + .../compositing/2d.composite.canvas.xor.png | Bin 0 -> 223 bytes .../compositing/2d.composite.clip.clear.html | 34 + .../compositing/2d.composite.clip.copy.html | 34 + .../2d.composite.clip.destination-atop.html | 34 + .../2d.composite.clip.destination-in.html | 34 + .../2d.composite.clip.destination-out.html | 34 + .../2d.composite.clip.destination-over.html | 34 + .../compositing/2d.composite.clip.lighter.html | 34 + .../compositing/2d.composite.clip.source-atop.html | 34 + .../compositing/2d.composite.clip.source-in.html | 34 + .../compositing/2d.composite.clip.source-out.html | 34 + .../compositing/2d.composite.clip.source-over.html | 34 + .../element/compositing/2d.composite.clip.xor.html | 34 + .../2d.composite.globalAlpha.canvas.html | 38 + .../2d.composite.globalAlpha.canvascopy.html | 39 + .../2d.composite.globalAlpha.canvaspattern.html | 39 + .../2d.composite.globalAlpha.default.html | 26 + .../compositing/2d.composite.globalAlpha.fill.html | 32 + .../2d.composite.globalAlpha.image.html | 37 + .../2d.composite.globalAlpha.imagepattern.html | 38 + .../2d.composite.globalAlpha.invalid.html | 35 + .../2d.composite.globalAlpha.range.html | 38 + .../compositing/2d.composite.image.clear.html | 31 + .../compositing/2d.composite.image.clear.png | Bin 0 -> 117 bytes .../compositing/2d.composite.image.copy.html | 31 + .../compositing/2d.composite.image.copy.png | Bin 0 -> 220 bytes .../2d.composite.image.destination-atop.html | 31 + .../2d.composite.image.destination-atop.png | Bin 0 -> 221 bytes .../2d.composite.image.destination-in.html | 31 + .../2d.composite.image.destination-in.png | Bin 0 -> 220 bytes .../2d.composite.image.destination-out.html | 31 + .../2d.composite.image.destination-out.png | Bin 0 -> 220 bytes .../2d.composite.image.destination-over.html | 31 + .../2d.composite.image.destination-over.png | Bin 0 -> 223 bytes .../compositing/2d.composite.image.lighter.html | 31 + .../compositing/2d.composite.image.lighter.png | Bin 0 -> 209 bytes .../2d.composite.image.source-atop.html | 31 + .../compositing/2d.composite.image.source-atop.png | Bin 0 -> 223 bytes .../compositing/2d.composite.image.source-in.html | 31 + .../compositing/2d.composite.image.source-in.png | Bin 0 -> 220 bytes .../compositing/2d.composite.image.source-out.html | 31 + .../compositing/2d.composite.image.source-out.png | Bin 0 -> 220 bytes .../2d.composite.image.source-over.html | 31 + .../compositing/2d.composite.image.source-over.png | Bin 0 -> 223 bytes .../compositing/2d.composite.image.xor.html | 31 + .../element/compositing/2d.composite.image.xor.png | Bin 0 -> 223 bytes .../2d.composite.operation.casesensitive.html | 28 + .../compositing/2d.composite.operation.clear.html | 28 + .../compositing/2d.composite.operation.darker.html | 28 + .../2d.composite.operation.default.html | 26 + .../compositing/2d.composite.operation.get.html | 33 + .../2d.composite.operation.highlight.html | 28 + .../2d.composite.operation.nullsuffix.html | 28 + .../compositing/2d.composite.operation.over.html | 28 + .../2d.composite.operation.unrecognised.html | 28 + .../compositing/2d.composite.solid.clear.html | 31 + .../compositing/2d.composite.solid.clear.png | Bin 0 -> 117 bytes .../compositing/2d.composite.solid.copy.html | 31 + .../compositing/2d.composite.solid.copy.png | Bin 0 -> 205 bytes .../2d.composite.solid.destination-atop.html | 31 + .../2d.composite.solid.destination-atop.png | Bin 0 -> 206 bytes .../2d.composite.solid.destination-in.html | 31 + .../2d.composite.solid.destination-in.png | Bin 0 -> 206 bytes .../2d.composite.solid.destination-out.html | 31 + .../2d.composite.solid.destination-out.png | Bin 0 -> 117 bytes .../2d.composite.solid.destination-over.html | 31 + .../2d.composite.solid.destination-over.png | Bin 0 -> 206 bytes .../compositing/2d.composite.solid.lighter.html | 31 + .../compositing/2d.composite.solid.lighter.png | Bin 0 -> 207 bytes .../2d.composite.solid.source-atop.html | 31 + .../compositing/2d.composite.solid.source-atop.png | Bin 0 -> 205 bytes .../compositing/2d.composite.solid.source-in.html | 31 + .../compositing/2d.composite.solid.source-in.png | Bin 0 -> 205 bytes .../compositing/2d.composite.solid.source-out.html | 31 + .../compositing/2d.composite.solid.source-out.png | Bin 0 -> 117 bytes .../2d.composite.solid.source-over.html | 31 + .../compositing/2d.composite.solid.source-over.png | Bin 0 -> 205 bytes .../compositing/2d.composite.solid.xor.html | 31 + .../element/compositing/2d.composite.solid.xor.png | Bin 0 -> 117 bytes .../2d.composite.transparent.clear.html | 31 + .../compositing/2d.composite.transparent.clear.png | Bin 0 -> 117 bytes .../compositing/2d.composite.transparent.copy.html | 31 + .../compositing/2d.composite.transparent.copy.png | Bin 0 -> 221 bytes .../2d.composite.transparent.destination-atop.html | 31 + .../2d.composite.transparent.destination-atop.png | Bin 0 -> 220 bytes .../2d.composite.transparent.destination-in.html | 31 + .../2d.composite.transparent.destination-in.png | Bin 0 -> 221 bytes .../2d.composite.transparent.destination-out.html | 31 + .../2d.composite.transparent.destination-out.png | Bin 0 -> 221 bytes .../2d.composite.transparent.destination-over.html | 31 + .../2d.composite.transparent.destination-over.png | Bin 0 -> 222 bytes .../2d.composite.transparent.lighter.html | 31 + .../2d.composite.transparent.lighter.png | Bin 0 -> 208 bytes .../2d.composite.transparent.source-atop.html | 31 + .../2d.composite.transparent.source-atop.png | Bin 0 -> 222 bytes .../2d.composite.transparent.source-in.html | 31 + .../2d.composite.transparent.source-in.png | Bin 0 -> 221 bytes .../2d.composite.transparent.source-out.html | 31 + .../2d.composite.transparent.source-out.png | Bin 0 -> 221 bytes .../2d.composite.transparent.source-over.html | 31 + .../2d.composite.transparent.source-over.png | Bin 0 -> 223 bytes .../compositing/2d.composite.transparent.xor.html | 31 + .../compositing/2d.composite.transparent.xor.png | Bin 0 -> 222 bytes .../2d.composite.uncovered.fill.copy.html | 32 + .../2d.composite.uncovered.fill.copy.png | Bin 0 -> 117 bytes ....composite.uncovered.fill.destination-atop.html | 32 + ...d.composite.uncovered.fill.destination-atop.png | Bin 0 -> 117 bytes ...2d.composite.uncovered.fill.destination-in.html | 32 + .../2d.composite.uncovered.fill.destination-in.png | Bin 0 -> 117 bytes .../2d.composite.uncovered.fill.source-in.html | 32 + .../2d.composite.uncovered.fill.source-in.png | Bin 0 -> 117 bytes .../2d.composite.uncovered.fill.source-out.html | 32 + .../2d.composite.uncovered.fill.source-out.png | Bin 0 -> 117 bytes .../2d.composite.uncovered.image.copy.html | 32 + .../2d.composite.uncovered.image.copy.png | Bin 0 -> 117 bytes ...composite.uncovered.image.destination-atop.html | 32 + ....composite.uncovered.image.destination-atop.png | Bin 0 -> 117 bytes ...d.composite.uncovered.image.destination-in.html | 32 + ...2d.composite.uncovered.image.destination-in.png | Bin 0 -> 117 bytes .../2d.composite.uncovered.image.source-in.html | 32 + .../2d.composite.uncovered.image.source-in.png | Bin 0 -> 117 bytes .../2d.composite.uncovered.image.source-out.html | 32 + .../2d.composite.uncovered.image.source-out.png | Bin 0 -> 117 bytes .../2d.composite.uncovered.nocontext.copy.html | 31 + .../2d.composite.uncovered.nocontext.copy.png | Bin 0 -> 117 bytes ...osite.uncovered.nocontext.destination-atop.html | 31 + ...posite.uncovered.nocontext.destination-atop.png | Bin 0 -> 117 bytes ...mposite.uncovered.nocontext.destination-in.html | 31 + ...omposite.uncovered.nocontext.destination-in.png | Bin 0 -> 117 bytes ...2d.composite.uncovered.nocontext.source-in.html | 31 + .../2d.composite.uncovered.nocontext.source-in.png | Bin 0 -> 117 bytes ...d.composite.uncovered.nocontext.source-out.html | 31 + ...2d.composite.uncovered.nocontext.source-out.png | Bin 0 -> 117 bytes .../2d.composite.uncovered.pattern.copy.html | 32 + .../2d.composite.uncovered.pattern.copy.png | Bin 0 -> 117 bytes ...mposite.uncovered.pattern.destination-atop.html | 32 + ...omposite.uncovered.pattern.destination-atop.png | Bin 0 -> 117 bytes ...composite.uncovered.pattern.destination-in.html | 32 + ....composite.uncovered.pattern.destination-in.png | Bin 0 -> 117 bytes .../2d.composite.uncovered.pattern.source-in.html | 32 + .../2d.composite.uncovered.pattern.source-in.png | Bin 0 -> 117 bytes .../2d.composite.uncovered.pattern.source-out.html | 32 + .../2d.composite.uncovered.pattern.source-out.png | Bin 0 -> 117 bytes .../2d.conformance.requirements.basics.html | 61 + .../2d.conformance.requirements.delete.html | 28 + .../2d.conformance.requirements.drawings.html | 27 + .../2d.conformance.requirements.missingargs.html | 140 + .../2d.drawImage.3arg.html | 44 + .../2d.drawImage.5arg.html | 45 + .../2d.drawImage.9arg.basic.html | 38 + .../2d.drawImage.9arg.destpos.html | 44 + .../2d.drawImage.9arg.destsize.html | 46 + .../2d.drawImage.9arg.sourcepos.html | 37 + .../2d.drawImage.9arg.sourcesize.html | 44 + .../2d.drawImage.alpha.html | 36 + .../2d.drawImage.animated.gif.html | 31 + .../2d.drawImage.broken.html | 31 + .../2d.drawImage.canvas.html | 46 + .../2d.drawImage.clip.html | 41 + .../2d.drawImage.composite.html | 36 + .../2d.drawImage.floatsource.html | 32 + .../2d.drawImage.incomplete.emptysrc.html | 32 + .../2d.drawImage.incomplete.immediate.html | 36 + .../2d.drawImage.incomplete.nosrc.html | 30 + .../2d.drawImage.incomplete.reload.html | 38 + .../2d.drawImage.incomplete.removedsrc.html | 32 + .../2d.drawImage.negativedest.html | 44 + .../2d.drawImage.negativedir.html | 44 + .../2d.drawImage.negativesource.html | 44 + .../2d.drawImage.nonexistent.html | 28 + .../2d.drawImage.nonfinite.html | 335 ++ .../2d.drawImage.nowrap.html | 37 + .../2d.drawImage.null.html | 26 + .../2d.drawImage.path.html | 36 + .../2d.drawImage.self.1.html | 35 + .../2d.drawImage.self.2.html | 37 + .../2d.drawImage.svg.html | 37 + .../2d.drawImage.transform.html | 36 + .../2d.drawImage.wrongtype.html | 28 + .../2d.drawImage.wrongtype.paragraph.html | 26 + .../2d.drawImage.zerocanvas.html | 37 + .../2d.drawImage.zerosource.html | 36 + .../2d.drawImage.zerosource.image.html | 46 + .../2d.clearRect.basic.html | 29 + .../2d.clearRect.clip.html | 34 + .../2d.clearRect.globalalpha.html | 30 + .../2d.clearRect.globalcomposite.html | 30 + .../2d.clearRect.negative.html | 35 + .../2d.clearRect.nonfinite.html | 51 + .../2d.clearRect.path.html | 31 + .../2d.clearRect.shadow.html | 33 + .../2d.clearRect.transform.html | 31 + .../2d.clearRect.zero.html | 31 + .../2d.fillRect.basic.html | 28 + .../2d.fillRect.clip.html | 35 + .../2d.fillRect.negative.html | 36 + .../2d.fillRect.nonfinite.html | 52 + .../2d.fillRect.path.html | 32 + .../2d.fillRect.shadow.html | 33 + .../2d.fillRect.transform.html | 30 + .../2d.fillRect.zero.html | 32 + .../2d.strokeRect.basic.html | 29 + .../2d.strokeRect.clip.html | 36 + .../2d.strokeRect.globalalpha.html | 30 + .../2d.strokeRect.globalcomposite.html | 30 + .../2d.strokeRect.negative.html | 37 + .../2d.strokeRect.nonfinite.html | 53 + .../2d.strokeRect.path.html | 33 + .../2d.strokeRect.shadow.html | 36 + .../2d.strokeRect.transform.html | 31 + .../2d.strokeRect.zero.1.html | 29 + .../2d.strokeRect.zero.2.html | 31 + .../2d.strokeRect.zero.3.html | 29 + .../2d.strokeRect.zero.4.html | 30 + .../2d.strokeRect.zero.5.html | 30 + .../2d.fillStyle.CSSHSL.html | 50 + .../2d.fillStyle.CSSRGB.html | 59 + .../2d.fillStyle.colorObject.html | 43 + .../2d.fillStyle.colorObject.transparency.html | 40 + .../2d.fillStyle.colormix.currentcolor.html | 30 + .../2d.fillStyle.colormix.html | 29 + .../2d.fillStyle.default.html | 26 + .../2d.fillStyle.get.halftransparent.html | 27 + .../2d.fillStyle.get.semitransparent.html | 27 + .../2d.fillStyle.get.solid.html | 27 + .../2d.fillStyle.get.transparent.html | 27 + .../2d.fillStyle.invalidstring.html | 31 + .../2d.fillStyle.invalidtype.html | 31 + .../2d.fillStyle.parse.css-color-4-hsl-1.html | 29 + .../2d.fillStyle.parse.css-color-4-hsl-1.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.css-color-4-hsl-2.html | 29 + .../2d.fillStyle.parse.css-color-4-hsl-2.png | Bin 0 -> 221 bytes .../2d.fillStyle.parse.css-color-4-hsl-3.html | 29 + .../2d.fillStyle.parse.css-color-4-hsl-3.png | Bin 0 -> 221 bytes .../2d.fillStyle.parse.css-color-4-hsl-4.html | 29 + .../2d.fillStyle.parse.css-color-4-hsl-4.png | Bin 0 -> 221 bytes .../2d.fillStyle.parse.css-color-4-hsl-5.html | 29 + .../2d.fillStyle.parse.css-color-4-hsl-5.png | Bin 0 -> 221 bytes .../2d.fillStyle.parse.css-color-4-hsl-6.html | 29 + .../2d.fillStyle.parse.css-color-4-hsl-6.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.css-color-4-hsl-7.html | 29 + .../2d.fillStyle.parse.css-color-4-hsl-7.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.css-color-4-hsl-8.html | 29 + .../2d.fillStyle.parse.css-color-4-hsl-8.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.css-color-4-hsl-9.html | 29 + .../2d.fillStyle.parse.css-color-4-hsl-9.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.css-color-4-hsla-1.html | 29 + .../2d.fillStyle.parse.css-color-4-hsla-1.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.css-color-4-hsla-2.html | 29 + .../2d.fillStyle.parse.css-color-4-hsla-2.png | Bin 0 -> 221 bytes .../2d.fillStyle.parse.css-color-4-hsla-3.html | 29 + .../2d.fillStyle.parse.css-color-4-hsla-3.png | Bin 0 -> 221 bytes .../2d.fillStyle.parse.css-color-4-hsla-4.html | 29 + .../2d.fillStyle.parse.css-color-4-hsla-4.png | Bin 0 -> 221 bytes .../2d.fillStyle.parse.css-color-4-hsla-5.html | 29 + .../2d.fillStyle.parse.css-color-4-hsla-5.png | Bin 0 -> 221 bytes .../2d.fillStyle.parse.css-color-4-hsla-6.html | 29 + .../2d.fillStyle.parse.css-color-4-hsla-6.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.css-color-4-hsla-7.html | 29 + .../2d.fillStyle.parse.css-color-4-hsla-7.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.css-color-4-hsla-8.html | 29 + .../2d.fillStyle.parse.css-color-4-hsla-8.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.css-color-4-hsla-9.html | 29 + .../2d.fillStyle.parse.css-color-4-hsla-9.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.css-color-4-rgb-1.html | 29 + .../2d.fillStyle.parse.css-color-4-rgb-1.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.css-color-4-rgb-2.html | 29 + .../2d.fillStyle.parse.css-color-4-rgb-2.png | Bin 0 -> 221 bytes .../2d.fillStyle.parse.css-color-4-rgb-3.html | 29 + .../2d.fillStyle.parse.css-color-4-rgb-3.png | Bin 0 -> 221 bytes .../2d.fillStyle.parse.css-color-4-rgb-4.html | 29 + .../2d.fillStyle.parse.css-color-4-rgb-4.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.css-color-4-rgb-5.html | 29 + .../2d.fillStyle.parse.css-color-4-rgb-5.png | Bin 0 -> 221 bytes .../2d.fillStyle.parse.css-color-4-rgb-6.html | 29 + .../2d.fillStyle.parse.css-color-4-rgb-6.png | Bin 0 -> 221 bytes .../2d.fillStyle.parse.css-color-4-rgba-1.html | 29 + .../2d.fillStyle.parse.css-color-4-rgba-1.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.css-color-4-rgba-2.html | 29 + .../2d.fillStyle.parse.css-color-4-rgba-2.png | Bin 0 -> 221 bytes .../2d.fillStyle.parse.css-color-4-rgba-3.html | 29 + .../2d.fillStyle.parse.css-color-4-rgba-3.png | Bin 0 -> 221 bytes .../2d.fillStyle.parse.css-color-4-rgba-4.html | 29 + .../2d.fillStyle.parse.css-color-4-rgba-4.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.css-color-4-rgba-5.html | 29 + .../2d.fillStyle.parse.css-color-4-rgba-5.png | Bin 0 -> 221 bytes .../2d.fillStyle.parse.css-color-4-rgba-6.html | 29 + .../2d.fillStyle.parse.css-color-4-rgba-6.png | Bin 0 -> 221 bytes .../2d.fillStyle.parse.current.basic.html | 30 + .../2d.fillStyle.parse.current.changed.html | 31 + .../2d.fillStyle.parse.current.removed.html | 42 + .../2d.fillStyle.parse.current.removed.png | Bin 0 -> 112 bytes .../2d.fillStyle.parse.hex3.html | 29 + .../2d.fillStyle.parse.hex3.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.hex4.html | 29 + .../2d.fillStyle.parse.hex4.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.hex6.html | 29 + .../2d.fillStyle.parse.hex6.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.hex8.html | 29 + .../2d.fillStyle.parse.hex8.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.hsl-1.html | 29 + .../2d.fillStyle.parse.hsl-1.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.hsl-2.html | 29 + .../2d.fillStyle.parse.hsl-2.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.hsl-3.html | 29 + .../2d.fillStyle.parse.hsl-3.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.hsl-4.html | 29 + .../2d.fillStyle.parse.hsl-4.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.hsl-5.html | 29 + .../2d.fillStyle.parse.hsl-5.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.hsl-6.html | 29 + .../2d.fillStyle.parse.hsl-6.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.hsl-clamp-1.html | 29 + .../2d.fillStyle.parse.hsl-clamp-1.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.hsl-clamp-2.html | 29 + .../2d.fillStyle.parse.hsl-clamp-2.png | Bin 0 -> 207 bytes .../2d.fillStyle.parse.hsl-clamp-3.html | 29 + .../2d.fillStyle.parse.hsl-clamp-3.png | Bin 0 -> 207 bytes .../2d.fillStyle.parse.hsl-clamp-4.html | 29 + .../2d.fillStyle.parse.hsl-clamp-4.png | Bin 0 -> 112 bytes .../2d.fillStyle.parse.hsla-1.html | 29 + .../2d.fillStyle.parse.hsla-1.png | Bin 0 -> 220 bytes .../2d.fillStyle.parse.hsla-2.html | 29 + .../2d.fillStyle.parse.hsla-2.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.hsla-clamp-1.html | 29 + .../2d.fillStyle.parse.hsla-clamp-1.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.hsla-clamp-2.html | 29 + .../2d.fillStyle.parse.hsla-clamp-2.png | Bin 0 -> 207 bytes .../2d.fillStyle.parse.hsla-clamp-3.html | 29 + .../2d.fillStyle.parse.hsla-clamp-3.png | Bin 0 -> 207 bytes .../2d.fillStyle.parse.hsla-clamp-4.html | 29 + .../2d.fillStyle.parse.hsla-clamp-4.png | Bin 0 -> 112 bytes .../2d.fillStyle.parse.hsla-clamp-5.html | 29 + .../2d.fillStyle.parse.hsla-clamp-5.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.hsla-clamp-6.html | 29 + .../2d.fillStyle.parse.hsla-clamp-6.png | Bin 0 -> 117 bytes .../2d.fillStyle.parse.html4.html | 29 + .../2d.fillStyle.parse.html4.png | Bin 0 -> 205 bytes ....fillStyle.parse.invalid.css-color-4-hsl-1.html | 29 + ....fillStyle.parse.invalid.css-color-4-hsl-2.html | 29 + ....fillStyle.parse.invalid.css-color-4-hsl-3.html | 29 + ....fillStyle.parse.invalid.css-color-4-hsl-4.html | 29 + ....fillStyle.parse.invalid.css-color-4-hsl-5.html | 29 + ...fillStyle.parse.invalid.css-color-4-hsla-1.html | 29 + ...fillStyle.parse.invalid.css-color-4-hsla-2.html | 29 + ...fillStyle.parse.invalid.css-color-4-hsla-3.html | 29 + ....fillStyle.parse.invalid.css-color-4-rgb-1.html | 29 + ....fillStyle.parse.invalid.css-color-4-rgb-2.html | 29 + ....fillStyle.parse.invalid.css-color-4-rgb-3.html | 29 + ....fillStyle.parse.invalid.css-color-4-rgb-4.html | 29 + ....fillStyle.parse.invalid.css-color-4-rgb-5.html | 29 + ...fillStyle.parse.invalid.css-color-4-rgba-1.html | 29 + ...fillStyle.parse.invalid.css-color-4-rgba-2.html | 29 + ...fillStyle.parse.invalid.css-color-4-rgba-3.html | 29 + .../2d.fillStyle.parse.invalid.hex1.html | 29 + .../2d.fillStyle.parse.invalid.hex2.html | 29 + .../2d.fillStyle.parse.invalid.hex3.html | 29 + .../2d.fillStyle.parse.invalid.hex4.html | 29 + .../2d.fillStyle.parse.invalid.hex5.html | 29 + .../2d.fillStyle.parse.invalid.hex6.html | 29 + .../2d.fillStyle.parse.invalid.hex7.html | 29 + .../2d.fillStyle.parse.invalid.hex8.html | 29 + .../2d.fillStyle.parse.invalid.hsl-1.html | 29 + .../2d.fillStyle.parse.invalid.hsl-2.html | 29 + .../2d.fillStyle.parse.invalid.hsl-3.html | 29 + .../2d.fillStyle.parse.invalid.hsl-4.html | 29 + .../2d.fillStyle.parse.invalid.hsl-5.html | 29 + .../2d.fillStyle.parse.invalid.hsl-6.html | 29 + .../2d.fillStyle.parse.invalid.hsla-1.html | 29 + .../2d.fillStyle.parse.invalid.hsla-2.html | 29 + .../2d.fillStyle.parse.invalid.hsla-3.html | 29 + .../2d.fillStyle.parse.invalid.name-1.html | 29 + .../2d.fillStyle.parse.invalid.name-2.html | 29 + .../2d.fillStyle.parse.invalid.name-3.html | 29 + .../2d.fillStyle.parse.invalid.name-4.html | 29 + .../2d.fillStyle.parse.invalid.name-5.html | 29 + .../2d.fillStyle.parse.invalid.rgb-1.html | 29 + .../2d.fillStyle.parse.invalid.rgb-2.html | 29 + .../2d.fillStyle.parse.invalid.rgb-3.html | 29 + .../2d.fillStyle.parse.invalid.rgba-1.html | 29 + .../2d.fillStyle.parse.invalid.rgba-2.html | 29 + .../2d.fillStyle.parse.invalid.rgba-3.html | 29 + .../2d.fillStyle.parse.invalid.rgba-4.html | 29 + .../2d.fillStyle.parse.invalid.rgba-5.html | 29 + .../2d.fillStyle.parse.rgb-clamp-1.html | 29 + .../2d.fillStyle.parse.rgb-clamp-1.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.rgb-clamp-2.html | 29 + .../2d.fillStyle.parse.rgb-clamp-2.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.rgb-clamp-3.html | 29 + .../2d.fillStyle.parse.rgb-clamp-3.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.rgb-clamp-4.html | 29 + .../2d.fillStyle.parse.rgb-clamp-4.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.rgb-clamp-5.html | 29 + .../2d.fillStyle.parse.rgb-clamp-5.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.rgb-eof.html | 29 + .../2d.fillStyle.parse.rgb-eof.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.rgb-num.html | 29 + .../2d.fillStyle.parse.rgb-num.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.rgb-percent.html | 29 + .../2d.fillStyle.parse.rgb-percent.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.rgba-clamp-1.html | 29 + .../2d.fillStyle.parse.rgba-clamp-1.png | Bin 0 -> 117 bytes .../2d.fillStyle.parse.rgba-clamp-2.html | 29 + .../2d.fillStyle.parse.rgba-clamp-2.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.rgba-eof.html | 29 + .../2d.fillStyle.parse.rgba-eof.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.rgba-num-1.html | 29 + .../2d.fillStyle.parse.rgba-num-1.png | Bin 0 -> 220 bytes .../2d.fillStyle.parse.rgba-num-2.html | 29 + .../2d.fillStyle.parse.rgba-num-2.png | Bin 0 -> 220 bytes .../2d.fillStyle.parse.rgba-percent.html | 29 + .../2d.fillStyle.parse.rgba-percent.png | Bin 0 -> 220 bytes .../2d.fillStyle.parse.rgba-solid-1.html | 29 + .../2d.fillStyle.parse.rgba-solid-1.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.rgba-solid-2.html | 29 + .../2d.fillStyle.parse.rgba-solid-2.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.rgba-solid-3.html | 29 + .../2d.fillStyle.parse.rgba-solid-3.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.rgba-solid-4.html | 29 + .../2d.fillStyle.parse.rgba-solid-4.png | Bin 0 -> 205 bytes .../2d.fillStyle.parse.svg-1.html | 29 + .../2d.fillStyle.parse.svg-1.png | Bin 0 -> 207 bytes .../2d.fillStyle.parse.svg-2.html | 29 + .../2d.fillStyle.parse.svg-2.png | Bin 0 -> 207 bytes .../2d.fillStyle.parse.system.html | 28 + .../2d.fillStyle.parse.transparent-1.html | 29 + .../2d.fillStyle.parse.transparent-1.png | Bin 0 -> 117 bytes .../2d.fillStyle.parse.transparent-2.html | 29 + .../2d.fillStyle.parse.transparent-2.png | Bin 0 -> 117 bytes .../2d.fillStyle.toStringFunctionCallback.html | 39 + .../2d.gradient.conic.invalid.inputs.html | 44 + .../2d.gradient.conic.negative.rotation.html | 35 + .../2d.gradient.conic.positive.rotation.html | 35 + .../fill-and-stroke-styles/2d.gradient.empty.html | 31 + .../2d.gradient.interpolate.alpha.html | 35 + .../2d.gradient.interpolate.alpha.png | Bin 0 -> 219 bytes .../2d.gradient.interpolate.color.html | 33 + .../2d.gradient.interpolate.color.png | Bin 0 -> 219 bytes .../2d.gradient.interpolate.coloralpha.html | 33 + .../2d.gradient.interpolate.coloralpha.png | Bin 0 -> 396 bytes .../2d.gradient.interpolate.multiple.html | 35 + .../2d.gradient.interpolate.multiple.png | Bin 0 -> 256 bytes .../2d.gradient.interpolate.outside.html | 37 + .../2d.gradient.interpolate.overlap.html | 51 + .../2d.gradient.interpolate.overlap.png | Bin 0 -> 248 bytes .../2d.gradient.interpolate.overlap2.html | 41 + .../2d.gradient.interpolate.solid.html | 31 + .../2d.gradient.interpolate.vertical.html | 33 + .../2d.gradient.interpolate.vertical.png | Bin 0 -> 229 bytes .../2d.gradient.interpolate.zerosize.fill.html | 35 + .../2d.gradient.interpolate.zerosize.fillRect.html | 34 + .../2d.gradient.interpolate.zerosize.fillText.html | 35 + .../2d.gradient.interpolate.zerosize.stroke.html | 43 + ...d.gradient.interpolate.zerosize.strokeRect.html | 42 + ...d.gradient.interpolate.zerosize.strokeText.html | 35 + .../2d.gradient.linear.nonfinite.html | 48 + .../2d.gradient.linear.transform.1.html | 36 + .../2d.gradient.linear.transform.2.html | 37 + .../2d.gradient.linear.transform.3.html | 37 + .../2d.gradient.object.compare.html | 30 + .../2d.gradient.object.crosscanvas.html | 33 + .../2d.gradient.object.current.html | 36 + .../2d.gradient.object.current.png | Bin 0 -> 112 bytes .../2d.gradient.object.invalidcolor.html | 40 + .../2d.gradient.object.invalidoffset.html | 31 + .../2d.gradient.object.return.html | 34 + .../2d.gradient.object.type.html | 27 + .../2d.gradient.object.update.html | 34 + .../2d.gradient.radial.cone.behind.html | 43 + .../2d.gradient.radial.cone.beside.html | 43 + .../2d.gradient.radial.cone.bottom.html | 43 + .../2d.gradient.radial.cone.cylinder.html | 43 + .../2d.gradient.radial.cone.front.html | 43 + .../2d.gradient.radial.cone.shape1.html | 52 + .../2d.gradient.radial.cone.shape2.html | 52 + .../2d.gradient.radial.cone.top.html | 43 + .../2d.gradient.radial.equal.html | 43 + .../2d.gradient.radial.inside1.html | 43 + .../2d.gradient.radial.inside2.html | 43 + .../2d.gradient.radial.inside3.html | 44 + .../2d.gradient.radial.negative.html | 28 + .../2d.gradient.radial.nonfinite.html | 100 + .../2d.gradient.radial.outside1.html | 43 + .../2d.gradient.radial.outside2.html | 43 + .../2d.gradient.radial.outside3.html | 44 + .../2d.gradient.radial.touch1.html | 43 + .../2d.gradient.radial.touch2.html | 45 + .../2d.gradient.radial.touch3.html | 43 + .../2d.gradient.radial.transform.1.html | 37 + .../2d.gradient.radial.transform.2.html | 38 + .../2d.gradient.radial.transform.3.html | 38 + .../2d.pattern.animated.gif.html | 37 + .../2d.pattern.basic.canvas.html | 48 + .../2d.pattern.basic.image.html | 37 + .../2d.pattern.basic.nocontext.html | 40 + .../2d.pattern.basic.type.html | 33 + .../2d.pattern.basic.zerocanvas.html | 42 + .../2d.pattern.crosscanvas.html | 35 + .../2d.pattern.image.broken.html | 28 + .../2d.pattern.image.incomplete.emptysrc.html | 29 + .../2d.pattern.image.incomplete.immediate.html | 33 + .../2d.pattern.image.incomplete.nosrc.html | 27 + .../2d.pattern.image.incomplete.reload.html | 35 + .../2d.pattern.image.incomplete.removedsrc.html | 29 + .../2d.pattern.image.nonexistent-but-loading.html | 31 + .../2d.pattern.image.nonexistent.html | 28 + .../2d.pattern.image.nosrc.html | 29 + .../2d.pattern.image.null.html | 26 + .../2d.pattern.image.string.html | 26 + .../2d.pattern.image.undefined.html | 26 + .../2d.pattern.image.zeroheight.html | 28 + .../2d.pattern.image.zerowidth.html | 28 + .../2d.pattern.modify.canvas1.html | 44 + .../2d.pattern.modify.canvas2.html | 48 + .../2d.pattern.modify.image1.html | 40 + .../2d.pattern.modify.image2.html | 44 + .../2d.pattern.paint.norepeat.basic.html | 38 + .../2d.pattern.paint.norepeat.coord1.html | 41 + .../2d.pattern.paint.norepeat.coord2.html | 42 + .../2d.pattern.paint.norepeat.coord3.html | 42 + .../2d.pattern.paint.norepeat.outside.html | 44 + .../2d.pattern.paint.orientation.canvas.html | 47 + .../2d.pattern.paint.orientation.image.html | 44 + .../2d.pattern.paint.repeat.basic.html | 38 + .../2d.pattern.paint.repeat.coord1.html | 39 + .../2d.pattern.paint.repeat.coord2.html | 35 + .../2d.pattern.paint.repeat.coord3.html | 38 + .../2d.pattern.paint.repeat.outside.html | 39 + .../2d.pattern.paint.repeatx.basic.html | 40 + .../2d.pattern.paint.repeatx.coord1.html | 44 + .../2d.pattern.paint.repeatx.outside.html | 41 + .../2d.pattern.paint.repeaty.basic.html | 40 + .../2d.pattern.paint.repeaty.coord1.html | 44 + .../2d.pattern.paint.repeaty.outside.html | 41 + .../2d.pattern.repeat.case.html | 26 + .../2d.pattern.repeat.empty.html | 37 + .../2d.pattern.repeat.null.html | 26 + .../2d.pattern.repeat.nullsuffix.html | 26 + .../2d.pattern.repeat.undefined.html | 26 + .../2d.pattern.repeat.unrecognised.html | 26 + .../2d.pattern.repeat.unrecognisednull.html | 26 + .../2d.pattern.svgimage.nonexistent.html | 28 + .../2d.pattern.svgimage.zeroheight.html | 28 + .../2d.pattern.svgimage.zerowidth.html | 28 + .../2d.pattern.transform.identity.html | 41 + .../2d.pattern.transform.infinity.html | 41 + .../2d.pattern.transform.invalid.html | 30 + .../2d.strokeStyle.colorObject.html | 44 + .../2d.strokeStyle.colorObject.transparency.html | 40 + .../2d.strokeStyle.colormix.html | 29 + .../2d.strokeStyle.default.html | 26 + ...nvasFilterObject.blur.exceptions.tentative.html | 31 + ...r.canvasFilterObject.colorMatrix.tentative.html | 68 + ...bject.componentTransfer.discrete.tentative.html | 66 + ...erObject.componentTransfer.gamma.tentative.html | 57 + ...bject.componentTransfer.identity.tentative.html | 44 + ...rObject.componentTransfer.linear.tentative.html | 56 + ...erObject.componentTransfer.table.tentative.html | 66 + ...Object.convolveMatrix.exceptions.tentative.html | 42 + ...lterObject.dropShadow.exceptions.tentative.html | 123 + ...FilterObject.dropShadow.tentative-expected.html | 57 + ...er.canvasFilterObject.dropShadow.tentative.html | 107 + ....gaussianBlur.tentative.isotropic-expected.html | 15 + ...terObject.gaussianBlur.tentative.isotropic.html | 20 + ...t.gaussianBlur.tentative.mostly-x-expected.html | 15 + ...lterObject.gaussianBlur.tentative.mostly-x.html | 20 + ...t.gaussianBlur.tentative.mostly-y-expected.html | 15 + ...lterObject.gaussianBlur.tentative.mostly-y.html | 20 + ...ect.gaussianBlur.tentative.x-only-expected.html | 15 + ...FilterObject.gaussianBlur.tentative.x-only.html | 20 + ...ect.gaussianBlur.tentative.y-only-expected.html | 15 + ...FilterObject.gaussianBlur.tentative.y-only.html | 20 + .../2d.filter.canvasFilterObject.tentative.html | 48 + ...lterObject.turbulence.inputTypes.tentative.html | 129 + .../canvas/element/filters/2d.filter.value.html | 55 + ....layer.anisotropic-blur.isotropic-expected.html | 16 + .../2d.layer.anisotropic-blur.isotropic.html | 20 + ...d.layer.anisotropic-blur.mostly-x-expected.html | 16 + .../layers/2d.layer.anisotropic-blur.mostly-x.html | 20 + ...d.layer.anisotropic-blur.mostly-y-expected.html | 16 + .../layers/2d.layer.anisotropic-blur.mostly-y.html | 20 + .../2d.layer.anisotropic-blur.x-only-expected.html | 16 + .../layers/2d.layer.anisotropic-blur.x-only.html | 20 + .../2d.layer.anisotropic-blur.y-only-expected.html | 16 + .../layers/2d.layer.anisotropic-blur.y-only.html | 20 + .../layers/2d.layer.beginLayer-options.html | 50 + ...r-from-outside-canvas.no-clipping-expected.html | 36 + ...layer.blur-from-outside-canvas.no-clipping.html | 28 + ...from-outside-canvas.with-clipping-expected.html | 38 + ...yer.blur-from-outside-canvas.with-clipping.html | 30 + .../layers/2d.layer.clearRect.full-expected.html | 15 + .../element/layers/2d.layer.clearRect.full.html | 23 + .../2d.layer.clearRect.partial-expected.html | 21 + .../element/layers/2d.layer.clearRect.partial.html | 22 + .../2d.layer.clip-inside-and-outside-expected.html | 34 + .../layers/2d.layer.clip-inside-and-outside.html | 27 + .../layers/2d.layer.clip-inside-expected.html | 26 + .../element/layers/2d.layer.clip-inside.html | 23 + .../layers/2d.layer.clip-outside-expected.html | 26 + .../element/layers/2d.layer.clip-outside.html | 22 + .../2d.layer.cross-layer-paths-expected.html | 14 + .../element/layers/2d.layer.cross-layer-paths.html | 20 + ...layer.css-filters.blur-and-shadow-expected.html | 17 + .../2d.layer.css-filters.blur-and-shadow.html | 20 + .../layers/2d.layer.css-filters.blur-expected.html | 16 + .../element/layers/2d.layer.css-filters.blur.html | 20 + .../2d.layer.css-filters.shadow-expected.html | 16 + .../layers/2d.layer.css-filters.shadow.html | 20 + .../layers/2d.layer.exceptions-are-no-op.html | 31 + ...layer.flush-on-frame-presentation-expected.html | 33 + .../2d.layer.flush-on-frame-presentation.html | 35 + .../layers/2d.layer.global-filter-expected.html | 17 + .../element/layers/2d.layer.global-filter.html | 26 + .../2d.layer.global-states.alpha-expected.html | 31 + ...ayer.global-states.alpha.blending-expected.html | 32 + .../2d.layer.global-states.alpha.blending.html | 35 + ...obal-states.alpha.blending.shadow-expected.html | 36 + ....layer.global-states.alpha.blending.shadow.html | 39 + ...yer.global-states.alpha.composite-expected.html | 32 + .../2d.layer.global-states.alpha.composite.html | 35 + ...bal-states.alpha.composite.shadow-expected.html | 36 + ...layer.global-states.alpha.composite.shadow.html | 39 + .../layers/2d.layer.global-states.alpha.html | 34 + ....layer.global-states.alpha.shadow-expected.html | 35 + .../2d.layer.global-states.alpha.shadow.html | 38 + .../2d.layer.global-states.blending-expected.html | 31 + .../layers/2d.layer.global-states.blending.html | 34 + ...yer.global-states.blending.shadow-expected.html | 35 + .../2d.layer.global-states.blending.shadow.html | 38 + .../2d.layer.global-states.composite-expected.html | 31 + .../layers/2d.layer.global-states.composite.html | 34 + ...er.global-states.composite.shadow-expected.html | 35 + .../2d.layer.global-states.composite.shadow.html | 38 + ....layer.global-states.filter.alpha-expected.html | 50 + ...obal-states.filter.alpha.blending-expected.html | 51 + ....layer.global-states.filter.alpha.blending.html | 38 + ...ates.filter.alpha.blending.shadow-expected.html | 55 + ...global-states.filter.alpha.blending.shadow.html | 42 + ...bal-states.filter.alpha.composite-expected.html | 51 + ...layer.global-states.filter.alpha.composite.html | 38 + ...tes.filter.alpha.composite.shadow-expected.html | 55 + ...lobal-states.filter.alpha.composite.shadow.html | 42 + .../2d.layer.global-states.filter.alpha.html | 37 + ...global-states.filter.alpha.shadow-expected.html | 54 + ...2d.layer.global-states.filter.alpha.shadow.html | 41 + ...yer.global-states.filter.blending-expected.html | 50 + .../2d.layer.global-states.filter.blending.html | 37 + ...bal-states.filter.blending.shadow-expected.html | 54 + ...layer.global-states.filter.blending.shadow.html | 41 + ...er.global-states.filter.composite-expected.html | 50 + .../2d.layer.global-states.filter.composite.html | 37 + ...al-states.filter.composite.shadow-expected.html | 54 + ...ayer.global-states.filter.composite.shadow.html | 41 + ...al-states.filter.no-global-states-expected.html | 50 + ...ayer.global-states.filter.no-global-states.html | 37 + ...layer.global-states.filter.shadow-expected.html | 53 + .../2d.layer.global-states.filter.shadow.html | 40 + ...er.global-states.no-global-states-expected.html | 31 + .../2d.layer.global-states.no-global-states.html | 34 + .../2d.layer.global-states.shadow-expected.html | 34 + .../layers/2d.layer.global-states.shadow.html | 37 + ...er.invalid-calls.beginLayer-reset-endLayer.html | 30 + .../2d.layer.invalid-calls.beginLayer-restore.html | 29 + ...yer.invalid-calls.beginLayer-save-endLayer.html | 30 + .../layers/2d.layer.invalid-calls.endLayer.html | 28 + ...ayer.invalid-calls.save-beginLayer-restore.html | 30 + .../2d.layer.invalid-calls.save-endLayer.html | 29 + ...layer.layer-rendering-state-reset-in-layer.html | 56 + ...operations-with-promises.createImageBitmap.html | 34 + ....malformed-operations-with-promises.toBlob.html | 34 + ...d.layer.malformed-operations.createPattern.html | 33 + .../2d.layer.malformed-operations.drawImage.html | 35 + ...2d.layer.malformed-operations.getImageData.html | 33 + ...2d.layer.malformed-operations.putImageData.html | 36 + .../2d.layer.malformed-operations.toDataURL.html | 33 + .../element/layers/2d.layer.nested-expected.html | 37 + .../layers/2d.layer.nested-filters-expected.html | 28 + .../element/layers/2d.layer.nested-filters.html | 33 + .../canvas/element/layers/2d.layer.nested.html | 36 + .../layers/2d.layer.opaque-canvas-expected.html | 34 + .../element/layers/2d.layer.opaque-canvas.html | 35 + .../element/layers/2d.layer.reset-expected.html | 14 + .../html/canvas/element/layers/2d.layer.reset.html | 35 + .../layers/2d.layer.restore-style-expected.html | 24 + .../element/layers/2d.layer.restore-style.html | 25 + .../layers/2d.layer.several-complex-expected.html | 35 + .../element/layers/2d.layer.several-complex.html | 34 + ...from-outside-canvas.long-distance-expected.html | 19 + ...anvas.long-distance-with-clipping-expected.html | 21 + ...outside-canvas.long-distance-with-clipping.html | 30 + ...r.shadow-from-outside-canvas.long-distance.html | 28 + ...rom-outside-canvas.short-distance-expected.html | 19 + ...nvas.short-distance-with-clipping-expected.html | 21 + ...utside-canvas.short-distance-with-clipping.html | 30 + ....shadow-from-outside-canvas.short-distance.html | 28 + .../2d.layer.valid-calls.beginLayer-endLayer.html | 27 + .../2d.layer.valid-calls.beginLayer-save.html | 27 + .../layers/2d.layer.valid-calls.beginLayer.html | 26 + .../layers/2d.layer.valid-calls.restore.html | 26 + .../2d.layer.valid-calls.save-beginLayer.html | 27 + .../element/layers/2d.layer.valid-calls.save.html | 26 + .../2d.layer.valid-calls.save_reset_restore.html | 28 + .../layers/2d.layer.valid-calls.save_restore.html | 27 + .../element/line-styles/2d.line.cap.butt.html | 60 + .../element/line-styles/2d.line.cap.closed.html | 45 + .../element/line-styles/2d.line.cap.invalid.html | 51 + .../element/line-styles/2d.line.cap.open.html | 45 + .../element/line-styles/2d.line.cap.round.html | 76 + .../element/line-styles/2d.line.cap.square.html | 60 + .../element/line-styles/2d.line.cap.valid.html | 33 + .../canvas/element/line-styles/2d.line.cross.html | 42 + .../element/line-styles/2d.line.defaults.html | 29 + .../element/line-styles/2d.line.fill.noop.html | 36 + .../line-styles/2d.line.invalid.strokestyle.html | 36 + .../element/line-styles/2d.line.join.bevel.html | 79 + .../element/line-styles/2d.line.join.closed.html | 44 + .../element/line-styles/2d.line.join.invalid.html | 51 + .../element/line-styles/2d.line.join.miter.html | 70 + .../element/line-styles/2d.line.join.open.html | 44 + .../element/line-styles/2d.line.join.parallel.html | 41 + .../element/line-styles/2d.line.join.round.html | 77 + .../element/line-styles/2d.line.join.valid.html | 33 + .../element/line-styles/2d.line.miter.acute.html | 51 + .../line-styles/2d.line.miter.exceeded.html | 43 + .../element/line-styles/2d.line.miter.invalid.html | 59 + .../line-styles/2d.line.miter.lineedge.html | 40 + .../element/line-styles/2d.line.miter.obtuse.html | 51 + .../line-styles/2d.line.miter.rightangle.html | 43 + .../element/line-styles/2d.line.miter.valid.html | 36 + .../element/line-styles/2d.line.miter.within.html | 43 + .../canvas/element/line-styles/2d.line.union.html | 45 + .../element/line-styles/2d.line.width.basic.html | 62 + .../element/line-styles/2d.line.width.invalid.html | 59 + .../line-styles/2d.line.width.scaledefault.html | 39 + .../line-styles/2d.line.width.transformed.html | 68 + .../element/line-styles/2d.line.width.valid.html | 36 + .../tests/html/canvas/element/manual/README.md | 1 + .../canvas_complexshapes_arcto_001-ref.htm | 22 + .../canvas_complexshapes_arcto_001.htm | 26 + .../canvas_complexshapes_beziercurveto_001-ref.htm | 32 + .../canvas_complexshapes_beziercurveto_001.htm | 35 + .../compositing/alpha_filter_shadow-ref.html | 15 + .../manual/compositing/alpha_filter_shadow.html | 16 + ...ompositing_globalcompositeoperation_001-ref.htm | 11 + ...as_compositing_globalcompositeoperation_001.htm | 32 + .../context-attributes/canvas-with-padding.html | 10 + .../clearRect_alpha_false-ref.html | 10 + .../context-attributes/clearRect_alpha_false.html | 15 + .../drawImage_alpha_false-ref.html | 10 + .../context-attributes/drawImage_alpha_false.html | 20 + .../fillRect_alpha_false-ref.html | 10 + .../context-attributes/fillRect_alpha_false.html | 14 + .../context-attributes/fill_alpha_false-ref.html | 10 + .../context-attributes/fill_alpha_false.html | 18 + .../context-attributes/getContextAttributes.html | 46 + .../initial_color_alpha_false-ref.html | 10 + .../initial_color_alpha_false.html | 13 + .../reset_color_alpha_false-ref.html | 10 + .../reset_color_alpha_false.html | 17 + .../drawimage_canvas.html | 203 ++ .../drawimage_canvas_self.html | 17 + .../drawimage_canvas_self_ref.html | 11 + .../drawimage_crossorigin.sub.html | 61 + .../drawimage_html_image.html | 268 ++ .../drawimage_svg_image_1.html | 31 + ...g_image_with_foreign_object_does_not_taint.html | 32 + ...drawImage-from-bitmap-orientation-none-ref.html | 12 + ...age-from-bitmap-orientation-none.tentative.html | 31 + .../drawImage-from-bitmap-ref.html | 12 + ...map-swap-width-height-orientation-none-ref.html | 12 + ...ap-width-height-orientation-none.tentative.html | 32 + ...rawImage-from-bitmap-swap-width-height-ref.html | 12 + ...ge-from-bitmap-swap-width-height.tentative.html | 32 + .../drawImage-from-bitmap.tentative.html | 31 + .../image-orientation/drawImage-from-blob-ref.html | 10 + .../drawImage-from-blob.tentative.html | 37 + ...rawImage-from-element-orientation-none-ref.html | 12 + ...ge-from-element-orientation-none.tentative.html | 24 + .../drawImage-from-element-ref.html | 12 + ...ent-swap-width-height-orientation-none-ref.html | 12 + ...ap-width-height-orientation-none.tentative.html | 24 + ...awImage-from-element-swap-width-height-ref.html | 12 + ...e-from-element-swap-width-height.tentative.html | 24 + .../drawImage-from-element.tentative.html | 24 + .../drawImage-with-src-rect-ref.html | 22 + .../drawImage-with-src-rect.tentative.html | 25 + .../canvas_complexshapes_ispointInpath_001.htm | 31 + ...as_focus_drawFocusIfNeeded_AAPI_001-manual.html | 50 + .../drawFocusIfNeeded_001.html | 66 + .../drawFocusIfNeeded_002.html | 68 + .../drawFocusIfNeeded_003.html | 69 + .../drawFocusIfNeeded_004.html | 88 + .../drawFocusIfNeeded_005.html | 88 + .../canvas.2d.disconnected-font-size-math-ref.html | 19 + .../canvas.2d.disconnected-font-size-math.html | 20 + .../2d.fillStyle.parse.current.notrendered.html | 31 + ...as_colorsandstyles_createlineargradient_001.htm | 59 + .../conic-gradient-expected.html | 22 + .../conic-gradient-rotation-expected.html | 22 + .../conic-gradient-rotation.html | 30 + .../fill-and-stroke-styles/conic-gradient.html | 30 + .../manual/filters/canvas-fillStyle-opacity.html | 27 + ...ilter-opacity-alpha-and-fillStyle-expected.html | 41 + .../canvas-filter-opacity-alpha-and-fillStyle.html | 35 + .../manual/filters/canvas-filter-opacity.html | 35 + ...filter-shadow-and-properties-blur-expected.html | 33 + .../canvas-filter-shadow-and-properties-blur.html | 29 + ...nvas-filter-shadow-and-properties-expected.html | 21 + .../canvas-filter-shadow-and-properties.html | 20 + .../filters/canvas-filter-shadow-expected.html | 16 + .../manual/filters/canvas-filter-shadow.html | 15 + .../element/manual/filters/canvas-globalAlpha.html | 35 + .../canvas-opacity-blend-modes-expected.html | 48 + .../manual/filters/canvas-opacity-blend-modes.html | 50 + .../manual/filters/canvas-opacity-expected.html | 66 + .../element/manual/filters/svg-filter-crash.html | 14 + .../canvas-filter-object-blur-expected.html | 19 + .../tentative/canvas-filter-object-blur.html | 24 + ...-filter-object-component-transfer-expected.html | 65 + .../canvas-filter-object-component-transfer.html | 62 + ...vas-filter-object-convolve-matrix-expected.html | 77 + .../canvas-filter-object-convolve-matrix.html | 60 + .../canvas-filter-object-turbulence-expected.html | 37 + .../tentative/canvas-filter-object-turbulence.html | 26 + .../canvas-filter-boolean-conversion-expected.html | 30 + .../canvas-filter-boolean-conversion.html | 58 + .../canvas-filter-long-conversion-expected.html | 26 + .../canvas-filter-long-conversion.html | 35 + .../canvas-filter-sequence-conversion.html | 55 + .../manual/image-smoothing/imagesmoothing.html | 119 + .../imagebitmap/canvas-ImageBitmap-close.html | 89 + .../canvas-createImageBitmap-resize.html | 170 + .../canvas-createImageBitmap-video-resize.html | 62 + .../element/manual/imagebitmap/common.sub.js | 168 + .../createImageBitmap-blob-invalidtype.html | 27 + .../imagebitmap/createImageBitmap-bounds.html | 67 + .../createImageBitmap-colorSpaceConversion.html | 50 + .../createImageBitmap-drawImage-closed.html | 27 + .../imagebitmap/createImageBitmap-drawImage.html | 87 + .../createImageBitmap-exif-orientation.html | 121 + .../createImageBitmap-exif-orientation_none.html | 61 + .../imagebitmap/createImageBitmap-flipY.html | 73 + .../createImageBitmap-in-worker-transfer.html | 20 + .../createImageBitmap-invalid-args.html | 239 ++ .../imagebitmap/createImageBitmap-origin.sub.html | 47 + .../createImageBitmap-serializable.html | 52 + .../createImageBitmap-sizeOverflow.html | 52 + .../imagebitmap/createImageBitmap-transfer.html | 53 + .../manual/imagebitmap/createImageBitmap-worker.js | 17 + ...-from-imageData-no-image-rotation-expected.html | 18 + ...ageBitmap-from-imageData-no-image-rotation.html | 26 + ...Rendering-transferFromImageBitmap-expected.html | 27 + ...g-transferFromImageBitmap-flipped-expected.html | 27 + ...pRendering-transferFromImageBitmap-flipped.html | 34 + ...ing-transferFromImageBitmap-webgl-expected.html | 35 + ...mapRendering-transferFromImageBitmap-webgl.html | 38 + ...ageBitmapRendering-transferFromImageBitmap.html | 34 + .../imagebitmap-replication-exif-orientation.html | 146 + .../manual/imagebitmap/resources/squares_1.jpg | Bin 0 -> 1227 bytes .../manual/imagebitmap/resources/squares_2.jpg | Bin 0 -> 1227 bytes .../manual/imagebitmap/resources/squares_3.jpg | Bin 0 -> 1227 bytes .../manual/imagebitmap/resources/squares_4.jpg | Bin 0 -> 1227 bytes .../manual/imagebitmap/resources/squares_5.jpg | Bin 0 -> 1227 bytes .../manual/imagebitmap/resources/squares_6.jpg | Bin 0 -> 1227 bytes .../manual/imagebitmap/resources/squares_7.jpg | Bin 0 -> 1227 bytes .../manual/imagebitmap/resources/squares_8.jpg | Bin 0 -> 1227 bytes .../element/manual/imagebitmap/serialize-worker.js | 3 + .../element/manual/imagebitmap/transfer-worker.js | 3 + .../manual/imagebitmap/worker-onmessage-noop.js | 3 + .../manual/layers/unclosed-layers-expected.html | 14 + .../element/manual/layers/unclosed-layers.html | 20 + .../layers/unclosed-nested-layers-expected.html | 14 + .../manual/layers/unclosed-nested-layers.html | 26 + .../canvas_linestyles_linecap_001-ref.htm | 11 + .../line-styles/canvas_linestyles_linecap_001.htm | 37 + .../element/manual/line-styles/lineto_a.html | 26 + .../element/manual/line-styles/lineto_ref.html | 15 + .../element/manual/line-styles/setLineDash.html | 104 + .../element/manual/shadows/canvas_shadows_001.htm | 60 + .../manual/shadows/canvas_shadows_002-ref.htm | 27 + .../element/manual/shadows/canvas_shadows_002.htm | 34 + .../canvas_shadows_system_colors-expected.html | 11 + .../shadows/canvas_shadows_system_colors.html | 19 + .../shadows/shadowBlur_gaussian_tolerance.1.html | 191 ++ .../manual/text/canvas.2d.disconnected-ref.html | 16 + .../manual/text/canvas.2d.disconnected.html | 24 + .../manual/text/canvas.2d.fontStretch-ref.html | 19 + .../text/canvas.2d.fontStretch.condensed.html | 27 + .../text/canvas.2d.fontStretch.expanded.html | 27 + .../canvas.2d.fontStretch.extra-condensed.html | 27 + .../text/canvas.2d.fontStretch.extra-expanded.html | 27 + .../manual/text/canvas.2d.fontStretch.normal.html | 30 + .../text/canvas.2d.fontStretch.semi-condensed.html | 27 + .../text/canvas.2d.fontStretch.semi-expanded.html | 27 + .../canvas.2d.fontStretch.ultra-condensed.html | 27 + .../text/canvas.2d.fontStretch.ultra-expanded.html | 27 + .../manual/text/canvas_text_font_001-ref.htm | 22 + .../element/manual/text/canvas_text_font_001.htm | 33 + ...2d.state.saverestore.imageSmoothingEnabled.html | 47 + .../the-canvas-state/2d.zero.size.canvas.html | 16 + .../canvas_state_restore_001-ref.htm | 11 + .../the-canvas-state/canvas_state_restore_001.htm | 42 + .../2d.transformation.getTransform.html | 39 + .../canvas_transformations_reset_001-ref.html | 21 + .../canvas_transformations_reset_001.html | 22 + .../canvas_transformations_scale_001-ref.htm | 11 + .../canvas_transformations_scale_001.htm | 31 + .../manual/transformations/transform_a.html | 22 + .../manual/transformations/transform_ref.html | 16 + .../element/manual/unclosed-canvas-1-expected.htm | 10 + .../canvas/element/manual/unclosed-canvas-1.htm | 14 + .../element/manual/unclosed-canvas-2-expected.htm | 14 + .../canvas/element/manual/unclosed-canvas-2.htm | 15 + .../element/manual/unclosed-canvas-3-expected.htm | 13 + .../canvas/element/manual/unclosed-canvas-3.htm | 16 + .../element/manual/unclosed-canvas-4-expected.htm | 14 + .../canvas/element/manual/unclosed-canvas-4.htm | 17 + .../wide-gamut-canvas/ImageData-fidelity.html | 126 + ...nvas-display-p3-drawImage-ImageBitmap-Blob.html | 35 + ...splay-p3-drawImage-ImageBitmap-ImageBitmap.html | 47 + ...display-p3-drawImage-ImageBitmap-ImageData.html | 46 + ...as-display-p3-drawImage-ImageBitmap-canvas.html | 53 + ...as-display-p3-drawImage-ImageBitmap-cloned.html | 70 + ...vas-display-p3-drawImage-ImageBitmap-image.html | 44 + ...vas-display-p3-drawImage-ImageBitmap-video.html | 57 + .../canvas-display-p3-drawImage-video.html | 52 + .../canvas-display-p3-drawImage.https.html | 41 + .../canvas-display-p3-pattern-canvas.html | 44 + .../canvas-display-p3-pattern-image.html | 37 + .../canvas-display-p3-settings.html | 36 + .../manual/wide-gamut-canvas/canvas-display-p3.js | 283 ++ .../imagedata-no-color-settings-crash.html | 26 + .../resources/Adobe-RGB-BB0000CC.png | Bin 0 -> 575 bytes .../resources/Adobe-RGB-BB0000FF.png | Bin 0 -> 562 bytes .../resources/Adobe-RGB-BBBC00000000CCCC.png | Bin 0 -> 560 bytes .../resources/Adobe-RGB-BBBC00000000FFFF.png | Bin 0 -> 554 bytes .../resources/Adobe-RGB-FF0000CC.png | Bin 0 -> 575 bytes .../resources/Adobe-RGB-FF0000FF.png | Bin 0 -> 562 bytes .../resources/Adobe-RGB-FFFF00000000CCCC.png | Bin 0 -> 575 bytes .../resources/Adobe-RGB-FFFF00000000FFFF.png | Bin 0 -> 562 bytes .../resources/Display-P3-0.7333-0-0.svg | 3 + .../resources/Display-P3-1-0-0.svg | 3 + .../resources/Display-P3-BB0000CC.png | Bin 0 -> 620 bytes .../resources/Display-P3-BB0000FF.png | Bin 0 -> 607 bytes .../resources/Display-P3-BBBC00000000CCCC.png | Bin 0 -> 605 bytes .../resources/Display-P3-BBBC00000000FFFF.png | Bin 0 -> 599 bytes .../resources/Display-P3-FF0000CC.png | Bin 0 -> 620 bytes .../resources/Display-P3-FF0000FF.png | Bin 0 -> 607 bytes .../resources/Display-P3-FFFF00000000CCCC.png | Bin 0 -> 620 bytes .../resources/Display-P3-FFFF00000000FFFF.png | Bin 0 -> 607 bytes .../resources/Generic-CMYK-BE000000.jpg | Bin 0 -> 55590 bytes .../resources/Generic-CMYK-FF000000.jpg | Bin 0 -> 55590 bytes .../resources/Rec2020-222000000.mp4 | Bin 0 -> 3275 bytes .../resources/Rec2020-222000000.webm | Bin 0 -> 604 bytes .../resources/Rec2020-3FF000000.mp4 | Bin 0 -> 3275 bytes .../resources/Rec2020-3FF000000.webm | Bin 0 -> 605 bytes .../resources/pattern-semitransparent-p3d65.png | Bin 0 -> 5912 bytes .../resources/pattern-semitransparent-rec2020.png | Bin 0 -> 6136 bytes .../resources/pattern-semitransparent-srgb.png | Bin 0 -> 5319 bytes .../resources/pattern-srgb-transparent.avif | Bin 0 -> 529 bytes .../resources/pattern-srgb-transparent.bmp | Bin 0 -> 1738 bytes .../resources/pattern-srgb-transparent.ico | Bin 0 -> 1742 bytes .../resources/pattern-srgb-transparent.png | Bin 0 -> 5319 bytes .../resources/pattern-srgb-transparent.webp | Bin 0 -> 252 bytes .../wide-gamut-canvas/resources/pattern-srgb.avif | Bin 0 -> 330 bytes .../wide-gamut-canvas/resources/pattern-srgb.bmp | Bin 0 -> 1738 bytes .../wide-gamut-canvas/resources/pattern-srgb.gif | Bin 0 -> 117 bytes .../wide-gamut-canvas/resources/pattern-srgb.ico | Bin 0 -> 1742 bytes .../wide-gamut-canvas/resources/pattern-srgb.jpg | Bin 0 -> 898 bytes .../wide-gamut-canvas/resources/pattern-srgb.png | Bin 0 -> 163 bytes .../wide-gamut-canvas/resources/pattern-srgb.svg | 6 + .../wide-gamut-canvas/resources/pattern-srgb.webp | Bin 0 -> 208 bytes .../png-16bit/2x2_16bit_AdobeRGB_opaque.png | Bin 0 -> 3164 bytes .../png-16bit/2x2_16bit_AdobeRGB_transparent.png | Bin 0 -> 3175 bytes .../png-16bit/2x2_16bit_DisplayP3_opaque.png | Bin 0 -> 3262 bytes .../png-16bit/2x2_16bit_DisplayP3_transparent.png | Bin 0 -> 3271 bytes .../png-16bit/2x2_16bit_ProPhoto_opaque.png | Bin 0 -> 3338 bytes .../png-16bit/2x2_16bit_ProPhoto_transparent.png | Bin 0 -> 3347 bytes .../png-16bit/2x2_16bit_Rec2020_opaque.png | Bin 0 -> 3144 bytes .../png-16bit/2x2_16bit_Rec2020_transparent.png | Bin 0 -> 3153 bytes .../2x2_16bit_interlaced_AdobeRGB_opaque.png | Bin 0 -> 3165 bytes .../2x2_16bit_interlaced_AdobeRGB_transparent.png | Bin 0 -> 3174 bytes .../2x2_16bit_interlaced_DisplayP3_opaque.png | Bin 0 -> 3265 bytes .../2x2_16bit_interlaced_DisplayP3_transparent.png | Bin 0 -> 3272 bytes .../2x2_16bit_interlaced_ProPhoto_opaque.png | Bin 0 -> 3339 bytes .../2x2_16bit_interlaced_ProPhoto_transparent.png | Bin 0 -> 3348 bytes .../2x2_16bit_interlaced_Rec2020_opaque.png | Bin 0 -> 3147 bytes .../2x2_16bit_interlaced_Rec2020_transparent.png | Bin 0 -> 3153 bytes .../png-16bit/2x2_16bit_interlaced_sRGB_opaque.png | Bin 0 -> 2868 bytes .../2x2_16bit_interlaced_sRGB_transparent.png | Bin 0 -> 2876 bytes .../resources/png-16bit/2x2_16bit_sRGB_opaque.png | Bin 0 -> 2867 bytes .../png-16bit/2x2_16bit_sRGB_transparent.png | Bin 0 -> 2672 bytes .../png-16bit/2x2_8bit_AdobeRGB_opaque.png | Bin 0 -> 3173 bytes .../png-16bit/2x2_8bit_AdobeRGB_transparent.png | Bin 0 -> 3177 bytes .../png-16bit/2x2_8bit_DisplayP3_opaque.png | Bin 0 -> 3250 bytes .../png-16bit/2x2_8bit_DisplayP3_transparent.png | Bin 0 -> 3255 bytes .../png-16bit/2x2_8bit_ProPhoto_opaque.png | Bin 0 -> 3325 bytes .../png-16bit/2x2_8bit_ProPhoto_transparent.png | Bin 0 -> 3331 bytes .../png-16bit/2x2_8bit_Rec2020_opaque.png | Bin 0 -> 3132 bytes .../png-16bit/2x2_8bit_Rec2020_transparent.png | Bin 0 -> 3136 bytes .../resources/png-16bit/2x2_8bit_sRGB_opaque.png | Bin 0 -> 2853 bytes .../png-16bit/2x2_8bit_sRGB_transparent.png | Bin 0 -> 2857 bytes .../wide-gamut-canvas/resources/sRGB-BB0000.mp4 | Bin 0 -> 1600 bytes .../wide-gamut-canvas/resources/sRGB-BB0000.svg | 3 + .../wide-gamut-canvas/resources/sRGB-BB0000.webm | Bin 0 -> 604 bytes .../wide-gamut-canvas/resources/sRGB-BB0000CC.png | Bin 0 -> 243 bytes .../wide-gamut-canvas/resources/sRGB-BB0000FF.png | Bin 0 -> 230 bytes .../resources/sRGB-BBBC00000000CCCC.png | Bin 0 -> 228 bytes .../resources/sRGB-BBBC00000000FFFF.png | Bin 0 -> 222 bytes .../wide-gamut-canvas/resources/sRGB-FF0000.svg | 3 + .../wide-gamut-canvas/resources/sRGB-FF0000CC.png | Bin 0 -> 243 bytes .../wide-gamut-canvas/resources/sRGB-FF0000FF.png | Bin 0 -> 230 bytes .../wide-gamut-canvas/resources/sRGB-FF0100.mp4 | Bin 0 -> 1600 bytes .../wide-gamut-canvas/resources/sRGB-FF0100.webm | Bin 0 -> 605 bytes .../resources/sRGB-FFFF00000000CCCC.png | Bin 0 -> 243 bytes .../resources/sRGB-FFFF00000000FFFF.png | Bin 0 -> 230 bytes .../element/path-objects/2d.path.arc.angle.1.html | 33 + .../element/path-objects/2d.path.arc.angle.2.html | 33 + .../element/path-objects/2d.path.arc.angle.3.html | 33 + .../element/path-objects/2d.path.arc.angle.4.html | 36 + .../element/path-objects/2d.path.arc.angle.5.html | 33 + .../element/path-objects/2d.path.arc.angle.6.html | 36 + .../element/path-objects/2d.path.arc.default.html | 33 + .../element/path-objects/2d.path.arc.empty.html | 33 + .../element/path-objects/2d.path.arc.end.html | 35 + .../element/path-objects/2d.path.arc.negative.html | 28 + .../element/path-objects/2d.path.arc.nonempty.html | 34 + .../path-objects/2d.path.arc.nonfinite.html | 76 + .../element/path-objects/2d.path.arc.scale.1.html | 53 + .../element/path-objects/2d.path.arc.scale.2.html | 43 + .../path-objects/2d.path.arc.selfintersect.1.html | 37 + .../path-objects/2d.path.arc.selfintersect.2.html | 41 + .../element/path-objects/2d.path.arc.shape.1.html | 38 + .../element/path-objects/2d.path.arc.shape.2.html | 38 + .../element/path-objects/2d.path.arc.shape.3.html | 37 + .../element/path-objects/2d.path.arc.shape.4.html | 37 + .../element/path-objects/2d.path.arc.shape.5.html | 37 + .../element/path-objects/2d.path.arc.twopie.1.html | 33 + .../element/path-objects/2d.path.arc.twopie.2.html | 33 + .../element/path-objects/2d.path.arc.twopie.3.html | 33 + .../element/path-objects/2d.path.arc.twopie.4.html | 33 + .../element/path-objects/2d.path.arc.twopie.5.html | 34 + .../element/path-objects/2d.path.arc.twopie.6.html | 34 + .../element/path-objects/2d.path.arc.zero.1.html | 33 + .../element/path-objects/2d.path.arc.zero.2.html | 33 + .../path-objects/2d.path.arc.zeroradius.html | 34 + .../path-objects/2d.path.arcTo.coincide.1.html | 45 + .../path-objects/2d.path.arcTo.coincide.2.html | 35 + .../path-objects/2d.path.arcTo.collinear.1.html | 42 + .../path-objects/2d.path.arcTo.collinear.2.html | 42 + .../path-objects/2d.path.arcTo.collinear.3.html | 47 + .../2d.path.arcTo.ensuresubpath.1.html | 33 + .../2d.path.arcTo.ensuresubpath.2.html | 34 + .../path-objects/2d.path.arcTo.negative.html | 28 + .../path-objects/2d.path.arcTo.nonfinite.html | 74 + .../element/path-objects/2d.path.arcTo.scale.html | 46 + .../path-objects/2d.path.arcTo.shape.curve1.html | 59 + .../path-objects/2d.path.arcTo.shape.curve2.html | 58 + .../path-objects/2d.path.arcTo.shape.end.html | 39 + .../path-objects/2d.path.arcTo.shape.start.html | 39 + .../path-objects/2d.path.arcTo.transformation.html | 45 + .../element/path-objects/2d.path.arcTo.zero.1.html | 42 + .../element/path-objects/2d.path.arcTo.zero.2.html | 42 + .../element/path-objects/2d.path.beginPath.html | 32 + .../path-objects/2d.path.bezierCurveTo.basic.html | 34 + .../2d.path.bezierCurveTo.ensuresubpath.1.html | 34 + .../2d.path.bezierCurveTo.ensuresubpath.2.html | 34 + .../2d.path.bezierCurveTo.nonfinite.html | 108 + .../path-objects/2d.path.bezierCurveTo.scaled.html | 39 + .../path-objects/2d.path.bezierCurveTo.shape.html | 38 + .../element/path-objects/2d.path.clip.basic.1.html | 36 + .../element/path-objects/2d.path.clip.basic.2.html | 36 + .../element/path-objects/2d.path.clip.empty.html | 35 + .../path-objects/2d.path.clip.intersect.html | 39 + .../path-objects/2d.path.clip.unaffected.html | 41 + .../path-objects/2d.path.clip.winding.1.html | 44 + .../path-objects/2d.path.clip.winding.2.html | 48 + .../path-objects/2d.path.closePath.empty.html | 31 + .../path-objects/2d.path.closePath.newline.html | 36 + .../path-objects/2d.path.closePath.nextpoint.html | 35 + .../path-objects/2d.path.ellipse.basics.html | 32 + .../path-objects/2d.path.fill.closed.basic.html | 36 + .../2d.path.fill.closed.unaffected.html | 39 + .../element/path-objects/2d.path.fill.overlap.html | 35 + .../element/path-objects/2d.path.fill.overlap.png | Bin 0 -> 205 bytes .../path-objects/2d.path.fill.winding.add.html | 41 + .../2d.path.fill.winding.subtract.1.html | 41 + .../2d.path.fill.winding.subtract.2.html | 40 + .../2d.path.fill.winding.subtract.3.html | 46 + .../element/path-objects/2d.path.initial.html | 31 + .../path-objects/2d.path.isPointInPath.arc.html | 34 + .../2d.path.isPointInPath.basic.1.html | 28 + .../2d.path.isPointInPath.basic.2.html | 28 + .../path-objects/2d.path.isPointInPath.basic.html | 65 + .../path-objects/2d.path.isPointInPath.bezier.html | 47 + .../path-objects/2d.path.isPointInPath.bigarc.html | 34 + .../path-objects/2d.path.isPointInPath.edge.html | 38 + .../path-objects/2d.path.isPointInPath.empty.html | 26 + .../2d.path.isPointInPath.nonfinite.html | 33 + .../2d.path.isPointInPath.outside.html | 33 + .../2d.path.isPointInPath.subpath.html | 33 + .../2d.path.isPointInPath.transform.1.html | 33 + .../2d.path.isPointInPath.transform.2.html | 33 + .../2d.path.isPointInPath.transform.3.html | 33 + .../2d.path.isPointInPath.transform.4.html | 31 + .../2d.path.isPointInPath.unclosed.html | 31 + .../2d.path.isPointInPath.winding.html | 46 + .../2d.path.isPointInStroke.scaleddashes.html | 39 + .../2d.path.isPointInpath.invalid.html | 50 + .../2d.path.isPointInpath.multi.path.html | 48 + .../element/path-objects/2d.path.lineTo.basic.html | 34 + .../2d.path.lineTo.ensuresubpath.1.html | 33 + .../2d.path.lineTo.ensuresubpath.2.html | 34 + .../path-objects/2d.path.lineTo.nextpoint.html | 35 + .../2d.path.lineTo.nonfinite.details.html | 30 + .../path-objects/2d.path.lineTo.nonfinite.html | 40 + .../element/path-objects/2d.path.moveTo.basic.html | 35 + .../path-objects/2d.path.moveTo.multiple.html | 35 + .../path-objects/2d.path.moveTo.newsubpath.html | 35 + .../path-objects/2d.path.moveTo.nonfinite.html | 39 + .../2d.path.quadraticCurveTo.basic.html | 34 + .../2d.path.quadraticCurveTo.ensuresubpath.1.html | 34 + .../2d.path.quadraticCurveTo.ensuresubpath.2.html | 34 + .../2d.path.quadraticCurveTo.nonfinite.html | 56 + .../2d.path.quadraticCurveTo.scaled.html | 39 + .../2d.path.quadraticCurveTo.shape.html | 38 + .../element/path-objects/2d.path.rect.basic.html | 31 + .../element/path-objects/2d.path.rect.closed.html | 33 + .../element/path-objects/2d.path.rect.end.1.html | 33 + .../element/path-objects/2d.path.rect.end.2.html | 38 + .../path-objects/2d.path.rect.negative.html | 38 + .../path-objects/2d.path.rect.newsubpath.html | 35 + .../path-objects/2d.path.rect.nonfinite.html | 56 + .../path-objects/2d.path.rect.selfintersect.html | 33 + .../element/path-objects/2d.path.rect.winding.html | 38 + .../element/path-objects/2d.path.rect.zero.1.html | 33 + .../element/path-objects/2d.path.rect.zero.2.html | 33 + .../element/path-objects/2d.path.rect.zero.3.html | 33 + .../element/path-objects/2d.path.rect.zero.4.html | 33 + .../element/path-objects/2d.path.rect.zero.5.html | 33 + .../element/path-objects/2d.path.rect.zero.6.html | 35 + .../2d.path.roundrect.1.radius.dompoint.html | 54 + ...oundrect.1.radius.dompoint.single argument.html | 54 + .../2d.path.roundrect.1.radius.dompointinit.html | 54 + ...rect.1.radius.dompointinit.single.argument.html | 54 + .../2d.path.roundrect.1.radius.double.html | 34 + ....roundrect.1.radius.double.single.argument.html | 34 + .../2d.path.roundrect.2.radii.1.dompoint.html | 46 + .../2d.path.roundrect.2.radii.1.dompointinit.html | 46 + .../2d.path.roundrect.2.radii.1.double.html | 34 + .../2d.path.roundrect.2.radii.2.dompoint.html | 46 + .../2d.path.roundrect.2.radii.2.dompointinit.html | 46 + .../2d.path.roundrect.2.radii.2.double.html | 34 + .../2d.path.roundrect.3.radii.1.dompoint.html | 41 + .../2d.path.roundrect.3.radii.1.dompointinit.html | 41 + .../2d.path.roundrect.3.radii.1.double.html | 34 + .../2d.path.roundrect.3.radii.2.dompoint.html | 46 + .../2d.path.roundrect.3.radii.2.dompointinit.html | 46 + .../2d.path.roundrect.3.radii.2.double.html | 34 + .../2d.path.roundrect.3.radii.3.dompoint.html | 41 + .../2d.path.roundrect.3.radii.3.dompointinit.html | 41 + .../2d.path.roundrect.3.radii.3.double.html | 34 + .../2d.path.roundrect.4.radii.1.dompoint.html | 41 + .../2d.path.roundrect.4.radii.1.dompointinit.html | 41 + .../2d.path.roundrect.4.radii.1.double.html | 34 + .../2d.path.roundrect.4.radii.2.dompoint.html | 41 + .../2d.path.roundrect.4.radii.2.dompointinit.html | 41 + .../2d.path.roundrect.4.radii.2.double.html | 34 + .../2d.path.roundrect.4.radii.3.dompoint.html | 41 + .../2d.path.roundrect.4.radii.3.dompointinit.html | 41 + .../2d.path.roundrect.4.radii.3.double.html | 34 + .../2d.path.roundrect.4.radii.4.dompoint.html | 41 + .../2d.path.roundrect.4.radii.4.dompointinit.html | 41 + .../2d.path.roundrect.4.radii.4.double.html | 34 + .../path-objects/2d.path.roundrect.badinput.html | 33 + .../path-objects/2d.path.roundrect.closed.html | 33 + .../path-objects/2d.path.roundrect.end.1.html | 33 + .../path-objects/2d.path.roundrect.end.2.html | 38 + .../path-objects/2d.path.roundrect.end.3.html | 36 + .../path-objects/2d.path.roundrect.end.4.html | 36 + .../path-objects/2d.path.roundrect.negative.html | 44 + .../path-objects/2d.path.roundrect.newsubpath.html | 35 + .../path-objects/2d.path.roundrect.nonfinite.html | 115 + .../2d.path.roundrect.radius.intersecting.1.html | 39 + .../2d.path.roundrect.radius.intersecting.2.html | 39 + .../2d.path.roundrect.radius.negative.html | 31 + .../2d.path.roundrect.radius.noargument.html | 49 + .../2d.path.roundrect.radius.noarugment.html | 49 + .../2d.path.roundrect.radius.none.html | 26 + .../2d.path.roundrect.radius.toomany.html | 26 + .../2d.path.roundrect.selfintersect.html | 33 + .../path-objects/2d.path.roundrect.winding.html | 38 + .../path-objects/2d.path.roundrect.zero.1.html | 33 + .../path-objects/2d.path.roundrect.zero.2.html | 33 + .../path-objects/2d.path.roundrect.zero.3.html | 33 + .../path-objects/2d.path.roundrect.zero.4.html | 33 + .../path-objects/2d.path.roundrect.zero.5.html | 33 + .../path-objects/2d.path.roundrect.zero.6.html | 35 + .../element/path-objects/2d.path.stroke.empty.html | 39 + .../path-objects/2d.path.stroke.overlap.html | 37 + .../path-objects/2d.path.stroke.overlap.png | Bin 0 -> 205 bytes .../path-objects/2d.path.stroke.prune.arc.html | 44 + .../path-objects/2d.path.stroke.prune.closed.html | 40 + .../path-objects/2d.path.stroke.prune.corner.html | 42 + .../path-objects/2d.path.stroke.prune.curve.html | 44 + .../path-objects/2d.path.stroke.prune.line.html | 39 + .../path-objects/2d.path.stroke.prune.rect.html | 40 + .../path-objects/2d.path.stroke.scale1.html | 53 + .../path-objects/2d.path.stroke.scale2.html | 55 + .../element/path-objects/2d.path.stroke.skew.html | 69 + .../path-objects/2d.path.stroke.unaffected.html | 41 + .../element/path-objects/2d.path.stroke.union.html | 37 + .../path-objects/2d.path.transformation.basic.html | 35 + .../2d.path.transformation.changing.html | 41 + .../2d.path.transformation.multiple.html | 46 + .../2d.imageData.create.and.resize.html | 34 + .../2d.imageData.create1.basic.html | 26 + .../2d.imageData.create1.initial.html | 37 + .../2d.imageData.create1.this.html | 29 + .../2d.imageData.create1.type.html | 32 + .../2d.imageData.create1.zero.html | 26 + .../2d.imageData.create2.basic.html | 26 + .../2d.imageData.create2.double.html | 31 + .../2d.imageData.create2.initial.html | 34 + .../2d.imageData.create2.large.html | 34 + .../2d.imageData.create2.negative.html | 32 + .../2d.imageData.create2.nonfinite.html | 42 + .../2d.imageData.create2.round.html | 29 + .../2d.imageData.create2.this.html | 28 + .../2d.imageData.create2.type.html | 32 + .../2d.imageData.create2.zero.html | 30 + .../pixel-manipulation/2d.imageData.get.basic.html | 26 + .../pixel-manipulation/2d.imageData.get.clamp.html | 37 + .../2d.imageData.get.double.html | 31 + .../2d.imageData.get.invalid.html | 44 + .../2d.imageData.get.large.crash.html | 26 + .../2d.imageData.get.length.html | 27 + .../2d.imageData.get.nonfinite.html | 74 + .../2d.imageData.get.nonpremul.html | 33 + .../2d.imageData.get.order.alpha.html | 30 + .../2d.imageData.get.order.cols.html | 33 + .../2d.imageData.get.order.rgb.html | 36 + .../2d.imageData.get.order.rows.html | 33 + .../pixel-manipulation/2d.imageData.get.range.html | 33 + .../2d.imageData.get.rounding.html | 44 + .../2d.imageData.get.source.negative.html | 45 + .../2d.imageData.get.source.outside.html | 85 + .../2d.imageData.get.source.size.html | 29 + .../pixel-manipulation/2d.imageData.get.type.html | 32 + .../2d.imageData.get.unaffected.html | 41 + .../pixel-manipulation/2d.imageData.get.zero.html | 32 + .../2d.imageData.object.clamp.html | 54 + .../2d.imageData.object.ctor.array.bounds.html | 33 + .../2d.imageData.object.ctor.array.html | 32 + .../2d.imageData.object.ctor.basics.html | 111 + .../2d.imageData.object.ctor.size.bounds.html | 30 + .../2d.imageData.object.ctor.size.html | 34 + .../2d.imageData.object.nan.html | 32 + .../2d.imageData.object.properties.html | 29 + .../2d.imageData.object.readonly.html | 39 + .../2d.imageData.object.round.html | 54 + .../2d.imageData.object.set.html | 30 + .../2d.imageData.object.string.html | 35 + .../2d.imageData.object.undefined.html | 29 + .../pixel-manipulation/2d.imageData.put.alpha.html | 32 + .../pixel-manipulation/2d.imageData.put.alpha.png | Bin 0 -> 221 bytes .../pixel-manipulation/2d.imageData.put.basic.html | 32 + .../pixel-manipulation/2d.imageData.put.clip.html | 36 + .../2d.imageData.put.created.html | 36 + .../pixel-manipulation/2d.imageData.put.cross.html | 34 + .../2d.imageData.put.dirty.negative.html | 43 + .../2d.imageData.put.dirty.outside.html | 45 + .../2d.imageData.put.dirty.rect1.html | 43 + .../2d.imageData.put.dirty.rect2.html | 43 + .../2d.imageData.put.dirty.zero.html | 32 + .../2d.imageData.put.modified.html | 37 + .../2d.imageData.put.nonfinite.html | 108 + .../pixel-manipulation/2d.imageData.put.null.html | 26 + .../pixel-manipulation/2d.imageData.put.path.html | 33 + .../2d.imageData.put.unaffected.html | 38 + .../2d.imageData.put.unchanged.html | 43 + .../2d.imageData.put.wrongtype.html | 29 + .../html/canvas/element/reset/2d.reset.basic.html | 35 + .../2d.reset.render.drop_shadow-expected.html | 14 + .../element/reset/2d.reset.render.drop_shadow.html | 22 + ...render.global_composite_operation-expected.html | 15 + ...2d.reset.render.global_composite_operation.html | 20 + .../reset/2d.reset.render.line-expected.html | 19 + .../canvas/element/reset/2d.reset.render.line.html | 28 + .../reset/2d.reset.render.misc-expected.html | 15 + .../canvas/element/reset/2d.reset.render.misc.html | 23 + .../2d.reset.render.miter_limit-expected.html | 22 + .../element/reset/2d.reset.render.miter_limit.html | 27 + .../reset/2d.reset.render.text-expected.html | 14 + .../canvas/element/reset/2d.reset.render.text.html | 28 + .../reset/2d.reset.state.clip-expected.html | 14 + .../canvas/element/reset/2d.reset.state.clip.html | 23 + .../element/reset/2d.reset.state.direction.html | 32 + .../element/reset/2d.reset.state.fill_style.html | 32 + .../element/reset/2d.reset.state.filter.html | 32 + .../canvas/element/reset/2d.reset.state.font.html | 32 + .../element/reset/2d.reset.state.font_kerning.html | 32 + .../element/reset/2d.reset.state.font_stretch.html | 32 + .../reset/2d.reset.state.font_variant_caps.html | 32 + .../element/reset/2d.reset.state.global_alpha.html | 32 + .../2d.reset.state.global_composite_operation.html | 32 + .../2d.reset.state.image_smoothing_enabled.html | 32 + .../2d.reset.state.image_smoothing_quality.html | 32 + .../reset/2d.reset.state.letter_spacing.html | 32 + .../element/reset/2d.reset.state.line_cap.html | 32 + .../element/reset/2d.reset.state.line_dash.html | 29 + .../reset/2d.reset.state.line_dash_offset.html | 32 + .../element/reset/2d.reset.state.line_join.html | 32 + .../element/reset/2d.reset.state.line_width.html | 32 + .../element/reset/2d.reset.state.miter_limit.html | 32 + .../element/reset/2d.reset.state.shadow_blur.html | 32 + .../element/reset/2d.reset.state.shadow_color.html | 32 + .../reset/2d.reset.state.shadow_offset_x.html | 32 + .../reset/2d.reset.state.shadow_offset_y.html | 32 + .../element/reset/2d.reset.state.stroke_style.html | 32 + .../element/reset/2d.reset.state.text_align.html | 32 + .../reset/2d.reset.state.text_baseline.html | 32 + .../reset/2d.reset.state.text_rendering.html | 32 + .../2d.reset.state.transformation_matrix.html | 29 + .../element/reset/2d.reset.state.word_spacing.html | 32 + .../scroll/2d.scrollPathIntoView.basic.html | 37 + .../element/scroll/2d.scrollPathIntoView.path.html | 37 + .../scroll/2d.scrollPathIntoView.verticalLR.html | 38 + .../scroll/2d.scrollPathIntoView.verticalRL.html | 40 + .../canvas/element/shadows/2d.shadow.alpha.1.html | 32 + .../canvas/element/shadows/2d.shadow.alpha.2.html | 32 + .../canvas/element/shadows/2d.shadow.alpha.2.png | Bin 0 -> 206 bytes .../canvas/element/shadows/2d.shadow.alpha.3.html | 34 + .../canvas/element/shadows/2d.shadow.alpha.3.png | Bin 0 -> 206 bytes .../canvas/element/shadows/2d.shadow.alpha.4.html | 34 + .../canvas/element/shadows/2d.shadow.alpha.4.png | Bin 0 -> 206 bytes .../canvas/element/shadows/2d.shadow.alpha.5.html | 33 + .../canvas/element/shadows/2d.shadow.alpha.5.png | Bin 0 -> 206 bytes .../2d.shadow.attributes.shadowBlur.initial.html | 26 + .../2d.shadow.attributes.shadowBlur.invalid.html | 52 + .../2d.shadow.attributes.shadowBlur.valid.html | 36 + ...hadow.attributes.shadowColor.current.basic.html | 28 + ...dow.attributes.shadowColor.current.changed.html | 29 + ...dow.attributes.shadowColor.current.removed.html | 34 + .../2d.shadow.attributes.shadowColor.initial.html | 26 + .../2d.shadow.attributes.shadowColor.invalid.html | 40 + .../2d.shadow.attributes.shadowColor.valid.html | 30 + .../2d.shadow.attributes.shadowOffset.initial.html | 27 + .../2d.shadow.attributes.shadowOffset.invalid.html | 66 + .../2d.shadow.attributes.shadowOffset.valid.html | 49 + .../shadows/2d.shadow.blur.high-manual.html | 31 + .../canvas/element/shadows/2d.shadow.blur.high.png | Bin 0 -> 246 bytes .../element/shadows/2d.shadow.blur.low-manual.html | 38 + .../canvas/element/shadows/2d.shadow.blur.low.png | Bin 0 -> 1586 bytes .../element/shadows/2d.shadow.canvas.alpha.html | 39 + .../element/shadows/2d.shadow.canvas.alpha.png | Bin 0 -> 206 bytes .../element/shadows/2d.shadow.canvas.basic.html | 39 + .../shadows/2d.shadow.canvas.transparent.1.html | 37 + .../shadows/2d.shadow.canvas.transparent.2.html | 45 + .../canvas/element/shadows/2d.shadow.clip.1.html | 41 + .../canvas/element/shadows/2d.shadow.clip.2.html | 41 + .../canvas/element/shadows/2d.shadow.clip.3.html | 42 + .../element/shadows/2d.shadow.composite.1.html | 34 + .../element/shadows/2d.shadow.composite.2.html | 34 + .../element/shadows/2d.shadow.composite.3.html | 35 + .../element/shadows/2d.shadow.enable.blur.html | 31 + .../element/shadows/2d.shadow.enable.off.1.html | 29 + .../element/shadows/2d.shadow.enable.off.2.html | 30 + .../canvas/element/shadows/2d.shadow.enable.x.html | 31 + .../canvas/element/shadows/2d.shadow.enable.y.html | 31 + .../element/shadows/2d.shadow.gradient.alpha.html | 36 + .../element/shadows/2d.shadow.gradient.alpha.png | Bin 0 -> 206 bytes .../element/shadows/2d.shadow.gradient.basic.html | 36 + .../shadows/2d.shadow.gradient.transparent.1.html | 36 + .../shadows/2d.shadow.gradient.transparent.2.html | 42 + .../element/shadows/2d.shadow.image.alpha.html | 34 + .../element/shadows/2d.shadow.image.alpha.png | Bin 0 -> 206 bytes .../element/shadows/2d.shadow.image.basic.html | 34 + .../element/shadows/2d.shadow.image.scale.html | 36 + .../element/shadows/2d.shadow.image.section.html | 36 + .../shadows/2d.shadow.image.transparent.1.html | 34 + .../shadows/2d.shadow.image.transparent.2.html | 40 + .../shadows/2d.shadow.offset.negativeX.html | 33 + .../shadows/2d.shadow.offset.negativeY.html | 33 + .../shadows/2d.shadow.offset.positiveX.html | 33 + .../shadows/2d.shadow.offset.positiveY.html | 33 + .../canvas/element/shadows/2d.shadow.outside.html | 41 + .../element/shadows/2d.shadow.pattern.alpha.html | 36 + .../element/shadows/2d.shadow.pattern.alpha.png | Bin 0 -> 206 bytes .../element/shadows/2d.shadow.pattern.basic.html | 36 + .../shadows/2d.shadow.pattern.transparent.1.html | 36 + .../shadows/2d.shadow.pattern.transparent.2.html | 40 + .../element/shadows/2d.shadow.stroke.basic.html | 39 + .../element/shadows/2d.shadow.stroke.cap.1.html | 42 + .../element/shadows/2d.shadow.stroke.cap.2.html | 40 + .../element/shadows/2d.shadow.stroke.join.1.html | 42 + .../element/shadows/2d.shadow.stroke.join.2.html | 44 + .../element/shadows/2d.shadow.stroke.join.3.html | 43 + .../element/shadows/2d.shadow.transform.1.html | 33 + .../element/shadows/2d.shadow.transform.2.html | 33 + .../canvas/element/text/2d.text.align.default.html | 26 + .../canvas/element/text/2d.text.align.invalid.html | 40 + .../canvas/element/text/2d.text.align.valid.html | 39 + .../element/text/2d.text.baseline.default.html | 26 + .../element/text/2d.text.baseline.invalid.html | 40 + .../element/text/2d.text.baseline.valid.html | 42 + .../element/text/2d.text.draw.align.center.html | 47 + .../element/text/2d.text.draw.align.end.ltr.html | 47 + .../element/text/2d.text.draw.align.end.rtl.html | 47 + .../element/text/2d.text.draw.align.left.html | 47 + .../element/text/2d.text.draw.align.right.html | 47 + .../element/text/2d.text.draw.align.start.ltr.html | 47 + .../element/text/2d.text.draw.align.start.rtl.html | 47 + .../text/2d.text.draw.baseline.alphabetic.html | 47 + .../element/text/2d.text.draw.baseline.bottom.html | 47 + .../text/2d.text.draw.baseline.hanging.html | 47 + .../text/2d.text.draw.baseline.ideographic.html | 47 + .../element/text/2d.text.draw.baseline.middle.html | 47 + .../element/text/2d.text.draw.baseline.top.html | 47 + .../text/2d.text.draw.fill.basic-manual.html | 31 + .../element/text/2d.text.draw.fill.basic.png | Bin 0 -> 1137 bytes .../text/2d.text.draw.fill.maxWidth.NaN.html | 31 + .../text/2d.text.draw.fill.maxWidth.bound.html | 44 + .../text/2d.text.draw.fill.maxWidth.fontface.html | 44 + .../2d.text.draw.fill.maxWidth.large-manual.html | 30 + .../text/2d.text.draw.fill.maxWidth.large.png | Bin 0 -> 1137 bytes .../text/2d.text.draw.fill.maxWidth.negative.html | 31 + .../text/2d.text.draw.fill.maxWidth.small.html | 31 + .../text/2d.text.draw.fill.maxWidth.zero.html | 31 + .../element/text/2d.text.draw.fill.rtl-manual.html | 31 + .../canvas/element/text/2d.text.draw.fill.rtl.png | Bin 0 -> 1137 bytes .../element/text/2d.text.draw.fill.unaffected.html | 41 + .../canvas/element/text/2d.text.draw.fontface.html | 44 + .../text/2d.text.draw.fontface.notinpage.html | 43 + .../element/text/2d.text.draw.fontface.repeat.html | 46 + .../text/2d.text.draw.kern.consistent-manual.html | 35 + .../element/text/2d.text.draw.space.basic.html | 42 + .../text/2d.text.draw.space.collapse.end.html | 43 + .../text/2d.text.draw.space.collapse.nonspace.html | 42 + .../text/2d.text.draw.space.collapse.other.html | 42 + .../text/2d.text.draw.space.collapse.space.html | 42 + .../text/2d.text.draw.space.collapse.start.html | 42 + .../text/2d.text.draw.stroke.basic-manual.html | 32 + .../element/text/2d.text.draw.stroke.basic.png | Bin 0 -> 1634 bytes .../text/2d.text.draw.stroke.unaffected.html | 42 + .../2d.text.drawing.style.absolute.spacing.html | 45 + ...d.text.drawing.style.font-relative.spacing.html | 37 + .../text/2d.text.drawing.style.fontKerning.html | 33 + ...t.drawing.style.fontKerning.with.uppercase.html | 57 + ...2d.text.drawing.style.fontStretch.settings.html | 81 + ...2d.text.drawing.style.fontVariant.settings.html | 78 + .../2d.text.drawing.style.invalid.spacing.html | 42 + ...xt.drawing.style.letterSpacing.change.font.html | 45 + ...d.text.drawing.style.letterSpacing.measure.html | 54 + .../2d.text.drawing.style.measure.direction.html | 32 + .../2d.text.drawing.style.measure.rtl.text.html | 30 + .../2d.text.drawing.style.measure.textAlign.html | 32 + .../2d.text.drawing.style.nonfinite.spacing.html | 37 + ....text.drawing.style.textRendering.settings.html | 80 + ...text.drawing.style.wordSpacing.change.font.html | 45 + .../2d.text.drawing.style.wordSpacing.measure.html | 54 + .../canvas/element/text/2d.text.font.default.html | 26 + .../element/text/2d.text.font.parse.basic.html | 30 + .../element/text/2d.text.font.parse.complex.html | 27 + .../element/text/2d.text.font.parse.complex2.html | 27 + .../element/text/2d.text.font.parse.family.html | 27 + .../element/text/2d.text.font.parse.invalid.html | 71 + ...2d.text.font.parse.size.percentage.default.html | 29 + .../text/2d.text.font.parse.size.percentage.html | 29 + .../element/text/2d.text.font.parse.system.html | 27 + .../element/text/2d.text.font.parse.tiny.html | 27 + .../element/text/2d.text.font.relative_size.html | 29 + .../canvas/element/text/2d.text.font.weight.html | 30 + .../text/2d.text.fontVariantCaps1-expected.html | 15 + .../element/text/2d.text.fontVariantCaps1.html | 18 + .../element/text/2d.text.fontVariantCaps2.html | 32 + .../text/2d.text.fontVariantCaps3-expected.html | 15 + .../element/text/2d.text.fontVariantCaps3.html | 19 + .../text/2d.text.fontVariantCaps4-expected.html | 15 + .../element/text/2d.text.fontVariantCaps4.html | 19 + .../text/2d.text.fontVariantCaps5-expected.html | 15 + .../element/text/2d.text.fontVariantCaps5.html | 19 + .../text/2d.text.fontVariantCaps6-expected.html | 15 + .../element/text/2d.text.fontVariantCaps6.html | 19 + .../text/2d.text.measure.actualBoundingBox.html | 61 + .../element/text/2d.text.measure.advances.html | 52 + .../element/text/2d.text.measure.baselines.html | 45 + .../text/2d.text.measure.emHeights-low-ascent.html | 45 + .../2d.text.measure.emHeights-zero-descent.html | 45 + .../element/text/2d.text.measure.emHeights.html | 45 + ...ext.measure.fontBoundingBox-reduced-ascent.html | 43 + ....text.measure.fontBoundingBox-zero-descent.html | 43 + .../text/2d.text.measure.fontBoundingBox.ahem.html | 42 + .../text/2d.text.measure.fontBoundingBox.html | 43 + .../element/text/2d.text.measure.width.basic.html | 42 + .../element/text/2d.text.measure.width.empty.html | 37 + .../element/text/2d.text.measure.width.space.html | 43 + .../element/text/2d.text.setFont.mathFont.html | 26 + .../canvas/element/text/direction-inherit-rtl.html | 31 + .../html/canvas/element/text/direction-ltr.html | 31 + .../html/canvas/element/text/direction-rtl.html | 31 + .../element/text/parent-style-relative-units.html | 23 + .../text/reference/direction-default-ref.html | 27 + .../element/text/reference/direction-rtl-ref.html | 27 + .../2d.state.saverestore.bitmap.html | 32 + .../2d.state.saverestore.clip.html | 34 + .../2d.state.saverestore.fillStyle.html | 40 + .../2d.state.saverestore.font.html | 40 + .../2d.state.saverestore.globalAlpha.html | 40 + ...state.saverestore.globalCompositeOperation.html | 40 + .../2d.state.saverestore.lineCap.html | 40 + .../2d.state.saverestore.lineJoin.html | 40 + .../2d.state.saverestore.lineWidth.html | 40 + .../2d.state.saverestore.miterLimit.html | 40 + .../2d.state.saverestore.path.html | 33 + .../2d.state.saverestore.shadowBlur.html | 40 + .../2d.state.saverestore.shadowColor.html | 40 + .../2d.state.saverestore.shadowOffsetX.html | 40 + .../2d.state.saverestore.shadowOffsetY.html | 40 + .../2d.state.saverestore.stack.html | 35 + .../2d.state.saverestore.stackdepth.html | 36 + .../2d.state.saverestore.strokeStyle.html | 40 + .../2d.state.saverestore.textAlign.html | 40 + .../2d.state.saverestore.textBaseline.html | 40 + .../2d.state.saverestore.transformation.html | 33 + .../2d.state.saverestore.underflow.html | 30 + .../transformations/2d.transformation.order.html | 33 + .../2d.transformation.rotate.direction.html | 32 + .../2d.transformation.rotate.nonfinite.html | 37 + .../2d.transformation.rotate.radians.html | 32 + .../2d.transformation.rotate.wrap.html | 37 + .../2d.transformation.rotate.wrapnegative.html | 34 + .../2d.transformation.rotate.zero.html | 32 + .../2d.transformation.scale.basic.html | 32 + .../2d.transformation.scale.large.html | 32 + .../2d.transformation.scale.multiple.html | 33 + .../2d.transformation.scale.negative.html | 41 + .../2d.transformation.scale.nonfinite.html | 41 + .../2d.transformation.scale.zero.html | 43 + .../2d.transformation.setTransform.multiple.html | 34 + .../2d.transformation.setTransform.nonfinite.html | 109 + .../2d.transformation.setTransform.skewed.html | 54 + .../2d.transformation.transform.identity.html | 32 + .../2d.transformation.transform.multiply.html | 33 + .../2d.transformation.transform.nonfinite.html | 109 + .../2d.transformation.transform.skewed.html | 54 + .../2d.transformation.translate.basic.html | 32 + .../2d.transformation.translate.nonfinite.html | 41 + .../canvas/element/video/2d.video.invalid.html | 30 + .../2d.color.space.p3.fillText.html | 58 + .../2d.color.space.p3.fillText.shadow.html | 62 + .../2d.color.space.p3.strokeText.html | 59 + .../wide-gamut-canvas/2d.color.space.p3.to.p3.html | 38 + .../2d.color.space.p3.to.srgb.html | 37 + .../2d.color.space.p3.toBlob.p3.canvas.html | 50 + ...2d.color.space.p3.toBlob.with.putImageData.html | 56 + ...2d.color.space.p3.toDataURL.jpeg.p3.canvas.html | 46 + .../2d.color.space.p3.toDataURL.p3.canvas.html | 46 + ...color.space.p3.toDataURL.with.putImageData.html | 53 + .../2d.conformance.requirements.basics.html | 62 + .../2d.conformance.requirements.basics.worker.js | 58 + .../2d.conformance.requirements.missingargs.html | 141 + ....conformance.requirements.missingargs.worker.js | 137 + .../tests/html/canvas/offscreen/META.yml | 7 + .../tests/html/canvas/offscreen/WEB_FEATURES.yml | 3 + .../2d.canvas.context.arguments.missing.html | 28 + .../2d.canvas.context.arguments.missing.worker.js | 23 + .../2d.canvas.context.casesensitive.html | 28 + .../2d.canvas.context.casesensitive.worker.js | 23 + .../2d.canvas.context.emptystring.html | 28 + .../2d.canvas.context.emptystring.worker.js | 23 + .../canvas-context/2d.canvas.context.exists.html | 28 + .../2d.canvas.context.exists.worker.js | 23 + .../2d.canvas.context.extraargs.cache.html | 32 + .../2d.canvas.context.extraargs.cache.worker.js | 27 + .../2d.canvas.context.extraargs.create.html | 32 + .../2d.canvas.context.extraargs.create.worker.js | 27 + .../canvas-context/2d.canvas.context.shared.html | 31 + .../2d.canvas.context.shared.worker.js | 26 + .../canvas-context/2d.canvas.context.unique.html | 28 + .../2d.canvas.context.unique.worker.js | 23 + .../2d.canvas.context.unrecognised.badname.html | 28 + ...d.canvas.context.unrecognised.badname.worker.js | 23 + .../2d.canvas.context.unrecognised.badsuffix.html | 28 + ...canvas.context.unrecognised.badsuffix.worker.js | 23 + .../2d.canvas.context.unrecognised.nullsuffix.html | 28 + ...anvas.context.unrecognised.nullsuffix.worker.js | 23 + .../2d.canvas.context.unrecognised.unicode.html | 28 + ...d.canvas.context.unrecognised.unicode.worker.js | 23 + .../canvas-context/2d.getContext.options.any.js | 46 + .../canvas-host/2d.canvas.host.initial.color.html | 27 + .../2d.canvas.host.initial.color.worker.js | 22 + .../2d.canvas.host.initial.reset.2dstate.html | 89 + .../2d.canvas.host.initial.reset.2dstate.worker.js | 84 + .../2d.canvas.host.initial.reset.clip.html | 33 + .../2d.canvas.host.initial.reset.clip.worker.js | 28 + .../2d.canvas.host.initial.reset.different.html | 31 + ...d.canvas.host.initial.reset.different.worker.js | 26 + .../2d.canvas.host.initial.reset.gradient.html | 36 + ...2d.canvas.host.initial.reset.gradient.worker.js | 31 + .../2d.canvas.host.initial.reset.path.html | 32 + .../2d.canvas.host.initial.reset.path.worker.js | 27 + .../2d.canvas.host.initial.reset.pattern.html | 36 + .../2d.canvas.host.initial.reset.pattern.worker.js | 31 + .../2d.canvas.host.initial.reset.same.html | 32 + .../2d.canvas.host.initial.reset.same.worker.js | 27 + .../2d.canvas.host.initial.reset.transform.html | 32 + ...d.canvas.host.initial.reset.transform.worker.js | 27 + .../canvas-host/2d.canvas.host.readonly.html | 31 + .../canvas-host/2d.canvas.host.readonly.worker.js | 26 + .../canvas-host/2d.canvas.host.reference.html | 27 + .../canvas-host/2d.canvas.host.reference.worker.js | 22 + .../2d.canvas.host.size.attributes.default.html | 28 + ...d.canvas.host.size.attributes.default.worker.js | 23 + .../2d.canvas.host.size.attributes.idl.html | 42 + ...d.canvas.host.size.attributes.idl.set.zero.html | 30 + ...vas.host.size.attributes.idl.set.zero.worker.js | 25 + .../2d.canvas.host.size.attributes.idl.worker.js | 37 + ....canvas.host.size.attributes.parse.decimal.html | 30 + ...as.host.size.attributes.parse.decimal.worker.js | 25 + .../2d.canvas.host.size.attributes.parse.em.html | 27 + ....canvas.host.size.attributes.parse.em.worker.js | 22 + ...2d.canvas.host.size.attributes.parse.empty.html | 30 + ...nvas.host.size.attributes.parse.empty.worker.js | 25 + .../2d.canvas.host.size.attributes.parse.exp.html | 30 + ...canvas.host.size.attributes.parse.exp.worker.js | 25 + .../2d.canvas.host.size.attributes.parse.hex.html | 30 + ...canvas.host.size.attributes.parse.hex.worker.js | 25 + .../2d.canvas.host.size.attributes.parse.junk.html | 27 + ...anvas.host.size.attributes.parse.junk.worker.js | 22 + ...2d.canvas.host.size.attributes.parse.minus.html | 27 + ...nvas.host.size.attributes.parse.minus.worker.js | 22 + ...2d.canvas.host.size.attributes.parse.octal.html | 30 + ...nvas.host.size.attributes.parse.octal.worker.js | 25 + ...anvas.host.size.attributes.parse.onlyspace.html | 30 + ....host.size.attributes.parse.onlyspace.worker.js | 25 + ....canvas.host.size.attributes.parse.percent.html | 27 + ...as.host.size.attributes.parse.percent.worker.js | 22 + .../2d.canvas.host.size.attributes.parse.plus.html | 30 + ...anvas.host.size.attributes.parse.plus.worker.js | 25 + ...2d.canvas.host.size.attributes.parse.space.html | 30 + ...nvas.host.size.attributes.parse.space.worker.js | 25 + ...as.host.size.attributes.parse.trailingjunk.html | 27 + ...st.size.attributes.parse.trailingjunk.worker.js | 22 + ...nvas.host.size.attributes.parse.whitespace.html | 30 + ...host.size.attributes.parse.whitespace.worker.js | 25 + .../2d.canvas.host.size.attributes.parse.zero.html | 30 + ...anvas.host.size.attributes.parse.zero.worker.js | 25 + ...canvas.host.size.attributes.reflect.setidl.html | 30 + ...s.host.size.attributes.reflect.setidl.worker.js | 25 + ...as.host.size.attributes.reflect.setidlzero.html | 30 + ...st.size.attributes.reflect.setidlzero.worker.js | 25 + .../canvas-host/2d.canvas.host.size.large.html | 31 + .../2d.canvas.host.size.large.worker.js | 26 + .../compositing/2d.composite.canvas.clear.html | 46 + .../2d.composite.canvas.clear.worker.js | 41 + .../compositing/2d.composite.canvas.copy.html | 46 + .../compositing/2d.composite.canvas.copy.worker.js | 41 + .../2d.composite.canvas.destination-atop.html | 46 + .../2d.composite.canvas.destination-atop.worker.js | 41 + .../2d.composite.canvas.destination-in.html | 46 + .../2d.composite.canvas.destination-in.worker.js | 41 + .../2d.composite.canvas.destination-out.html | 46 + .../2d.composite.canvas.destination-out.worker.js | 41 + .../2d.composite.canvas.destination-over.html | 46 + .../2d.composite.canvas.destination-over.worker.js | 41 + .../compositing/2d.composite.canvas.lighter.html | 46 + .../2d.composite.canvas.lighter.worker.js | 41 + .../2d.composite.canvas.source-atop.html | 46 + .../2d.composite.canvas.source-atop.worker.js | 41 + .../compositing/2d.composite.canvas.source-in.html | 46 + .../2d.composite.canvas.source-in.worker.js | 41 + .../2d.composite.canvas.source-out.html | 46 + .../2d.composite.canvas.source-out.worker.js | 41 + .../2d.composite.canvas.source-over.html | 46 + .../2d.composite.canvas.source-over.worker.js | 41 + .../compositing/2d.composite.canvas.xor.html | 46 + .../compositing/2d.composite.canvas.xor.worker.js | 41 + .../compositing/2d.composite.clip.clear.html | 35 + .../compositing/2d.composite.clip.clear.worker.js | 30 + .../compositing/2d.composite.clip.copy.html | 35 + .../compositing/2d.composite.clip.copy.worker.js | 30 + .../2d.composite.clip.destination-atop.html | 35 + .../2d.composite.clip.destination-atop.worker.js | 30 + .../2d.composite.clip.destination-in.html | 35 + .../2d.composite.clip.destination-in.worker.js | 30 + .../2d.composite.clip.destination-out.html | 35 + .../2d.composite.clip.destination-out.worker.js | 30 + .../2d.composite.clip.destination-over.html | 35 + .../2d.composite.clip.destination-over.worker.js | 30 + .../compositing/2d.composite.clip.lighter.html | 35 + .../2d.composite.clip.lighter.worker.js | 30 + .../compositing/2d.composite.clip.source-atop.html | 35 + .../2d.composite.clip.source-atop.worker.js | 30 + .../compositing/2d.composite.clip.source-in.html | 35 + .../2d.composite.clip.source-in.worker.js | 30 + .../compositing/2d.composite.clip.source-out.html | 35 + .../2d.composite.clip.source-out.worker.js | 30 + .../compositing/2d.composite.clip.source-over.html | 35 + .../2d.composite.clip.source-over.worker.js | 30 + .../compositing/2d.composite.clip.xor.html | 35 + .../compositing/2d.composite.clip.xor.worker.js | 30 + .../2d.composite.globalAlpha.canvas.html | 36 + .../2d.composite.globalAlpha.canvas.worker.js | 31 + .../2d.composite.globalAlpha.canvascopy.html | 36 + .../2d.composite.globalAlpha.canvascopy.worker.js | 31 + .../2d.composite.globalAlpha.canvaspattern.html | 37 + ...d.composite.globalAlpha.canvaspattern.worker.js | 32 + .../2d.composite.globalAlpha.default.html | 27 + .../2d.composite.globalAlpha.default.worker.js | 22 + .../compositing/2d.composite.globalAlpha.fill.html | 33 + .../2d.composite.globalAlpha.fill.worker.js | 28 + .../2d.composite.globalAlpha.image.html | 30 + .../2d.composite.globalAlpha.image.worker.js | 26 + .../2d.composite.globalAlpha.imagepattern.html | 31 + ...2d.composite.globalAlpha.imagepattern.worker.js | 27 + .../2d.composite.globalAlpha.invalid.html | 36 + .../2d.composite.globalAlpha.invalid.worker.js | 31 + .../2d.composite.globalAlpha.range.html | 39 + .../2d.composite.globalAlpha.range.worker.js | 34 + .../compositing/2d.composite.image.clear.html | 43 + .../compositing/2d.composite.image.clear.worker.js | 38 + .../compositing/2d.composite.image.copy.html | 43 + .../compositing/2d.composite.image.copy.worker.js | 38 + .../2d.composite.image.destination-atop.html | 43 + .../2d.composite.image.destination-atop.worker.js | 38 + .../2d.composite.image.destination-in.html | 43 + .../2d.composite.image.destination-in.worker.js | 38 + .../2d.composite.image.destination-out.html | 43 + .../2d.composite.image.destination-out.worker.js | 38 + .../2d.composite.image.destination-over.html | 43 + .../2d.composite.image.destination-over.worker.js | 38 + .../compositing/2d.composite.image.lighter.html | 43 + .../2d.composite.image.lighter.worker.js | 38 + .../2d.composite.image.source-atop.html | 43 + .../2d.composite.image.source-atop.worker.js | 38 + .../compositing/2d.composite.image.source-in.html | 43 + .../2d.composite.image.source-in.worker.js | 38 + .../compositing/2d.composite.image.source-out.html | 43 + .../2d.composite.image.source-out.worker.js | 38 + .../2d.composite.image.source-over.html | 43 + .../2d.composite.image.source-over.worker.js | 38 + .../compositing/2d.composite.image.xor.html | 43 + .../compositing/2d.composite.image.xor.worker.js | 38 + .../2d.composite.operation.casesensitive.html | 29 + .../2d.composite.operation.casesensitive.worker.js | 24 + .../compositing/2d.composite.operation.clear.html | 29 + .../2d.composite.operation.clear.worker.js | 24 + .../compositing/2d.composite.operation.darker.html | 29 + .../2d.composite.operation.darker.worker.js | 24 + .../2d.composite.operation.default.html | 27 + .../2d.composite.operation.default.worker.js | 22 + .../compositing/2d.composite.operation.get.html | 34 + .../2d.composite.operation.get.worker.js | 29 + .../2d.composite.operation.highlight.html | 29 + .../2d.composite.operation.highlight.worker.js | 24 + .../2d.composite.operation.nullsuffix.html | 29 + .../2d.composite.operation.nullsuffix.worker.js | 24 + .../compositing/2d.composite.operation.over.html | 29 + .../2d.composite.operation.over.worker.js | 24 + .../2d.composite.operation.unrecognised.html | 29 + .../2d.composite.operation.unrecognised.worker.js | 24 + .../compositing/2d.composite.solid.clear.html | 32 + .../compositing/2d.composite.solid.clear.worker.js | 27 + .../compositing/2d.composite.solid.copy.html | 32 + .../compositing/2d.composite.solid.copy.worker.js | 27 + .../2d.composite.solid.destination-atop.html | 32 + .../2d.composite.solid.destination-atop.worker.js | 27 + .../2d.composite.solid.destination-in.html | 32 + .../2d.composite.solid.destination-in.worker.js | 27 + .../2d.composite.solid.destination-out.html | 32 + .../2d.composite.solid.destination-out.worker.js | 27 + .../2d.composite.solid.destination-over.html | 32 + .../2d.composite.solid.destination-over.worker.js | 27 + .../compositing/2d.composite.solid.lighter.html | 32 + .../2d.composite.solid.lighter.worker.js | 27 + .../2d.composite.solid.source-atop.html | 32 + .../2d.composite.solid.source-atop.worker.js | 27 + .../compositing/2d.composite.solid.source-in.html | 32 + .../2d.composite.solid.source-in.worker.js | 27 + .../compositing/2d.composite.solid.source-out.html | 32 + .../2d.composite.solid.source-out.worker.js | 27 + .../2d.composite.solid.source-over.html | 32 + .../2d.composite.solid.source-over.worker.js | 27 + .../compositing/2d.composite.solid.xor.html | 32 + .../compositing/2d.composite.solid.xor.worker.js | 27 + .../2d.composite.transparent.clear.html | 32 + .../2d.composite.transparent.clear.worker.js | 27 + .../compositing/2d.composite.transparent.copy.html | 32 + .../2d.composite.transparent.copy.worker.js | 27 + .../2d.composite.transparent.destination-atop.html | 32 + ...omposite.transparent.destination-atop.worker.js | 27 + .../2d.composite.transparent.destination-in.html | 32 + ....composite.transparent.destination-in.worker.js | 27 + .../2d.composite.transparent.destination-out.html | 32 + ...composite.transparent.destination-out.worker.js | 27 + .../2d.composite.transparent.destination-over.html | 32 + ...omposite.transparent.destination-over.worker.js | 27 + .../2d.composite.transparent.lighter.html | 32 + .../2d.composite.transparent.lighter.worker.js | 27 + .../2d.composite.transparent.source-atop.html | 32 + .../2d.composite.transparent.source-atop.worker.js | 27 + .../2d.composite.transparent.source-in.html | 32 + .../2d.composite.transparent.source-in.worker.js | 27 + .../2d.composite.transparent.source-out.html | 32 + .../2d.composite.transparent.source-out.worker.js | 27 + .../2d.composite.transparent.source-over.html | 32 + .../2d.composite.transparent.source-over.worker.js | 27 + .../compositing/2d.composite.transparent.xor.html | 32 + .../2d.composite.transparent.xor.worker.js | 27 + .../2d.composite.uncovered.fill.copy.html | 33 + .../2d.composite.uncovered.fill.copy.worker.js | 28 + ....composite.uncovered.fill.destination-atop.html | 33 + ...osite.uncovered.fill.destination-atop.worker.js | 28 + ...2d.composite.uncovered.fill.destination-in.html | 34 + ...mposite.uncovered.fill.destination-in.worker.js | 29 + .../2d.composite.uncovered.fill.source-in.html | 33 + ...2d.composite.uncovered.fill.source-in.worker.js | 28 + .../2d.composite.uncovered.fill.source-out.html | 33 + ...d.composite.uncovered.fill.source-out.worker.js | 28 + .../2d.composite.uncovered.image.copy.html | 44 + .../2d.composite.uncovered.image.copy.worker.js | 39 + ...composite.uncovered.image.destination-atop.html | 44 + ...site.uncovered.image.destination-atop.worker.js | 39 + ...d.composite.uncovered.image.destination-in.html | 44 + ...posite.uncovered.image.destination-in.worker.js | 39 + .../2d.composite.uncovered.image.source-in.html | 44 + ...d.composite.uncovered.image.source-in.worker.js | 39 + .../2d.composite.uncovered.image.source-out.html | 44 + ....composite.uncovered.image.source-out.worker.js | 39 + .../2d.composite.uncovered.nocontext.copy.html | 32 + ...2d.composite.uncovered.nocontext.copy.worker.js | 27 + ...osite.uncovered.nocontext.destination-atop.html | 32 + ....uncovered.nocontext.destination-atop.worker.js | 27 + ...mposite.uncovered.nocontext.destination-in.html | 32 + ...te.uncovered.nocontext.destination-in.worker.js | 27 + ...2d.composite.uncovered.nocontext.source-in.html | 32 + ...mposite.uncovered.nocontext.source-in.worker.js | 27 + ...d.composite.uncovered.nocontext.source-out.html | 32 + ...posite.uncovered.nocontext.source-out.worker.js | 27 + .../2d.composite.uncovered.pattern.copy.html | 44 + .../2d.composite.uncovered.pattern.copy.worker.js | 39 + ...mposite.uncovered.pattern.destination-atop.html | 44 + ...te.uncovered.pattern.destination-atop.worker.js | 39 + ...composite.uncovered.pattern.destination-in.html | 44 + ...site.uncovered.pattern.destination-in.worker.js | 39 + .../2d.composite.uncovered.pattern.source-in.html | 44 + ...composite.uncovered.pattern.source-in.worker.js | 39 + .../2d.composite.uncovered.pattern.source-out.html | 44 + ...omposite.uncovered.pattern.source-out.worker.js | 39 + .../2d.conformance.requirements.basics.html | 62 + .../2d.conformance.requirements.basics.worker.js | 57 + .../2d.conformance.requirements.missingargs.html | 141 + ....conformance.requirements.missingargs.worker.js | 136 + .../2d.drawImage.3arg.html | 37 + .../2d.drawImage.3arg.worker.js | 33 + .../2d.drawImage.5arg.html | 38 + .../2d.drawImage.5arg.worker.js | 34 + .../2d.drawImage.9arg.basic.html | 31 + .../2d.drawImage.9arg.basic.worker.js | 27 + .../2d.drawImage.9arg.destpos.html | 37 + .../2d.drawImage.9arg.destpos.worker.js | 33 + .../2d.drawImage.9arg.destsize.html | 39 + .../2d.drawImage.9arg.destsize.worker.js | 35 + .../2d.drawImage.9arg.sourcepos.html | 30 + .../2d.drawImage.9arg.sourcepos.worker.js | 26 + .../2d.drawImage.9arg.sourcesize.html | 37 + .../2d.drawImage.9arg.sourcesize.worker.js | 33 + .../2d.drawImage.alpha.html | 29 + .../2d.drawImage.alpha.worker.js | 25 + .../2d.drawImage.broken.html | 24 + .../2d.drawImage.broken.worker.js | 20 + .../2d.drawImage.canvas.html | 36 + .../2d.drawImage.canvas.worker.js | 31 + .../2d.drawImage.clip.html | 34 + .../2d.drawImage.clip.worker.js | 30 + .../2d.drawImage.composite.html | 29 + .../2d.drawImage.composite.worker.js | 25 + .../2d.drawImage.floatsource.html | 25 + .../2d.drawImage.floatsource.worker.js | 21 + .../2d.drawImage.negativedest.html | 37 + .../2d.drawImage.negativedest.worker.js | 33 + .../2d.drawImage.negativedir.html | 37 + .../2d.drawImage.negativedir.worker.js | 33 + .../2d.drawImage.negativesource.html | 37 + .../2d.drawImage.negativesource.worker.js | 33 + .../2d.drawImage.nonfinite.html | 328 ++ .../2d.drawImage.nonfinite.worker.js | 324 ++ .../2d.drawImage.nowrap.html | 30 + .../2d.drawImage.nowrap.worker.js | 26 + .../2d.drawImage.null.html | 27 + .../2d.drawImage.null.worker.js | 22 + .../2d.drawImage.path.html | 29 + .../2d.drawImage.path.worker.js | 25 + .../2d.drawImage.self.1.html | 36 + .../2d.drawImage.self.1.worker.js | 31 + .../2d.drawImage.self.2.html | 38 + .../2d.drawImage.self.2.worker.js | 33 + .../2d.drawImage.svg.html | 30 + .../2d.drawImage.transform.html | 29 + .../2d.drawImage.transform.worker.js | 25 + .../2d.drawImage.wrongtype.html | 29 + .../2d.drawImage.wrongtype.worker.js | 24 + .../2d.drawImage.zerocanvas.html | 36 + .../2d.drawImage.zerocanvas.worker.js | 31 + .../2d.drawImage.zerosource.html | 29 + .../2d.drawImage.zerosource.image.html | 39 + .../2d.drawImage.zerosource.worker.js | 25 + .../2d.clearRect.basic.html | 30 + .../2d.clearRect.basic.worker.js | 25 + .../2d.clearRect.clip.html | 35 + .../2d.clearRect.clip.worker.js | 30 + .../2d.clearRect.globalalpha.html | 31 + .../2d.clearRect.globalalpha.worker.js | 26 + .../2d.clearRect.globalcomposite.html | 31 + .../2d.clearRect.globalcomposite.worker.js | 26 + .../2d.clearRect.negative.html | 36 + .../2d.clearRect.negative.worker.js | 31 + .../2d.clearRect.nonfinite.html | 52 + .../2d.clearRect.nonfinite.worker.js | 47 + .../2d.clearRect.path.html | 32 + .../2d.clearRect.path.worker.js | 27 + .../2d.clearRect.shadow.html | 34 + .../2d.clearRect.shadow.worker.js | 29 + .../2d.clearRect.transform.html | 32 + .../2d.clearRect.transform.worker.js | 27 + .../2d.clearRect.zero.html | 32 + .../2d.clearRect.zero.worker.js | 27 + .../2d.fillRect.basic.html | 29 + .../2d.fillRect.basic.worker.js | 24 + .../2d.fillRect.clip.html | 36 + .../2d.fillRect.clip.worker.js | 31 + .../2d.fillRect.negative.html | 37 + .../2d.fillRect.negative.worker.js | 32 + .../2d.fillRect.nonfinite.html | 53 + .../2d.fillRect.nonfinite.worker.js | 48 + .../2d.fillRect.path.html | 33 + .../2d.fillRect.path.worker.js | 28 + .../2d.fillRect.shadow.html | 34 + .../2d.fillRect.shadow.worker.js | 29 + .../2d.fillRect.transform.html | 31 + .../2d.fillRect.transform.worker.js | 26 + .../2d.fillRect.zero.html | 33 + .../2d.fillRect.zero.worker.js | 28 + .../2d.strokeRect.basic.html | 30 + .../2d.strokeRect.basic.worker.js | 25 + .../2d.strokeRect.clip.html | 37 + .../2d.strokeRect.clip.worker.js | 32 + .../2d.strokeRect.globalalpha.html | 31 + .../2d.strokeRect.globalalpha.worker.js | 26 + .../2d.strokeRect.globalcomposite.html | 31 + .../2d.strokeRect.globalcomposite.worker.js | 26 + .../2d.strokeRect.negative.html | 38 + .../2d.strokeRect.negative.worker.js | 33 + .../2d.strokeRect.nonfinite.html | 54 + .../2d.strokeRect.nonfinite.worker.js | 49 + .../2d.strokeRect.path.html | 34 + .../2d.strokeRect.path.worker.js | 29 + .../2d.strokeRect.shadow.html | 37 + .../2d.strokeRect.shadow.worker.js | 32 + .../2d.strokeRect.transform.html | 32 + .../2d.strokeRect.transform.worker.js | 27 + .../2d.strokeRect.zero.1.html | 30 + .../2d.strokeRect.zero.1.worker.js | 25 + .../2d.strokeRect.zero.2.html | 32 + .../2d.strokeRect.zero.2.worker.js | 27 + .../2d.strokeRect.zero.3.html | 30 + .../2d.strokeRect.zero.3.worker.js | 25 + .../2d.strokeRect.zero.4.html | 31 + .../2d.strokeRect.zero.4.worker.js | 26 + .../2d.strokeRect.zero.5.html | 31 + .../2d.strokeRect.zero.5.worker.js | 26 + .../2d.fillStyle.CSSHSL.html | 51 + .../2d.fillStyle.CSSRGB.html | 60 + .../2d.fillStyle.colormix.html | 30 + .../2d.fillStyle.colormix.worker.js | 25 + .../2d.fillStyle.default.html | 27 + .../2d.fillStyle.default.worker.js | 22 + .../2d.fillStyle.get.halftransparent.html | 28 + .../2d.fillStyle.get.halftransparent.worker.js | 23 + .../2d.fillStyle.get.semitransparent.html | 28 + .../2d.fillStyle.get.semitransparent.worker.js | 23 + .../2d.fillStyle.get.solid.html | 28 + .../2d.fillStyle.get.solid.worker.js | 23 + .../2d.fillStyle.get.transparent.html | 28 + .../2d.fillStyle.get.transparent.worker.js | 23 + .../2d.fillStyle.invalidstring.html | 32 + .../2d.fillStyle.invalidstring.worker.js | 27 + .../2d.fillStyle.invalidtype.html | 32 + .../2d.fillStyle.invalidtype.worker.js | 27 + .../2d.fillStyle.parse.css-color-4-hsl-1.html | 30 + .../2d.fillStyle.parse.css-color-4-hsl-1.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-hsl-2.html | 30 + .../2d.fillStyle.parse.css-color-4-hsl-2.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-hsl-3.html | 30 + .../2d.fillStyle.parse.css-color-4-hsl-3.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-hsl-4.html | 30 + .../2d.fillStyle.parse.css-color-4-hsl-4.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-hsl-5.html | 30 + .../2d.fillStyle.parse.css-color-4-hsl-5.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-hsl-6.html | 30 + .../2d.fillStyle.parse.css-color-4-hsl-6.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-hsl-7.html | 30 + .../2d.fillStyle.parse.css-color-4-hsl-7.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-hsl-8.html | 30 + .../2d.fillStyle.parse.css-color-4-hsl-8.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-hsl-9.html | 30 + .../2d.fillStyle.parse.css-color-4-hsl-9.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-hsla-1.html | 30 + ...2d.fillStyle.parse.css-color-4-hsla-1.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-hsla-2.html | 30 + ...2d.fillStyle.parse.css-color-4-hsla-2.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-hsla-3.html | 30 + ...2d.fillStyle.parse.css-color-4-hsla-3.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-hsla-4.html | 30 + ...2d.fillStyle.parse.css-color-4-hsla-4.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-hsla-5.html | 30 + ...2d.fillStyle.parse.css-color-4-hsla-5.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-hsla-6.html | 30 + ...2d.fillStyle.parse.css-color-4-hsla-6.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-hsla-7.html | 30 + ...2d.fillStyle.parse.css-color-4-hsla-7.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-hsla-8.html | 30 + ...2d.fillStyle.parse.css-color-4-hsla-8.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-hsla-9.html | 30 + ...2d.fillStyle.parse.css-color-4-hsla-9.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-rgb-1.html | 30 + .../2d.fillStyle.parse.css-color-4-rgb-1.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-rgb-2.html | 30 + .../2d.fillStyle.parse.css-color-4-rgb-2.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-rgb-3.html | 30 + .../2d.fillStyle.parse.css-color-4-rgb-3.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-rgb-4.html | 30 + .../2d.fillStyle.parse.css-color-4-rgb-4.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-rgb-5.html | 30 + .../2d.fillStyle.parse.css-color-4-rgb-5.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-rgb-6.html | 30 + .../2d.fillStyle.parse.css-color-4-rgb-6.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-rgba-1.html | 30 + ...2d.fillStyle.parse.css-color-4-rgba-1.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-rgba-2.html | 30 + ...2d.fillStyle.parse.css-color-4-rgba-2.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-rgba-3.html | 30 + ...2d.fillStyle.parse.css-color-4-rgba-3.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-rgba-4.html | 30 + ...2d.fillStyle.parse.css-color-4-rgba-4.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-rgba-5.html | 30 + ...2d.fillStyle.parse.css-color-4-rgba-5.worker.js | 25 + .../2d.fillStyle.parse.css-color-4-rgba-6.html | 30 + ...2d.fillStyle.parse.css-color-4-rgba-6.worker.js | 25 + .../2d.fillStyle.parse.hex3.html | 30 + .../2d.fillStyle.parse.hex3.worker.js | 25 + .../2d.fillStyle.parse.hex4.html | 30 + .../2d.fillStyle.parse.hex4.worker.js | 25 + .../2d.fillStyle.parse.hex6.html | 30 + .../2d.fillStyle.parse.hex6.worker.js | 25 + .../2d.fillStyle.parse.hex8.html | 30 + .../2d.fillStyle.parse.hex8.worker.js | 25 + .../2d.fillStyle.parse.hsl-1.html | 30 + .../2d.fillStyle.parse.hsl-1.worker.js | 25 + .../2d.fillStyle.parse.hsl-2.html | 30 + .../2d.fillStyle.parse.hsl-2.worker.js | 25 + .../2d.fillStyle.parse.hsl-3.html | 30 + .../2d.fillStyle.parse.hsl-3.worker.js | 25 + .../2d.fillStyle.parse.hsl-4.html | 30 + .../2d.fillStyle.parse.hsl-4.worker.js | 25 + .../2d.fillStyle.parse.hsl-5.html | 30 + .../2d.fillStyle.parse.hsl-5.worker.js | 25 + .../2d.fillStyle.parse.hsl-6.html | 30 + .../2d.fillStyle.parse.hsl-6.worker.js | 25 + .../2d.fillStyle.parse.hsl-clamp-1.html | 30 + .../2d.fillStyle.parse.hsl-clamp-1.worker.js | 25 + .../2d.fillStyle.parse.hsl-clamp-2.html | 30 + .../2d.fillStyle.parse.hsl-clamp-2.worker.js | 25 + .../2d.fillStyle.parse.hsl-clamp-3.html | 30 + .../2d.fillStyle.parse.hsl-clamp-3.worker.js | 25 + .../2d.fillStyle.parse.hsl-clamp-4.html | 30 + .../2d.fillStyle.parse.hsl-clamp-4.worker.js | 25 + .../2d.fillStyle.parse.hsla-1.html | 30 + .../2d.fillStyle.parse.hsla-1.worker.js | 25 + .../2d.fillStyle.parse.hsla-2.html | 30 + .../2d.fillStyle.parse.hsla-2.worker.js | 25 + .../2d.fillStyle.parse.hsla-clamp-1.html | 30 + .../2d.fillStyle.parse.hsla-clamp-1.worker.js | 25 + .../2d.fillStyle.parse.hsla-clamp-2.html | 30 + .../2d.fillStyle.parse.hsla-clamp-2.worker.js | 25 + .../2d.fillStyle.parse.hsla-clamp-3.html | 30 + .../2d.fillStyle.parse.hsla-clamp-3.worker.js | 25 + .../2d.fillStyle.parse.hsla-clamp-4.html | 30 + .../2d.fillStyle.parse.hsla-clamp-4.worker.js | 25 + .../2d.fillStyle.parse.hsla-clamp-5.html | 30 + .../2d.fillStyle.parse.hsla-clamp-5.worker.js | 25 + .../2d.fillStyle.parse.hsla-clamp-6.html | 30 + .../2d.fillStyle.parse.hsla-clamp-6.worker.js | 25 + .../2d.fillStyle.parse.html4.html | 30 + .../2d.fillStyle.parse.html4.worker.js | 25 + ....fillStyle.parse.invalid.css-color-4-hsl-1.html | 30 + ...Style.parse.invalid.css-color-4-hsl-1.worker.js | 25 + ....fillStyle.parse.invalid.css-color-4-hsl-2.html | 30 + ...Style.parse.invalid.css-color-4-hsl-2.worker.js | 25 + ....fillStyle.parse.invalid.css-color-4-hsl-3.html | 30 + ...Style.parse.invalid.css-color-4-hsl-3.worker.js | 25 + ....fillStyle.parse.invalid.css-color-4-hsl-4.html | 30 + ...Style.parse.invalid.css-color-4-hsl-4.worker.js | 25 + ....fillStyle.parse.invalid.css-color-4-hsl-5.html | 30 + ...Style.parse.invalid.css-color-4-hsl-5.worker.js | 25 + ...fillStyle.parse.invalid.css-color-4-hsla-1.html | 30 + ...tyle.parse.invalid.css-color-4-hsla-1.worker.js | 25 + ...fillStyle.parse.invalid.css-color-4-hsla-2.html | 30 + ...tyle.parse.invalid.css-color-4-hsla-2.worker.js | 25 + ...fillStyle.parse.invalid.css-color-4-hsla-3.html | 30 + ...tyle.parse.invalid.css-color-4-hsla-3.worker.js | 25 + ....fillStyle.parse.invalid.css-color-4-rgb-1.html | 30 + ...Style.parse.invalid.css-color-4-rgb-1.worker.js | 25 + ....fillStyle.parse.invalid.css-color-4-rgb-2.html | 30 + ...Style.parse.invalid.css-color-4-rgb-2.worker.js | 25 + ....fillStyle.parse.invalid.css-color-4-rgb-3.html | 30 + ...Style.parse.invalid.css-color-4-rgb-3.worker.js | 25 + ....fillStyle.parse.invalid.css-color-4-rgb-4.html | 30 + ...Style.parse.invalid.css-color-4-rgb-4.worker.js | 25 + ....fillStyle.parse.invalid.css-color-4-rgb-5.html | 30 + ...Style.parse.invalid.css-color-4-rgb-5.worker.js | 25 + ...fillStyle.parse.invalid.css-color-4-rgba-1.html | 30 + ...tyle.parse.invalid.css-color-4-rgba-1.worker.js | 25 + ...fillStyle.parse.invalid.css-color-4-rgba-2.html | 30 + ...tyle.parse.invalid.css-color-4-rgba-2.worker.js | 25 + ...fillStyle.parse.invalid.css-color-4-rgba-3.html | 30 + ...tyle.parse.invalid.css-color-4-rgba-3.worker.js | 25 + .../2d.fillStyle.parse.invalid.hex1.html | 30 + .../2d.fillStyle.parse.invalid.hex1.worker.js | 25 + .../2d.fillStyle.parse.invalid.hex2.html | 30 + .../2d.fillStyle.parse.invalid.hex2.worker.js | 25 + .../2d.fillStyle.parse.invalid.hex3.html | 30 + .../2d.fillStyle.parse.invalid.hex3.worker.js | 25 + .../2d.fillStyle.parse.invalid.hex4.html | 30 + .../2d.fillStyle.parse.invalid.hex4.worker.js | 25 + .../2d.fillStyle.parse.invalid.hex5.html | 30 + .../2d.fillStyle.parse.invalid.hex5.worker.js | 25 + .../2d.fillStyle.parse.invalid.hex6.html | 30 + .../2d.fillStyle.parse.invalid.hex6.worker.js | 25 + .../2d.fillStyle.parse.invalid.hex7.html | 30 + .../2d.fillStyle.parse.invalid.hex7.worker.js | 25 + .../2d.fillStyle.parse.invalid.hex8.html | 30 + .../2d.fillStyle.parse.invalid.hex8.worker.js | 25 + .../2d.fillStyle.parse.invalid.hsl-1.html | 30 + .../2d.fillStyle.parse.invalid.hsl-1.worker.js | 25 + .../2d.fillStyle.parse.invalid.hsl-2.html | 30 + .../2d.fillStyle.parse.invalid.hsl-2.worker.js | 25 + .../2d.fillStyle.parse.invalid.hsl-3.html | 30 + .../2d.fillStyle.parse.invalid.hsl-3.worker.js | 25 + .../2d.fillStyle.parse.invalid.hsl-4.html | 30 + .../2d.fillStyle.parse.invalid.hsl-4.worker.js | 25 + .../2d.fillStyle.parse.invalid.hsl-5.html | 30 + .../2d.fillStyle.parse.invalid.hsl-5.worker.js | 25 + .../2d.fillStyle.parse.invalid.hsl-6.html | 30 + .../2d.fillStyle.parse.invalid.hsl-6.worker.js | 25 + .../2d.fillStyle.parse.invalid.hsla-1.html | 30 + .../2d.fillStyle.parse.invalid.hsla-1.worker.js | 25 + .../2d.fillStyle.parse.invalid.hsla-2.html | 30 + .../2d.fillStyle.parse.invalid.hsla-2.worker.js | 25 + .../2d.fillStyle.parse.invalid.hsla-3.html | 30 + .../2d.fillStyle.parse.invalid.hsla-3.worker.js | 25 + .../2d.fillStyle.parse.invalid.name-1.html | 30 + .../2d.fillStyle.parse.invalid.name-1.worker.js | 25 + .../2d.fillStyle.parse.invalid.name-2.html | 30 + .../2d.fillStyle.parse.invalid.name-2.worker.js | 25 + .../2d.fillStyle.parse.invalid.name-3.html | 30 + .../2d.fillStyle.parse.invalid.name-3.worker.js | 25 + .../2d.fillStyle.parse.invalid.name-4.html | 30 + .../2d.fillStyle.parse.invalid.name-4.worker.js | 25 + .../2d.fillStyle.parse.invalid.name-5.html | 30 + .../2d.fillStyle.parse.invalid.name-5.worker.js | 25 + .../2d.fillStyle.parse.invalid.rgb-1.html | 30 + .../2d.fillStyle.parse.invalid.rgb-1.worker.js | 25 + .../2d.fillStyle.parse.invalid.rgb-2.html | 30 + .../2d.fillStyle.parse.invalid.rgb-2.worker.js | 25 + .../2d.fillStyle.parse.invalid.rgb-3.html | 30 + .../2d.fillStyle.parse.invalid.rgb-3.worker.js | 25 + .../2d.fillStyle.parse.invalid.rgba-1.html | 30 + .../2d.fillStyle.parse.invalid.rgba-1.worker.js | 25 + .../2d.fillStyle.parse.invalid.rgba-2.html | 30 + .../2d.fillStyle.parse.invalid.rgba-2.worker.js | 25 + .../2d.fillStyle.parse.invalid.rgba-3.html | 30 + .../2d.fillStyle.parse.invalid.rgba-3.worker.js | 25 + .../2d.fillStyle.parse.invalid.rgba-4.html | 30 + .../2d.fillStyle.parse.invalid.rgba-4.worker.js | 25 + .../2d.fillStyle.parse.invalid.rgba-5.html | 30 + .../2d.fillStyle.parse.invalid.rgba-5.worker.js | 25 + .../2d.fillStyle.parse.rgb-clamp-1.html | 30 + .../2d.fillStyle.parse.rgb-clamp-1.worker.js | 25 + .../2d.fillStyle.parse.rgb-clamp-2.html | 30 + .../2d.fillStyle.parse.rgb-clamp-2.worker.js | 25 + .../2d.fillStyle.parse.rgb-clamp-3.html | 30 + .../2d.fillStyle.parse.rgb-clamp-3.worker.js | 25 + .../2d.fillStyle.parse.rgb-clamp-4.html | 30 + .../2d.fillStyle.parse.rgb-clamp-4.worker.js | 25 + .../2d.fillStyle.parse.rgb-clamp-5.html | 30 + .../2d.fillStyle.parse.rgb-clamp-5.worker.js | 25 + .../2d.fillStyle.parse.rgb-eof.html | 30 + .../2d.fillStyle.parse.rgb-eof.worker.js | 25 + .../2d.fillStyle.parse.rgb-num.html | 30 + .../2d.fillStyle.parse.rgb-num.worker.js | 25 + .../2d.fillStyle.parse.rgb-percent.html | 30 + .../2d.fillStyle.parse.rgb-percent.worker.js | 25 + .../2d.fillStyle.parse.rgba-clamp-1.html | 30 + .../2d.fillStyle.parse.rgba-clamp-1.worker.js | 25 + .../2d.fillStyle.parse.rgba-clamp-2.html | 30 + .../2d.fillStyle.parse.rgba-clamp-2.worker.js | 25 + .../2d.fillStyle.parse.rgba-eof.html | 30 + .../2d.fillStyle.parse.rgba-eof.worker.js | 25 + .../2d.fillStyle.parse.rgba-num-1.html | 30 + .../2d.fillStyle.parse.rgba-num-1.worker.js | 25 + .../2d.fillStyle.parse.rgba-num-2.html | 30 + .../2d.fillStyle.parse.rgba-num-2.worker.js | 25 + .../2d.fillStyle.parse.rgba-percent.html | 30 + .../2d.fillStyle.parse.rgba-percent.worker.js | 25 + .../2d.fillStyle.parse.rgba-solid-1.html | 30 + .../2d.fillStyle.parse.rgba-solid-1.worker.js | 25 + .../2d.fillStyle.parse.rgba-solid-2.html | 30 + .../2d.fillStyle.parse.rgba-solid-2.worker.js | 25 + .../2d.fillStyle.parse.rgba-solid-3.html | 30 + .../2d.fillStyle.parse.rgba-solid-3.worker.js | 25 + .../2d.fillStyle.parse.rgba-solid-4.html | 30 + .../2d.fillStyle.parse.rgba-solid-4.worker.js | 25 + .../2d.fillStyle.parse.svg-1.html | 30 + .../2d.fillStyle.parse.svg-1.worker.js | 25 + .../2d.fillStyle.parse.svg-2.html | 30 + .../2d.fillStyle.parse.svg-2.worker.js | 25 + .../2d.fillStyle.parse.system.html | 29 + .../2d.fillStyle.parse.system.worker.js | 24 + .../2d.fillStyle.parse.transparent-1.html | 30 + .../2d.fillStyle.parse.transparent-1.worker.js | 25 + .../2d.fillStyle.parse.transparent-2.html | 30 + .../2d.fillStyle.parse.transparent-2.worker.js | 25 + .../2d.fillStyle.toStringFunctionCallback.html | 40 + ...2d.fillStyle.toStringFunctionCallback.worker.js | 35 + .../2d.gradient.conic.invalid.inputs.html | 45 + .../2d.gradient.conic.invalid.inputs.worker.js | 40 + .../2d.gradient.conic.negative.rotation.html | 36 + .../2d.gradient.conic.negative.rotation.worker.js | 31 + .../2d.gradient.conic.positive.rotation.html | 36 + .../2d.gradient.conic.positive.rotation.worker.js | 31 + .../fill-and-stroke-styles/2d.gradient.empty.html | 32 + .../2d.gradient.empty.worker.js | 27 + .../2d.gradient.interpolate.alpha.html | 36 + .../2d.gradient.interpolate.alpha.png | Bin 0 -> 219 bytes .../2d.gradient.interpolate.alpha.worker.js | 31 + .../2d.gradient.interpolate.color.html | 34 + .../2d.gradient.interpolate.color.png | Bin 0 -> 219 bytes .../2d.gradient.interpolate.color.worker.js | 29 + .../2d.gradient.interpolate.coloralpha.html | 34 + .../2d.gradient.interpolate.coloralpha.png | Bin 0 -> 396 bytes .../2d.gradient.interpolate.coloralpha.worker.js | 29 + .../2d.gradient.interpolate.multiple.html | 36 + .../2d.gradient.interpolate.multiple.png | Bin 0 -> 256 bytes .../2d.gradient.interpolate.multiple.worker.js | 31 + .../2d.gradient.interpolate.outside.html | 38 + .../2d.gradient.interpolate.outside.worker.js | 33 + .../2d.gradient.interpolate.overlap.html | 52 + .../2d.gradient.interpolate.overlap.png | Bin 0 -> 248 bytes .../2d.gradient.interpolate.overlap.worker.js | 47 + .../2d.gradient.interpolate.overlap2.html | 42 + .../2d.gradient.interpolate.overlap2.worker.js | 37 + .../2d.gradient.interpolate.solid.html | 32 + .../2d.gradient.interpolate.solid.worker.js | 27 + .../2d.gradient.interpolate.vertical.html | 34 + .../2d.gradient.interpolate.vertical.png | Bin 0 -> 229 bytes .../2d.gradient.interpolate.vertical.worker.js | 29 + .../2d.gradient.interpolate.zerosize.fill.html | 36 + ...2d.gradient.interpolate.zerosize.fill.worker.js | 31 + .../2d.gradient.interpolate.zerosize.fillRect.html | 35 + ...radient.interpolate.zerosize.fillRect.worker.js | 30 + .../2d.gradient.interpolate.zerosize.fillText.html | 36 + ...radient.interpolate.zerosize.fillText.worker.js | 31 + .../2d.gradient.interpolate.zerosize.stroke.html | 44 + ....gradient.interpolate.zerosize.stroke.worker.js | 39 + ...d.gradient.interpolate.zerosize.strokeRect.html | 43 + ...dient.interpolate.zerosize.strokeRect.worker.js | 38 + ...d.gradient.interpolate.zerosize.strokeText.html | 36 + ...dient.interpolate.zerosize.strokeText.worker.js | 31 + .../2d.gradient.linear.nonfinite.html | 49 + .../2d.gradient.linear.nonfinite.worker.js | 44 + .../2d.gradient.linear.transform.1.html | 37 + .../2d.gradient.linear.transform.1.worker.js | 32 + .../2d.gradient.linear.transform.2.html | 38 + .../2d.gradient.linear.transform.2.worker.js | 33 + .../2d.gradient.linear.transform.3.html | 38 + .../2d.gradient.linear.transform.3.worker.js | 33 + .../2d.gradient.object.compare.html | 31 + .../2d.gradient.object.compare.worker.js | 26 + .../2d.gradient.object.crosscanvas.html | 34 + .../2d.gradient.object.crosscanvas.worker.js | 29 + .../2d.gradient.object.invalidcolor.html | 41 + .../2d.gradient.object.invalidcolor.worker.js | 36 + .../2d.gradient.object.invalidoffset.html | 32 + .../2d.gradient.object.invalidoffset.worker.js | 27 + .../2d.gradient.object.return.html | 35 + .../2d.gradient.object.return.worker.js | 30 + .../2d.gradient.object.type.html | 28 + .../2d.gradient.object.type.worker.js | 23 + .../2d.gradient.object.update.html | 35 + .../2d.gradient.object.update.worker.js | 30 + .../2d.gradient.radial.cone.behind.html | 44 + .../2d.gradient.radial.cone.behind.worker.js | 39 + .../2d.gradient.radial.cone.beside.html | 44 + .../2d.gradient.radial.cone.beside.worker.js | 39 + .../2d.gradient.radial.cone.bottom.html | 44 + .../2d.gradient.radial.cone.bottom.worker.js | 39 + .../2d.gradient.radial.cone.cylinder.html | 44 + .../2d.gradient.radial.cone.cylinder.worker.js | 39 + .../2d.gradient.radial.cone.front.html | 44 + .../2d.gradient.radial.cone.front.worker.js | 39 + .../2d.gradient.radial.cone.shape1.html | 53 + .../2d.gradient.radial.cone.shape1.worker.js | 48 + .../2d.gradient.radial.cone.shape2.html | 53 + .../2d.gradient.radial.cone.shape2.worker.js | 48 + .../2d.gradient.radial.cone.top.html | 44 + .../2d.gradient.radial.cone.top.worker.js | 39 + .../2d.gradient.radial.equal.html | 44 + .../2d.gradient.radial.equal.worker.js | 39 + .../2d.gradient.radial.inside1.html | 44 + .../2d.gradient.radial.inside1.worker.js | 39 + .../2d.gradient.radial.inside2.html | 44 + .../2d.gradient.radial.inside2.worker.js | 39 + .../2d.gradient.radial.inside3.html | 45 + .../2d.gradient.radial.inside3.worker.js | 40 + .../2d.gradient.radial.negative.html | 29 + .../2d.gradient.radial.negative.worker.js | 24 + .../2d.gradient.radial.nonfinite.html | 101 + .../2d.gradient.radial.nonfinite.worker.js | 96 + .../2d.gradient.radial.outside1.html | 44 + .../2d.gradient.radial.outside1.worker.js | 39 + .../2d.gradient.radial.outside2.html | 44 + .../2d.gradient.radial.outside2.worker.js | 39 + .../2d.gradient.radial.outside3.html | 45 + .../2d.gradient.radial.outside3.worker.js | 40 + .../2d.gradient.radial.touch1.html | 44 + .../2d.gradient.radial.touch1.worker.js | 39 + .../2d.gradient.radial.touch2.html | 46 + .../2d.gradient.radial.touch2.worker.js | 41 + .../2d.gradient.radial.touch3.html | 44 + .../2d.gradient.radial.touch3.worker.js | 39 + .../2d.gradient.radial.transform.1.html | 38 + .../2d.gradient.radial.transform.1.worker.js | 33 + .../2d.gradient.radial.transform.2.html | 39 + .../2d.gradient.radial.transform.2.worker.js | 34 + .../2d.gradient.radial.transform.3.html | 39 + .../2d.gradient.radial.transform.3.worker.js | 34 + .../2d.pattern.basic.canvas.html | 47 + .../2d.pattern.basic.canvas.worker.js | 42 + .../2d.pattern.basic.image.html | 33 + .../2d.pattern.basic.image.worker.js | 29 + .../2d.pattern.basic.nocontext.html | 39 + .../2d.pattern.basic.nocontext.worker.js | 34 + .../2d.pattern.basic.type.html | 29 + .../2d.pattern.basic.type.worker.js | 25 + .../2d.pattern.basic.zerocanvas.html | 43 + .../2d.pattern.basic.zerocanvas.worker.js | 38 + .../2d.pattern.crosscanvas.html | 31 + .../2d.pattern.crosscanvas.worker.js | 27 + .../2d.pattern.image.null.html | 27 + .../2d.pattern.image.null.worker.js | 22 + .../2d.pattern.image.string.html | 27 + .../2d.pattern.image.string.worker.js | 22 + .../2d.pattern.image.undefined.html | 27 + .../2d.pattern.image.undefined.worker.js | 22 + .../2d.pattern.modify.canvas1.html | 43 + .../2d.pattern.modify.canvas1.worker.js | 38 + .../2d.pattern.modify.canvas2.html | 47 + .../2d.pattern.modify.canvas2.worker.js | 42 + .../2d.pattern.paint.norepeat.basic.html | 34 + .../2d.pattern.paint.norepeat.basic.worker.js | 30 + .../2d.pattern.paint.norepeat.coord1.html | 37 + .../2d.pattern.paint.norepeat.coord1.worker.js | 33 + .../2d.pattern.paint.norepeat.coord2.html | 38 + .../2d.pattern.paint.norepeat.coord2.worker.js | 34 + .../2d.pattern.paint.norepeat.coord3.html | 38 + .../2d.pattern.paint.norepeat.coord3.worker.js | 34 + .../2d.pattern.paint.norepeat.outside.html | 40 + .../2d.pattern.paint.norepeat.outside.worker.js | 36 + .../2d.pattern.paint.orientation.canvas.html | 46 + .../2d.pattern.paint.orientation.canvas.worker.js | 41 + .../2d.pattern.paint.orientation.image.html | 40 + .../2d.pattern.paint.orientation.image.worker.js | 36 + .../2d.pattern.paint.repeat.basic.html | 34 + .../2d.pattern.paint.repeat.basic.worker.js | 30 + .../2d.pattern.paint.repeat.coord1.html | 35 + .../2d.pattern.paint.repeat.coord1.worker.js | 31 + .../2d.pattern.paint.repeat.coord2.html | 31 + .../2d.pattern.paint.repeat.coord2.worker.js | 27 + .../2d.pattern.paint.repeat.coord3.html | 34 + .../2d.pattern.paint.repeat.coord3.worker.js | 30 + .../2d.pattern.paint.repeat.outside.html | 35 + .../2d.pattern.paint.repeat.outside.worker.js | 31 + .../2d.pattern.paint.repeatx.basic.html | 36 + .../2d.pattern.paint.repeatx.basic.worker.js | 32 + .../2d.pattern.paint.repeatx.coord1.html | 40 + .../2d.pattern.paint.repeatx.coord1.worker.js | 36 + .../2d.pattern.paint.repeatx.outside.html | 37 + .../2d.pattern.paint.repeatx.outside.worker.js | 33 + .../2d.pattern.paint.repeaty.basic.html | 36 + .../2d.pattern.paint.repeaty.basic.worker.js | 32 + .../2d.pattern.paint.repeaty.coord1.html | 40 + .../2d.pattern.paint.repeaty.coord1.worker.js | 36 + .../2d.pattern.paint.repeaty.outside.html | 37 + .../2d.pattern.paint.repeaty.outside.worker.js | 33 + .../2d.pattern.repeat.case.html | 27 + .../2d.pattern.repeat.case.worker.js | 22 + .../2d.pattern.repeat.empty.html | 33 + .../2d.pattern.repeat.empty.worker.js | 29 + .../2d.pattern.repeat.null.html | 27 + .../2d.pattern.repeat.null.worker.js | 22 + .../2d.pattern.repeat.nullsuffix.html | 27 + .../2d.pattern.repeat.nullsuffix.worker.js | 22 + .../2d.pattern.repeat.undefined.html | 27 + .../2d.pattern.repeat.undefined.worker.js | 22 + .../2d.pattern.repeat.unrecognised.html | 27 + .../2d.pattern.repeat.unrecognised.worker.js | 22 + .../2d.pattern.repeat.unrecognisednull.html | 27 + .../2d.pattern.repeat.unrecognisednull.worker.js | 22 + .../2d.pattern.transform.identity.html | 40 + .../2d.pattern.transform.identity.worker.js | 35 + .../2d.pattern.transform.infinity.html | 40 + .../2d.pattern.transform.infinity.worker.js | 35 + .../2d.pattern.transform.invalid.html | 29 + .../2d.pattern.transform.invalid.worker.js | 24 + .../2d.strokeStyle.colormix.html | 30 + .../2d.strokeStyle.default.html | 27 + .../2d.strokeStyle.default.worker.js | 22 + ...nvasFilterObject.blur.exceptions.tentative.html | 32 + ...ilterObject.blur.exceptions.tentative.worker.js | 27 + ...r.canvasFilterObject.colorMatrix.tentative.html | 69 + ...vasFilterObject.colorMatrix.tentative.worker.js | 64 + ...bject.componentTransfer.discrete.tentative.html | 67 + ....componentTransfer.discrete.tentative.worker.js | 62 + ...erObject.componentTransfer.gamma.tentative.html | 58 + ...ect.componentTransfer.gamma.tentative.worker.js | 53 + ...bject.componentTransfer.identity.tentative.html | 45 + ....componentTransfer.identity.tentative.worker.js | 40 + ...rObject.componentTransfer.linear.tentative.html | 57 + ...ct.componentTransfer.linear.tentative.worker.js | 52 + ...erObject.componentTransfer.table.tentative.html | 67 + ...ect.componentTransfer.table.tentative.worker.js | 62 + ...Object.convolveMatrix.exceptions.tentative.html | 43 + ...t.convolveMatrix.exceptions.tentative.worker.js | 38 + ...lterObject.dropShadow.exceptions.tentative.html | 124 + ...bject.dropShadow.exceptions.tentative.worker.js | 119 + ...FilterObject.dropShadow.tentative-expected.html | 57 + ...er.canvasFilterObject.dropShadow.tentative.html | 110 + ....canvasFilterObject.dropShadow.tentative.w.html | 124 + ....gaussianBlur.tentative.isotropic-expected.html | 15 + ...terObject.gaussianBlur.tentative.isotropic.html | 23 + ...rObject.gaussianBlur.tentative.isotropic.w.html | 37 + ...t.gaussianBlur.tentative.mostly-x-expected.html | 15 + ...lterObject.gaussianBlur.tentative.mostly-x.html | 23 + ...erObject.gaussianBlur.tentative.mostly-x.w.html | 37 + ...t.gaussianBlur.tentative.mostly-y-expected.html | 15 + ...lterObject.gaussianBlur.tentative.mostly-y.html | 23 + ...erObject.gaussianBlur.tentative.mostly-y.w.html | 37 + ...ect.gaussianBlur.tentative.x-only-expected.html | 15 + ...FilterObject.gaussianBlur.tentative.x-only.html | 23 + ...lterObject.gaussianBlur.tentative.x-only.w.html | 37 + ...ect.gaussianBlur.tentative.y-only-expected.html | 15 + ...FilterObject.gaussianBlur.tentative.y-only.html | 23 + ...lterObject.gaussianBlur.tentative.y-only.w.html | 37 + .../2d.filter.canvasFilterObject.tentative.html | 49 + ...d.filter.canvasFilterObject.tentative.worker.js | 44 + ...lterObject.turbulence.inputTypes.tentative.html | 130 + ...bject.turbulence.inputTypes.tentative.worker.js | 125 + .../canvas/offscreen/filters/2d.filter.value.html | 56 + .../offscreen/filters/2d.filter.value.worker.js | 51 + ....layer.anisotropic-blur.isotropic-expected.html | 16 + .../2d.layer.anisotropic-blur.isotropic.html | 23 + .../2d.layer.anisotropic-blur.isotropic.w.html | 37 + ...d.layer.anisotropic-blur.mostly-x-expected.html | 16 + .../layers/2d.layer.anisotropic-blur.mostly-x.html | 23 + .../2d.layer.anisotropic-blur.mostly-x.w.html | 37 + ...d.layer.anisotropic-blur.mostly-y-expected.html | 16 + .../layers/2d.layer.anisotropic-blur.mostly-y.html | 23 + .../2d.layer.anisotropic-blur.mostly-y.w.html | 37 + .../2d.layer.anisotropic-blur.x-only-expected.html | 16 + .../layers/2d.layer.anisotropic-blur.x-only.html | 23 + .../layers/2d.layer.anisotropic-blur.x-only.w.html | 37 + .../2d.layer.anisotropic-blur.y-only-expected.html | 16 + .../layers/2d.layer.anisotropic-blur.y-only.html | 23 + .../layers/2d.layer.anisotropic-blur.y-only.w.html | 37 + .../layers/2d.layer.beginLayer-options.html | 51 + .../layers/2d.layer.beginLayer-options.worker.js | 46 + ...r-from-outside-canvas.no-clipping-expected.html | 36 + ...layer.blur-from-outside-canvas.no-clipping.html | 31 + ...yer.blur-from-outside-canvas.no-clipping.w.html | 45 + ...from-outside-canvas.with-clipping-expected.html | 38 + ...yer.blur-from-outside-canvas.with-clipping.html | 33 + ...r.blur-from-outside-canvas.with-clipping.w.html | 47 + .../layers/2d.layer.clearRect.full-expected.html | 15 + .../offscreen/layers/2d.layer.clearRect.full.html | 26 + .../layers/2d.layer.clearRect.full.w.html | 40 + .../2d.layer.clearRect.partial-expected.html | 21 + .../layers/2d.layer.clearRect.partial.html | 25 + .../layers/2d.layer.clearRect.partial.w.html | 39 + .../2d.layer.clip-inside-and-outside-expected.html | 34 + .../layers/2d.layer.clip-inside-and-outside.html | 30 + .../layers/2d.layer.clip-inside-and-outside.w.html | 44 + .../layers/2d.layer.clip-inside-expected.html | 26 + .../offscreen/layers/2d.layer.clip-inside.html | 26 + .../offscreen/layers/2d.layer.clip-inside.w.html | 40 + .../layers/2d.layer.clip-outside-expected.html | 26 + .../offscreen/layers/2d.layer.clip-outside.html | 25 + .../offscreen/layers/2d.layer.clip-outside.w.html | 39 + .../2d.layer.cross-layer-paths-expected.html | 14 + .../layers/2d.layer.cross-layer-paths.html | 23 + .../layers/2d.layer.cross-layer-paths.w.html | 37 + ...layer.css-filters.blur-and-shadow-expected.html | 17 + .../2d.layer.css-filters.blur-and-shadow.html | 23 + .../2d.layer.css-filters.blur-and-shadow.w.html | 37 + .../layers/2d.layer.css-filters.blur-expected.html | 16 + .../layers/2d.layer.css-filters.blur.html | 23 + .../layers/2d.layer.css-filters.blur.w.html | 37 + .../2d.layer.css-filters.shadow-expected.html | 16 + .../layers/2d.layer.css-filters.shadow.html | 23 + .../layers/2d.layer.css-filters.shadow.w.html | 37 + .../layers/2d.layer.exceptions-are-no-op.html | 32 + .../layers/2d.layer.exceptions-are-no-op.worker.js | 27 + .../layers/2d.layer.global-filter-expected.html | 17 + .../offscreen/layers/2d.layer.global-filter.html | 29 + .../offscreen/layers/2d.layer.global-filter.w.html | 43 + .../2d.layer.global-states.alpha-expected.html | 31 + ...ayer.global-states.alpha.blending-expected.html | 32 + .../2d.layer.global-states.alpha.blending.html | 38 + ...obal-states.alpha.blending.shadow-expected.html | 36 + ....layer.global-states.alpha.blending.shadow.html | 42 + ...ayer.global-states.alpha.blending.shadow.w.html | 56 + .../2d.layer.global-states.alpha.blending.w.html | 52 + ...yer.global-states.alpha.composite-expected.html | 32 + .../2d.layer.global-states.alpha.composite.html | 38 + ...bal-states.alpha.composite.shadow-expected.html | 36 + ...layer.global-states.alpha.composite.shadow.html | 42 + ...yer.global-states.alpha.composite.shadow.w.html | 56 + .../2d.layer.global-states.alpha.composite.w.html | 52 + .../layers/2d.layer.global-states.alpha.html | 37 + ....layer.global-states.alpha.shadow-expected.html | 35 + .../2d.layer.global-states.alpha.shadow.html | 41 + .../2d.layer.global-states.alpha.shadow.w.html | 55 + .../layers/2d.layer.global-states.alpha.w.html | 51 + .../2d.layer.global-states.blending-expected.html | 31 + .../layers/2d.layer.global-states.blending.html | 37 + ...yer.global-states.blending.shadow-expected.html | 35 + .../2d.layer.global-states.blending.shadow.html | 41 + .../2d.layer.global-states.blending.shadow.w.html | 55 + .../layers/2d.layer.global-states.blending.w.html | 51 + .../2d.layer.global-states.composite-expected.html | 31 + .../layers/2d.layer.global-states.composite.html | 37 + ...er.global-states.composite.shadow-expected.html | 35 + .../2d.layer.global-states.composite.shadow.html | 41 + .../2d.layer.global-states.composite.shadow.w.html | 55 + .../layers/2d.layer.global-states.composite.w.html | 51 + ....layer.global-states.filter.alpha-expected.html | 50 + ...obal-states.filter.alpha.blending-expected.html | 51 + ....layer.global-states.filter.alpha.blending.html | 41 + ...ates.filter.alpha.blending.shadow-expected.html | 55 + ...global-states.filter.alpha.blending.shadow.html | 45 + ...obal-states.filter.alpha.blending.shadow.w.html | 59 + ...ayer.global-states.filter.alpha.blending.w.html | 55 + ...bal-states.filter.alpha.composite-expected.html | 51 + ...layer.global-states.filter.alpha.composite.html | 41 + ...tes.filter.alpha.composite.shadow-expected.html | 55 + ...lobal-states.filter.alpha.composite.shadow.html | 45 + ...bal-states.filter.alpha.composite.shadow.w.html | 59 + ...yer.global-states.filter.alpha.composite.w.html | 55 + .../2d.layer.global-states.filter.alpha.html | 40 + ...global-states.filter.alpha.shadow-expected.html | 54 + ...2d.layer.global-states.filter.alpha.shadow.html | 44 + ....layer.global-states.filter.alpha.shadow.w.html | 58 + .../2d.layer.global-states.filter.alpha.w.html | 54 + ...yer.global-states.filter.blending-expected.html | 50 + .../2d.layer.global-states.filter.blending.html | 40 + ...bal-states.filter.blending.shadow-expected.html | 54 + ...layer.global-states.filter.blending.shadow.html | 44 + ...yer.global-states.filter.blending.shadow.w.html | 58 + .../2d.layer.global-states.filter.blending.w.html | 54 + ...er.global-states.filter.composite-expected.html | 50 + .../2d.layer.global-states.filter.composite.html | 40 + ...al-states.filter.composite.shadow-expected.html | 54 + ...ayer.global-states.filter.composite.shadow.html | 44 + ...er.global-states.filter.composite.shadow.w.html | 58 + .../2d.layer.global-states.filter.composite.w.html | 54 + ...al-states.filter.no-global-states-expected.html | 50 + ...ayer.global-states.filter.no-global-states.html | 40 + ...er.global-states.filter.no-global-states.w.html | 54 + ...layer.global-states.filter.shadow-expected.html | 53 + .../2d.layer.global-states.filter.shadow.html | 43 + .../2d.layer.global-states.filter.shadow.w.html | 57 + ...er.global-states.no-global-states-expected.html | 31 + .../2d.layer.global-states.no-global-states.html | 37 + .../2d.layer.global-states.no-global-states.w.html | 51 + .../2d.layer.global-states.shadow-expected.html | 34 + .../layers/2d.layer.global-states.shadow.html | 40 + .../layers/2d.layer.global-states.shadow.w.html | 54 + ...er.invalid-calls.beginLayer-reset-endLayer.html | 31 + ...valid-calls.beginLayer-reset-endLayer.worker.js | 26 + .../2d.layer.invalid-calls.beginLayer-restore.html | 30 + ...ayer.invalid-calls.beginLayer-restore.worker.js | 25 + ...yer.invalid-calls.beginLayer-save-endLayer.html | 31 + ...nvalid-calls.beginLayer-save-endLayer.worker.js | 26 + .../layers/2d.layer.invalid-calls.endLayer.html | 29 + .../2d.layer.invalid-calls.endLayer.worker.js | 24 + ...ayer.invalid-calls.save-beginLayer-restore.html | 31 + ...invalid-calls.save-beginLayer-restore.worker.js | 26 + .../2d.layer.invalid-calls.save-endLayer.html | 30 + .../2d.layer.invalid-calls.save-endLayer.worker.js | 25 + ...layer.layer-rendering-state-reset-in-layer.html | 57 + ....layer-rendering-state-reset-in-layer.worker.js | 52 + ...med-operations-with-promises.convertToBlob.html | 27 + ...perations-with-promises.convertToBlob.worker.js | 23 + ...operations-with-promises.createImageBitmap.html | 27 + ...tions-with-promises.createImageBitmap.worker.js | 23 + ...d.layer.malformed-operations.createPattern.html | 34 + ...er.malformed-operations.createPattern.worker.js | 29 + .../2d.layer.malformed-operations.drawImage.html | 36 + ....layer.malformed-operations.drawImage.worker.js | 31 + ...2d.layer.malformed-operations.getImageData.html | 34 + ...yer.malformed-operations.getImageData.worker.js | 29 + ...2d.layer.malformed-operations.putImageData.html | 37 + ...yer.malformed-operations.putImageData.worker.js | 32 + ...malformed-operations.transferToImageBitmap.html | 34 + ...rmed-operations.transferToImageBitmap.worker.js | 29 + .../offscreen/layers/2d.layer.nested-expected.html | 37 + .../layers/2d.layer.nested-filters-expected.html | 28 + .../offscreen/layers/2d.layer.nested-filters.html | 36 + .../layers/2d.layer.nested-filters.w.html | 50 + .../canvas/offscreen/layers/2d.layer.nested.html | 39 + .../canvas/offscreen/layers/2d.layer.nested.w.html | 53 + .../layers/2d.layer.opaque-canvas-expected.html | 34 + .../offscreen/layers/2d.layer.opaque-canvas.html | 36 + .../offscreen/layers/2d.layer.opaque-canvas.w.html | 50 + .../offscreen/layers/2d.layer.reset-expected.html | 14 + .../canvas/offscreen/layers/2d.layer.reset.html | 38 + .../canvas/offscreen/layers/2d.layer.reset.w.html | 52 + .../layers/2d.layer.restore-style-expected.html | 24 + .../offscreen/layers/2d.layer.restore-style.html | 28 + .../offscreen/layers/2d.layer.restore-style.w.html | 42 + .../layers/2d.layer.several-complex-expected.html | 35 + .../offscreen/layers/2d.layer.several-complex.html | 37 + .../layers/2d.layer.several-complex.w.html | 51 + ...from-outside-canvas.long-distance-expected.html | 19 + ...anvas.long-distance-with-clipping-expected.html | 21 + ...outside-canvas.long-distance-with-clipping.html | 33 + ...tside-canvas.long-distance-with-clipping.w.html | 47 + ...r.shadow-from-outside-canvas.long-distance.html | 31 + ...shadow-from-outside-canvas.long-distance.w.html | 45 + ...rom-outside-canvas.short-distance-expected.html | 19 + ...nvas.short-distance-with-clipping-expected.html | 21 + ...utside-canvas.short-distance-with-clipping.html | 33 + ...side-canvas.short-distance-with-clipping.w.html | 47 + ....shadow-from-outside-canvas.short-distance.html | 31 + ...hadow-from-outside-canvas.short-distance.w.html | 45 + .../2d.layer.valid-calls.beginLayer-endLayer.html | 28 + ...layer.valid-calls.beginLayer-endLayer.worker.js | 23 + .../2d.layer.valid-calls.beginLayer-save.html | 28 + .../2d.layer.valid-calls.beginLayer-save.worker.js | 23 + .../layers/2d.layer.valid-calls.beginLayer.html | 27 + .../2d.layer.valid-calls.beginLayer.worker.js | 22 + .../layers/2d.layer.valid-calls.restore.html | 27 + .../layers/2d.layer.valid-calls.restore.worker.js | 22 + .../2d.layer.valid-calls.save-beginLayer.html | 28 + .../2d.layer.valid-calls.save-beginLayer.worker.js | 23 + .../layers/2d.layer.valid-calls.save.html | 27 + .../layers/2d.layer.valid-calls.save.worker.js | 22 + .../2d.layer.valid-calls.save_reset_restore.html | 29 + ....layer.valid-calls.save_reset_restore.worker.js | 24 + .../layers/2d.layer.valid-calls.save_restore.html | 28 + .../2d.layer.valid-calls.save_restore.worker.js | 23 + .../offscreen/line-styles/2d.line.cap.butt.html | 61 + .../line-styles/2d.line.cap.butt.worker.js | 56 + .../offscreen/line-styles/2d.line.cap.closed.html | 46 + .../line-styles/2d.line.cap.closed.worker.js | 41 + .../offscreen/line-styles/2d.line.cap.invalid.html | 52 + .../line-styles/2d.line.cap.invalid.worker.js | 47 + .../offscreen/line-styles/2d.line.cap.open.html | 46 + .../line-styles/2d.line.cap.open.worker.js | 41 + .../offscreen/line-styles/2d.line.cap.round.html | 77 + .../line-styles/2d.line.cap.round.worker.js | 72 + .../offscreen/line-styles/2d.line.cap.square.html | 61 + .../line-styles/2d.line.cap.square.worker.js | 56 + .../offscreen/line-styles/2d.line.cap.valid.html | 34 + .../line-styles/2d.line.cap.valid.worker.js | 29 + .../offscreen/line-styles/2d.line.cross.html | 43 + .../offscreen/line-styles/2d.line.cross.worker.js | 38 + .../offscreen/line-styles/2d.line.defaults.html | 30 + .../line-styles/2d.line.defaults.worker.js | 25 + .../offscreen/line-styles/2d.line.fill.noop.html | 37 + .../line-styles/2d.line.fill.noop.worker.js | 32 + .../line-styles/2d.line.invalid.strokestyle.html | 37 + .../2d.line.invalid.strokestyle.worker.js | 32 + .../offscreen/line-styles/2d.line.join.bevel.html | 80 + .../line-styles/2d.line.join.bevel.worker.js | 75 + .../offscreen/line-styles/2d.line.join.closed.html | 45 + .../line-styles/2d.line.join.closed.worker.js | 40 + .../line-styles/2d.line.join.invalid.html | 52 + .../line-styles/2d.line.join.invalid.worker.js | 47 + .../offscreen/line-styles/2d.line.join.miter.html | 71 + .../line-styles/2d.line.join.miter.worker.js | 66 + .../offscreen/line-styles/2d.line.join.open.html | 45 + .../line-styles/2d.line.join.open.worker.js | 40 + .../line-styles/2d.line.join.parallel.html | 42 + .../line-styles/2d.line.join.parallel.worker.js | 37 + .../offscreen/line-styles/2d.line.join.round.html | 78 + .../line-styles/2d.line.join.round.worker.js | 73 + .../offscreen/line-styles/2d.line.join.valid.html | 34 + .../line-styles/2d.line.join.valid.worker.js | 29 + .../offscreen/line-styles/2d.line.miter.acute.html | 52 + .../line-styles/2d.line.miter.acute.worker.js | 47 + .../line-styles/2d.line.miter.exceeded.html | 44 + .../line-styles/2d.line.miter.exceeded.worker.js | 39 + .../line-styles/2d.line.miter.invalid.html | 60 + .../line-styles/2d.line.miter.invalid.worker.js | 55 + .../line-styles/2d.line.miter.lineedge.html | 41 + .../line-styles/2d.line.miter.lineedge.worker.js | 36 + .../line-styles/2d.line.miter.obtuse.html | 52 + .../line-styles/2d.line.miter.obtuse.worker.js | 47 + .../line-styles/2d.line.miter.rightangle.html | 44 + .../line-styles/2d.line.miter.rightangle.worker.js | 39 + .../offscreen/line-styles/2d.line.miter.valid.html | 37 + .../line-styles/2d.line.miter.valid.worker.js | 32 + .../line-styles/2d.line.miter.within.html | 44 + .../line-styles/2d.line.miter.within.worker.js | 39 + .../offscreen/line-styles/2d.line.union.html | 46 + .../offscreen/line-styles/2d.line.union.worker.js | 41 + .../offscreen/line-styles/2d.line.width.basic.html | 63 + .../line-styles/2d.line.width.basic.worker.js | 58 + .../line-styles/2d.line.width.invalid.html | 60 + .../line-styles/2d.line.width.invalid.worker.js | 55 + .../line-styles/2d.line.width.scaledefault.html | 40 + .../2d.line.width.scaledefault.worker.js | 35 + .../line-styles/2d.line.width.transformed.html | 69 + .../2d.line.width.transformed.worker.js | 64 + .../offscreen/line-styles/2d.line.width.valid.html | 37 + .../line-styles/2d.line.width.valid.worker.js | 32 + .../offscreencanvas.convert.to.blob.html | 165 + .../offscreencanvas.convert.to.blob.w.html | 337 ++ .../2d.text.draw.generic.family.html | 49 + .../2d.text.draw.generic.family.w.html | 52 + .../manual/filter/offscreencanvas.filter.html | 27 + .../manual/filter/offscreencanvas.filter.js | 48 + .../manual/filter/offscreencanvas.filter.w.html | 54 + .../manual/image-smoothing/image.smoothing.html | 128 + .../image-smoothing/image.smoothing.worker.js | 126 + .../manual/layers/unclosed-layers-expected.html | 14 + .../offscreen/manual/layers/unclosed-layers.html | 33 + .../offscreen/manual/layers/unclosed-layers.w.html | 48 + .../layers/unclosed-nested-layers-expected.html | 14 + .../manual/layers/unclosed-nested-layers.html | 39 + .../manual/layers/unclosed-nested-layers.w.html | 54 + .../offscreencanvas-worker-font-load-crash.html | 19 + .../offscreencanvas.constructor.html | 51 + .../offscreencanvas.constructor.worker.js | 45 + .../offscreencanvas.getcontext.html | 80 + .../offscreencanvas.getcontext.worker.js | 77 + .../offscreencanvas.resize.html | 240 ++ ...ffscreencanvas.transfer.lowlatency.nocrash.html | 12 + .../offscreencanvas.transfer.to.imagebitmap.html | 112 + ...reencanvas.transfer.to.imagebitmap.nocrash.html | 16 + .../offscreencanvas.transfer.to.imagebitmap.w.html | 201 ++ ...fscreencanvas.transfercontrol.to.offscreen.html | 34 + ...creencanvas.transfercontrol.to.offscreen.w.html | 76 + .../offscreencanvas.transferrable.html | 83 + .../offscreencanvas.transferrable.w.html | 142 + .../2d.transformation.getTransform.html | 40 + .../2d.color.space.p3.convertToBlobp3.canvas.html | 50 + .../path-objects/2d.path.arc.angle.1.html | 34 + .../path-objects/2d.path.arc.angle.1.worker.js | 29 + .../path-objects/2d.path.arc.angle.2.html | 34 + .../path-objects/2d.path.arc.angle.2.worker.js | 29 + .../path-objects/2d.path.arc.angle.3.html | 34 + .../path-objects/2d.path.arc.angle.3.worker.js | 29 + .../path-objects/2d.path.arc.angle.4.html | 37 + .../path-objects/2d.path.arc.angle.4.worker.js | 32 + .../path-objects/2d.path.arc.angle.5.html | 34 + .../path-objects/2d.path.arc.angle.5.worker.js | 29 + .../path-objects/2d.path.arc.angle.6.html | 37 + .../path-objects/2d.path.arc.angle.6.worker.js | 32 + .../path-objects/2d.path.arc.default.html | 34 + .../path-objects/2d.path.arc.default.worker.js | 29 + .../offscreen/path-objects/2d.path.arc.empty.html | 34 + .../path-objects/2d.path.arc.empty.worker.js | 29 + .../offscreen/path-objects/2d.path.arc.end.html | 36 + .../path-objects/2d.path.arc.end.worker.js | 31 + .../path-objects/2d.path.arc.negative.html | 29 + .../path-objects/2d.path.arc.negative.worker.js | 24 + .../path-objects/2d.path.arc.nonempty.html | 35 + .../path-objects/2d.path.arc.nonempty.worker.js | 30 + .../path-objects/2d.path.arc.nonfinite.html | 77 + .../path-objects/2d.path.arc.nonfinite.worker.js | 72 + .../path-objects/2d.path.arc.scale.1.html | 54 + .../path-objects/2d.path.arc.scale.1.worker.js | 49 + .../path-objects/2d.path.arc.scale.2.html | 44 + .../path-objects/2d.path.arc.scale.2.worker.js | 39 + .../path-objects/2d.path.arc.selfintersect.1.html | 38 + .../2d.path.arc.selfintersect.1.worker.js | 33 + .../path-objects/2d.path.arc.selfintersect.2.html | 42 + .../2d.path.arc.selfintersect.2.worker.js | 37 + .../path-objects/2d.path.arc.shape.1.html | 39 + .../path-objects/2d.path.arc.shape.1.worker.js | 34 + .../path-objects/2d.path.arc.shape.2.html | 39 + .../path-objects/2d.path.arc.shape.2.worker.js | 34 + .../path-objects/2d.path.arc.shape.3.html | 38 + .../path-objects/2d.path.arc.shape.3.worker.js | 33 + .../path-objects/2d.path.arc.shape.4.html | 38 + .../path-objects/2d.path.arc.shape.4.worker.js | 33 + .../path-objects/2d.path.arc.shape.5.html | 38 + .../path-objects/2d.path.arc.shape.5.worker.js | 33 + .../path-objects/2d.path.arc.twopie.1.html | 34 + .../path-objects/2d.path.arc.twopie.1.worker.js | 29 + .../path-objects/2d.path.arc.twopie.2.html | 34 + .../path-objects/2d.path.arc.twopie.2.worker.js | 29 + .../path-objects/2d.path.arc.twopie.3.html | 34 + .../path-objects/2d.path.arc.twopie.3.worker.js | 29 + .../path-objects/2d.path.arc.twopie.4.html | 34 + .../path-objects/2d.path.arc.twopie.4.worker.js | 29 + .../path-objects/2d.path.arc.twopie.5.html | 35 + .../path-objects/2d.path.arc.twopie.5.worker.js | 30 + .../path-objects/2d.path.arc.twopie.6.html | 35 + .../path-objects/2d.path.arc.twopie.6.worker.js | 30 + .../offscreen/path-objects/2d.path.arc.zero.1.html | 34 + .../path-objects/2d.path.arc.zero.1.worker.js | 29 + .../offscreen/path-objects/2d.path.arc.zero.2.html | 34 + .../path-objects/2d.path.arc.zero.2.worker.js | 29 + .../path-objects/2d.path.arc.zeroradius.html | 35 + .../path-objects/2d.path.arc.zeroradius.worker.js | 30 + .../path-objects/2d.path.arcTo.coincide.1.html | 46 + .../2d.path.arcTo.coincide.1.worker.js | 41 + .../path-objects/2d.path.arcTo.coincide.2.html | 36 + .../2d.path.arcTo.coincide.2.worker.js | 31 + .../path-objects/2d.path.arcTo.collinear.1.html | 43 + .../2d.path.arcTo.collinear.1.worker.js | 38 + .../path-objects/2d.path.arcTo.collinear.2.html | 43 + .../2d.path.arcTo.collinear.2.worker.js | 38 + .../path-objects/2d.path.arcTo.collinear.3.html | 48 + .../2d.path.arcTo.collinear.3.worker.js | 43 + .../2d.path.arcTo.ensuresubpath.1.html | 34 + .../2d.path.arcTo.ensuresubpath.1.worker.js | 29 + .../2d.path.arcTo.ensuresubpath.2.html | 35 + .../2d.path.arcTo.ensuresubpath.2.worker.js | 30 + .../path-objects/2d.path.arcTo.negative.html | 29 + .../path-objects/2d.path.arcTo.negative.worker.js | 24 + .../path-objects/2d.path.arcTo.nonfinite.html | 75 + .../path-objects/2d.path.arcTo.nonfinite.worker.js | 70 + .../path-objects/2d.path.arcTo.scale.html | 47 + .../path-objects/2d.path.arcTo.scale.worker.js | 42 + .../path-objects/2d.path.arcTo.shape.curve1.html | 60 + .../2d.path.arcTo.shape.curve1.worker.js | 55 + .../path-objects/2d.path.arcTo.shape.curve2.html | 59 + .../2d.path.arcTo.shape.curve2.worker.js | 54 + .../path-objects/2d.path.arcTo.shape.end.html | 40 + .../path-objects/2d.path.arcTo.shape.end.worker.js | 35 + .../path-objects/2d.path.arcTo.shape.start.html | 40 + .../2d.path.arcTo.shape.start.worker.js | 35 + .../path-objects/2d.path.arcTo.transformation.html | 46 + .../2d.path.arcTo.transformation.worker.js | 41 + .../path-objects/2d.path.arcTo.zero.1.html | 43 + .../path-objects/2d.path.arcTo.zero.1.worker.js | 38 + .../path-objects/2d.path.arcTo.zero.2.html | 43 + .../path-objects/2d.path.arcTo.zero.2.worker.js | 38 + .../offscreen/path-objects/2d.path.beginPath.html | 33 + .../path-objects/2d.path.beginPath.worker.js | 28 + .../path-objects/2d.path.bezierCurveTo.basic.html | 35 + .../2d.path.bezierCurveTo.basic.worker.js | 30 + .../2d.path.bezierCurveTo.ensuresubpath.1.html | 35 + ...2d.path.bezierCurveTo.ensuresubpath.1.worker.js | 30 + .../2d.path.bezierCurveTo.ensuresubpath.2.html | 35 + ...2d.path.bezierCurveTo.ensuresubpath.2.worker.js | 30 + .../2d.path.bezierCurveTo.nonfinite.html | 109 + .../2d.path.bezierCurveTo.nonfinite.worker.js | 104 + .../path-objects/2d.path.bezierCurveTo.scaled.html | 40 + .../2d.path.bezierCurveTo.scaled.worker.js | 35 + .../path-objects/2d.path.bezierCurveTo.shape.html | 39 + .../2d.path.bezierCurveTo.shape.worker.js | 34 + .../path-objects/2d.path.clip.basic.1.html | 37 + .../path-objects/2d.path.clip.basic.1.worker.js | 32 + .../path-objects/2d.path.clip.basic.2.html | 37 + .../path-objects/2d.path.clip.basic.2.worker.js | 32 + .../offscreen/path-objects/2d.path.clip.empty.html | 36 + .../path-objects/2d.path.clip.empty.worker.js | 31 + .../path-objects/2d.path.clip.intersect.html | 40 + .../path-objects/2d.path.clip.intersect.worker.js | 35 + .../path-objects/2d.path.clip.unaffected.html | 42 + .../path-objects/2d.path.clip.unaffected.worker.js | 37 + .../path-objects/2d.path.clip.winding.1.html | 45 + .../path-objects/2d.path.clip.winding.1.worker.js | 40 + .../path-objects/2d.path.clip.winding.2.html | 49 + .../path-objects/2d.path.clip.winding.2.worker.js | 44 + .../path-objects/2d.path.closePath.empty.html | 32 + .../path-objects/2d.path.closePath.empty.worker.js | 27 + .../path-objects/2d.path.closePath.newline.html | 37 + .../2d.path.closePath.newline.worker.js | 32 + .../path-objects/2d.path.closePath.nextpoint.html | 36 + .../2d.path.closePath.nextpoint.worker.js | 31 + .../path-objects/2d.path.ellipse.basics.html | 33 + .../path-objects/2d.path.ellipse.basics.worker.js | 28 + .../path-objects/2d.path.fill.closed.basic.html | 37 + .../2d.path.fill.closed.basic.worker.js | 32 + .../2d.path.fill.closed.unaffected.html | 40 + .../2d.path.fill.closed.unaffected.worker.js | 35 + .../path-objects/2d.path.fill.overlap.html | 36 + .../path-objects/2d.path.fill.overlap.png | Bin 0 -> 205 bytes .../path-objects/2d.path.fill.overlap.worker.js | 31 + .../path-objects/2d.path.fill.winding.add.html | 42 + .../2d.path.fill.winding.add.worker.js | 37 + .../2d.path.fill.winding.subtract.1.html | 42 + .../2d.path.fill.winding.subtract.1.worker.js | 37 + .../2d.path.fill.winding.subtract.2.html | 41 + .../2d.path.fill.winding.subtract.2.worker.js | 36 + .../2d.path.fill.winding.subtract.3.html | 47 + .../2d.path.fill.winding.subtract.3.worker.js | 42 + .../offscreen/path-objects/2d.path.initial.html | 32 + .../path-objects/2d.path.initial.worker.js | 27 + .../path-objects/2d.path.isPointInPath.arc.html | 35 + .../2d.path.isPointInPath.arc.worker.js | 30 + .../2d.path.isPointInPath.basic.1.html | 29 + .../2d.path.isPointInPath.basic.1.worker.js | 24 + .../2d.path.isPointInPath.basic.2.html | 29 + .../2d.path.isPointInPath.basic.2.worker.js | 24 + .../path-objects/2d.path.isPointInPath.basic.html | 66 + .../2d.path.isPointInPath.basic.worker.js | 61 + .../path-objects/2d.path.isPointInPath.bezier.html | 48 + .../2d.path.isPointInPath.bezier.worker.js | 43 + .../path-objects/2d.path.isPointInPath.bigarc.html | 35 + .../2d.path.isPointInPath.bigarc.worker.js | 30 + .../path-objects/2d.path.isPointInPath.edge.html | 39 + .../2d.path.isPointInPath.edge.worker.js | 34 + .../path-objects/2d.path.isPointInPath.empty.html | 27 + .../2d.path.isPointInPath.empty.worker.js | 22 + .../2d.path.isPointInPath.nonfinite.html | 34 + .../2d.path.isPointInPath.nonfinite.worker.js | 29 + .../2d.path.isPointInPath.outside.html | 34 + .../2d.path.isPointInPath.outside.worker.js | 29 + .../2d.path.isPointInPath.subpath.html | 34 + .../2d.path.isPointInPath.subpath.worker.js | 29 + .../2d.path.isPointInPath.transform.1.html | 34 + .../2d.path.isPointInPath.transform.1.worker.js | 29 + .../2d.path.isPointInPath.transform.2.html | 34 + .../2d.path.isPointInPath.transform.2.worker.js | 29 + .../2d.path.isPointInPath.transform.3.html | 34 + .../2d.path.isPointInPath.transform.3.worker.js | 29 + .../2d.path.isPointInPath.transform.4.html | 32 + .../2d.path.isPointInPath.transform.4.worker.js | 27 + .../2d.path.isPointInPath.unclosed.html | 32 + .../2d.path.isPointInPath.unclosed.worker.js | 27 + .../2d.path.isPointInPath.winding.html | 47 + .../2d.path.isPointInPath.winding.worker.js | 42 + .../2d.path.isPointInStroke.basic.html | 36 + .../2d.path.isPointInStroke.basic.worker.js | 32 + .../2d.path.isPointInStroke.scaleddashes.html | 40 + .../2d.path.isPointInStroke.scaleddashes.worker.js | 35 + .../2d.path.isPointInpath.invalid.html | 51 + .../2d.path.isPointInpath.invalid.worker.js | 46 + .../2d.path.isPointInpath.multi.path.html | 49 + .../2d.path.isPointInpath.multi.path.worker.js | 44 + .../path-objects/2d.path.lineTo.basic.html | 35 + .../path-objects/2d.path.lineTo.basic.worker.js | 30 + .../2d.path.lineTo.ensuresubpath.1.html | 34 + .../2d.path.lineTo.ensuresubpath.1.worker.js | 29 + .../2d.path.lineTo.ensuresubpath.2.html | 35 + .../2d.path.lineTo.ensuresubpath.2.worker.js | 30 + .../path-objects/2d.path.lineTo.nextpoint.html | 36 + .../2d.path.lineTo.nextpoint.worker.js | 31 + .../2d.path.lineTo.nonfinite.details.html | 31 + .../2d.path.lineTo.nonfinite.details.worker.js | 26 + .../path-objects/2d.path.lineTo.nonfinite.html | 41 + .../2d.path.lineTo.nonfinite.worker.js | 36 + .../path-objects/2d.path.moveTo.basic.html | 36 + .../path-objects/2d.path.moveTo.basic.worker.js | 31 + .../path-objects/2d.path.moveTo.multiple.html | 36 + .../path-objects/2d.path.moveTo.multiple.worker.js | 31 + .../path-objects/2d.path.moveTo.newsubpath.html | 36 + .../2d.path.moveTo.newsubpath.worker.js | 31 + .../path-objects/2d.path.moveTo.nonfinite.html | 40 + .../2d.path.moveTo.nonfinite.worker.js | 35 + .../2d.path.quadraticCurveTo.basic.html | 35 + .../2d.path.quadraticCurveTo.basic.worker.js | 30 + .../2d.path.quadraticCurveTo.ensuresubpath.1.html | 35 + ...path.quadraticCurveTo.ensuresubpath.1.worker.js | 30 + .../2d.path.quadraticCurveTo.ensuresubpath.2.html | 35 + ...path.quadraticCurveTo.ensuresubpath.2.worker.js | 30 + .../2d.path.quadraticCurveTo.nonfinite.html | 57 + .../2d.path.quadraticCurveTo.nonfinite.worker.js | 52 + .../2d.path.quadraticCurveTo.scaled.html | 40 + .../2d.path.quadraticCurveTo.scaled.worker.js | 35 + .../2d.path.quadraticCurveTo.shape.html | 39 + .../2d.path.quadraticCurveTo.shape.worker.js | 34 + .../offscreen/path-objects/2d.path.rect.basic.html | 32 + .../path-objects/2d.path.rect.basic.worker.js | 27 + .../path-objects/2d.path.rect.closed.html | 34 + .../path-objects/2d.path.rect.closed.worker.js | 29 + .../offscreen/path-objects/2d.path.rect.end.1.html | 34 + .../path-objects/2d.path.rect.end.1.worker.js | 29 + .../offscreen/path-objects/2d.path.rect.end.2.html | 39 + .../path-objects/2d.path.rect.end.2.worker.js | 34 + .../path-objects/2d.path.rect.negative.html | 39 + .../path-objects/2d.path.rect.negative.worker.js | 34 + .../path-objects/2d.path.rect.newsubpath.html | 36 + .../path-objects/2d.path.rect.newsubpath.worker.js | 31 + .../path-objects/2d.path.rect.nonfinite.html | 57 + .../path-objects/2d.path.rect.nonfinite.worker.js | 52 + .../path-objects/2d.path.rect.selfintersect.html | 34 + .../2d.path.rect.selfintersect.worker.js | 29 + .../path-objects/2d.path.rect.winding.html | 39 + .../path-objects/2d.path.rect.winding.worker.js | 34 + .../path-objects/2d.path.rect.zero.1.html | 34 + .../path-objects/2d.path.rect.zero.1.worker.js | 29 + .../path-objects/2d.path.rect.zero.2.html | 34 + .../path-objects/2d.path.rect.zero.2.worker.js | 29 + .../path-objects/2d.path.rect.zero.3.html | 34 + .../path-objects/2d.path.rect.zero.3.worker.js | 29 + .../path-objects/2d.path.rect.zero.4.html | 34 + .../path-objects/2d.path.rect.zero.4.worker.js | 29 + .../path-objects/2d.path.rect.zero.5.html | 34 + .../path-objects/2d.path.rect.zero.5.worker.js | 29 + .../path-objects/2d.path.rect.zero.6.html | 36 + .../path-objects/2d.path.rect.zero.6.worker.js | 31 + .../2d.path.roundrect.1.radius.dompoint.html | 55 + ...oundrect.1.radius.dompoint.single argument.html | 55 + ...ect.1.radius.dompoint.single argument.worker.js | 50 + .../2d.path.roundrect.1.radius.dompoint.worker.js | 50 + .../2d.path.roundrect.1.radius.dompointinit.html | 55 + ...rect.1.radius.dompointinit.single.argument.html | 55 + ...1.radius.dompointinit.single.argument.worker.js | 50 + ....path.roundrect.1.radius.dompointinit.worker.js | 50 + .../2d.path.roundrect.1.radius.double.html | 35 + ....roundrect.1.radius.double.single.argument.html | 35 + ...drect.1.radius.double.single.argument.worker.js | 30 + .../2d.path.roundrect.1.radius.double.worker.js | 30 + .../2d.path.roundrect.2.radii.1.dompoint.html | 47 + .../2d.path.roundrect.2.radii.1.dompoint.worker.js | 42 + .../2d.path.roundrect.2.radii.1.dompointinit.html | 47 + ...path.roundrect.2.radii.1.dompointinit.worker.js | 42 + .../2d.path.roundrect.2.radii.1.double.html | 35 + .../2d.path.roundrect.2.radii.1.double.worker.js | 30 + .../2d.path.roundrect.2.radii.2.dompoint.html | 47 + .../2d.path.roundrect.2.radii.2.dompoint.worker.js | 42 + .../2d.path.roundrect.2.radii.2.dompointinit.html | 47 + ...path.roundrect.2.radii.2.dompointinit.worker.js | 42 + .../2d.path.roundrect.2.radii.2.double.html | 35 + .../2d.path.roundrect.2.radii.2.double.worker.js | 30 + .../2d.path.roundrect.3.radii.1.dompoint.html | 42 + .../2d.path.roundrect.3.radii.1.dompoint.worker.js | 37 + .../2d.path.roundrect.3.radii.1.dompointinit.html | 42 + ...path.roundrect.3.radii.1.dompointinit.worker.js | 37 + .../2d.path.roundrect.3.radii.1.double.html | 35 + .../2d.path.roundrect.3.radii.1.double.worker.js | 30 + .../2d.path.roundrect.3.radii.2.dompoint.html | 47 + .../2d.path.roundrect.3.radii.2.dompoint.worker.js | 42 + .../2d.path.roundrect.3.radii.2.dompointinit.html | 47 + ...path.roundrect.3.radii.2.dompointinit.worker.js | 42 + .../2d.path.roundrect.3.radii.2.double.html | 35 + .../2d.path.roundrect.3.radii.2.double.worker.js | 30 + .../2d.path.roundrect.3.radii.3.dompoint.html | 42 + .../2d.path.roundrect.3.radii.3.dompoint.worker.js | 37 + .../2d.path.roundrect.3.radii.3.dompointinit.html | 42 + ...path.roundrect.3.radii.3.dompointinit.worker.js | 37 + .../2d.path.roundrect.3.radii.3.double.html | 35 + .../2d.path.roundrect.3.radii.3.double.worker.js | 30 + .../2d.path.roundrect.4.radii.1.dompoint.html | 42 + .../2d.path.roundrect.4.radii.1.dompoint.worker.js | 37 + .../2d.path.roundrect.4.radii.1.dompointinit.html | 42 + ...path.roundrect.4.radii.1.dompointinit.worker.js | 37 + .../2d.path.roundrect.4.radii.1.double.html | 35 + .../2d.path.roundrect.4.radii.1.double.worker.js | 30 + .../2d.path.roundrect.4.radii.2.dompoint.html | 42 + .../2d.path.roundrect.4.radii.2.dompoint.worker.js | 37 + .../2d.path.roundrect.4.radii.2.dompointinit.html | 42 + ...path.roundrect.4.radii.2.dompointinit.worker.js | 37 + .../2d.path.roundrect.4.radii.2.double.html | 35 + .../2d.path.roundrect.4.radii.2.double.worker.js | 30 + .../2d.path.roundrect.4.radii.3.dompoint.html | 42 + .../2d.path.roundrect.4.radii.3.dompoint.worker.js | 37 + .../2d.path.roundrect.4.radii.3.dompointinit.html | 42 + ...path.roundrect.4.radii.3.dompointinit.worker.js | 37 + .../2d.path.roundrect.4.radii.3.double.html | 35 + .../2d.path.roundrect.4.radii.3.double.worker.js | 30 + .../2d.path.roundrect.4.radii.4.dompoint.html | 42 + .../2d.path.roundrect.4.radii.4.dompoint.worker.js | 37 + .../2d.path.roundrect.4.radii.4.dompointinit.html | 42 + ...path.roundrect.4.radii.4.dompointinit.worker.js | 37 + .../2d.path.roundrect.4.radii.4.double.html | 35 + .../2d.path.roundrect.4.radii.4.double.worker.js | 30 + .../path-objects/2d.path.roundrect.badinput.html | 34 + .../2d.path.roundrect.badinput.worker.js | 29 + .../path-objects/2d.path.roundrect.closed.html | 34 + .../2d.path.roundrect.closed.worker.js | 29 + .../path-objects/2d.path.roundrect.end.1.html | 34 + .../path-objects/2d.path.roundrect.end.1.worker.js | 29 + .../path-objects/2d.path.roundrect.end.2.html | 39 + .../path-objects/2d.path.roundrect.end.2.worker.js | 34 + .../path-objects/2d.path.roundrect.end.3.html | 37 + .../path-objects/2d.path.roundrect.end.3.worker.js | 32 + .../path-objects/2d.path.roundrect.end.4.html | 37 + .../path-objects/2d.path.roundrect.end.4.worker.js | 32 + .../path-objects/2d.path.roundrect.negative.html | 45 + .../2d.path.roundrect.negative.worker.js | 40 + .../path-objects/2d.path.roundrect.newsubpath.html | 36 + .../2d.path.roundrect.newsubpath.worker.js | 31 + .../path-objects/2d.path.roundrect.nonfinite.html | 116 + .../2d.path.roundrect.nonfinite.worker.js | 111 + .../2d.path.roundrect.radius.intersecting.1.html | 40 + ....path.roundrect.radius.intersecting.1.worker.js | 35 + .../2d.path.roundrect.radius.intersecting.2.html | 40 + ....path.roundrect.radius.intersecting.2.worker.js | 35 + .../2d.path.roundrect.radius.negative.html | 32 + .../2d.path.roundrect.radius.negative.worker.js | 27 + .../2d.path.roundrect.radius.noargument.html | 50 + .../2d.path.roundrect.radius.noargument.worker.js | 45 + .../2d.path.roundrect.radius.none.html | 27 + .../2d.path.roundrect.radius.none.worker.js | 22 + .../2d.path.roundrect.radius.toomany.html | 27 + .../2d.path.roundrect.radius.toomany.worker.js | 22 + .../2d.path.roundrect.selfintersect.html | 34 + .../2d.path.roundrect.selfintersect.worker.js | 29 + .../path-objects/2d.path.roundrect.winding.html | 39 + .../2d.path.roundrect.winding.worker.js | 34 + .../path-objects/2d.path.roundrect.zero.1.html | 34 + .../2d.path.roundrect.zero.1.worker.js | 29 + .../path-objects/2d.path.roundrect.zero.2.html | 34 + .../2d.path.roundrect.zero.2.worker.js | 29 + .../path-objects/2d.path.roundrect.zero.3.html | 34 + .../2d.path.roundrect.zero.3.worker.js | 29 + .../path-objects/2d.path.roundrect.zero.4.html | 34 + .../2d.path.roundrect.zero.4.worker.js | 29 + .../path-objects/2d.path.roundrect.zero.5.html | 34 + .../2d.path.roundrect.zero.5.worker.js | 29 + .../path-objects/2d.path.roundrect.zero.6.html | 36 + .../2d.path.roundrect.zero.6.worker.js | 31 + .../path-objects/2d.path.stroke.empty.html | 40 + .../path-objects/2d.path.stroke.empty.worker.js | 35 + .../path-objects/2d.path.stroke.overlap.html | 38 + .../path-objects/2d.path.stroke.overlap.png | Bin 0 -> 205 bytes .../path-objects/2d.path.stroke.overlap.worker.js | 33 + .../path-objects/2d.path.stroke.prune.arc.html | 45 + .../2d.path.stroke.prune.arc.worker.js | 40 + .../path-objects/2d.path.stroke.prune.closed.html | 41 + .../2d.path.stroke.prune.closed.worker.js | 36 + .../path-objects/2d.path.stroke.prune.corner.html | 43 + .../2d.path.stroke.prune.corner.worker.js | 38 + .../path-objects/2d.path.stroke.prune.curve.html | 45 + .../2d.path.stroke.prune.curve.worker.js | 40 + .../path-objects/2d.path.stroke.prune.line.html | 40 + .../2d.path.stroke.prune.line.worker.js | 35 + .../path-objects/2d.path.stroke.prune.rect.html | 41 + .../2d.path.stroke.prune.rect.worker.js | 36 + .../path-objects/2d.path.stroke.scale1.html | 54 + .../path-objects/2d.path.stroke.scale1.worker.js | 49 + .../path-objects/2d.path.stroke.scale2.html | 56 + .../path-objects/2d.path.stroke.scale2.worker.js | 51 + .../path-objects/2d.path.stroke.skew.html | 70 + .../path-objects/2d.path.stroke.skew.worker.js | 65 + .../path-objects/2d.path.stroke.unaffected.html | 42 + .../2d.path.stroke.unaffected.worker.js | 37 + .../path-objects/2d.path.stroke.union.html | 38 + .../path-objects/2d.path.stroke.union.worker.js | 33 + .../path-objects/2d.path.transformation.basic.html | 36 + .../2d.path.transformation.basic.worker.js | 31 + .../2d.path.transformation.changing.html | 42 + .../2d.path.transformation.changing.worker.js | 37 + .../2d.path.transformation.multiple.html | 47 + .../2d.path.transformation.multiple.worker.js | 42 + .../2d.imageData.create1.basic.html | 27 + .../2d.imageData.create1.basic.worker.js | 22 + .../2d.imageData.create1.initial.html | 38 + .../2d.imageData.create1.initial.worker.js | 33 + .../2d.imageData.create1.zero.html | 27 + .../2d.imageData.create1.zero.worker.js | 22 + .../2d.imageData.create2.basic.html | 27 + .../2d.imageData.create2.basic.worker.js | 22 + .../2d.imageData.create2.double.html | 32 + .../2d.imageData.create2.double.worker.js | 27 + .../2d.imageData.create2.initial.html | 35 + .../2d.imageData.create2.initial.worker.js | 30 + .../2d.imageData.create2.large.html | 35 + .../2d.imageData.create2.large.worker.js | 30 + .../2d.imageData.create2.negative.html | 33 + .../2d.imageData.create2.negative.worker.js | 28 + .../2d.imageData.create2.nonfinite.html | 43 + .../2d.imageData.create2.nonfinite.worker.js | 38 + .../2d.imageData.create2.round.html | 30 + .../2d.imageData.create2.round.worker.js | 25 + .../2d.imageData.create2.zero.html | 31 + .../2d.imageData.create2.zero.worker.js | 26 + .../pixel-manipulation/2d.imageData.get.basic.html | 27 + .../2d.imageData.get.basic.worker.js | 22 + .../pixel-manipulation/2d.imageData.get.clamp.html | 38 + .../2d.imageData.get.clamp.worker.js | 33 + .../2d.imageData.get.double.html | 32 + .../2d.imageData.get.double.worker.js | 27 + .../2d.imageData.get.invalid.html | 45 + .../2d.imageData.get.invalid.worker.js | 40 + .../2d.imageData.get.large.crash.html | 27 + .../2d.imageData.get.large.crash.worker.js | 22 + .../2d.imageData.get.length.html | 28 + .../2d.imageData.get.length.worker.js | 23 + .../2d.imageData.get.nonfinite.html | 75 + .../2d.imageData.get.nonfinite.worker.js | 70 + .../2d.imageData.get.nonpremul.html | 34 + .../2d.imageData.get.nonpremul.worker.js | 29 + .../2d.imageData.get.order.alpha.html | 31 + .../2d.imageData.get.order.alpha.worker.js | 26 + .../2d.imageData.get.order.cols.html | 34 + .../2d.imageData.get.order.cols.worker.js | 29 + .../2d.imageData.get.order.rgb.html | 37 + .../2d.imageData.get.order.rgb.worker.js | 32 + .../2d.imageData.get.order.rows.html | 34 + .../2d.imageData.get.order.rows.worker.js | 29 + .../pixel-manipulation/2d.imageData.get.range.html | 34 + .../2d.imageData.get.range.worker.js | 29 + .../2d.imageData.get.rounding.html | 45 + .../2d.imageData.get.rounding.worker.js | 40 + .../2d.imageData.get.source.negative.html | 46 + .../2d.imageData.get.source.negative.worker.js | 41 + .../2d.imageData.get.source.outside.html | 86 + .../2d.imageData.get.source.outside.worker.js | 81 + .../2d.imageData.get.source.size.html | 30 + .../2d.imageData.get.source.size.worker.js | 25 + .../2d.imageData.get.unaffected.html | 42 + .../2d.imageData.get.unaffected.worker.js | 37 + .../pixel-manipulation/2d.imageData.get.zero.html | 33 + .../2d.imageData.get.zero.worker.js | 28 + .../2d.imageData.object.clamp.html | 55 + .../2d.imageData.object.clamp.worker.js | 50 + .../2d.imageData.object.nan.html | 33 + .../2d.imageData.object.nan.worker.js | 28 + .../2d.imageData.object.properties.html | 30 + .../2d.imageData.object.properties.worker.js | 25 + .../2d.imageData.object.readonly.html | 40 + .../2d.imageData.object.readonly.worker.js | 35 + .../2d.imageData.object.round.html | 55 + .../2d.imageData.object.round.worker.js | 50 + .../2d.imageData.object.set.html | 31 + .../2d.imageData.object.set.worker.js | 26 + .../2d.imageData.object.string.html | 36 + .../2d.imageData.object.string.worker.js | 31 + .../2d.imageData.object.undefined.html | 30 + .../2d.imageData.object.undefined.worker.js | 25 + .../pixel-manipulation/2d.imageData.put.alpha.html | 33 + .../pixel-manipulation/2d.imageData.put.alpha.png | Bin 0 -> 221 bytes .../2d.imageData.put.alpha.worker.js | 28 + .../pixel-manipulation/2d.imageData.put.basic.html | 33 + .../2d.imageData.put.basic.worker.js | 28 + .../pixel-manipulation/2d.imageData.put.clip.html | 37 + .../2d.imageData.put.clip.worker.js | 32 + .../2d.imageData.put.created.html | 37 + .../2d.imageData.put.created.worker.js | 32 + .../pixel-manipulation/2d.imageData.put.cross.html | 35 + .../2d.imageData.put.cross.worker.js | 30 + .../2d.imageData.put.dirty.negative.html | 44 + .../2d.imageData.put.dirty.negative.worker.js | 39 + .../2d.imageData.put.dirty.outside.html | 46 + .../2d.imageData.put.dirty.outside.worker.js | 41 + .../2d.imageData.put.dirty.rect1.html | 44 + .../2d.imageData.put.dirty.rect1.worker.js | 39 + .../2d.imageData.put.dirty.rect2.html | 44 + .../2d.imageData.put.dirty.rect2.worker.js | 39 + .../2d.imageData.put.dirty.zero.html | 33 + .../2d.imageData.put.dirty.zero.worker.js | 28 + .../2d.imageData.put.modified.html | 38 + .../2d.imageData.put.modified.worker.js | 33 + .../2d.imageData.put.nonfinite.html | 109 + .../2d.imageData.put.nonfinite.worker.js | 104 + .../pixel-manipulation/2d.imageData.put.null.html | 27 + .../2d.imageData.put.null.worker.js | 22 + .../pixel-manipulation/2d.imageData.put.path.html | 34 + .../2d.imageData.put.path.worker.js | 29 + .../2d.imageData.put.unaffected.html | 39 + .../2d.imageData.put.unaffected.worker.js | 34 + .../2d.imageData.put.unchanged.html | 44 + .../2d.imageData.put.unchanged.worker.js | 39 + .../2d.imageData.put.wrongtype.html | 30 + .../2d.imageData.put.wrongtype.worker.js | 25 + .../canvas/offscreen/reset/2d.reset.basic.html | 36 + .../offscreen/reset/2d.reset.basic.worker.js | 31 + .../2d.reset.render.drop_shadow-expected.html | 14 + .../reset/2d.reset.render.drop_shadow.html | 25 + .../reset/2d.reset.render.drop_shadow.w.html | 39 + ...render.global_composite_operation-expected.html | 15 + ...2d.reset.render.global_composite_operation.html | 23 + ....reset.render.global_composite_operation.w.html | 37 + .../reset/2d.reset.render.line-expected.html | 19 + .../offscreen/reset/2d.reset.render.line.html | 31 + .../offscreen/reset/2d.reset.render.line.w.html | 45 + .../reset/2d.reset.render.misc-expected.html | 15 + .../offscreen/reset/2d.reset.render.misc.html | 26 + .../offscreen/reset/2d.reset.render.misc.w.html | 40 + .../2d.reset.render.miter_limit-expected.html | 22 + .../reset/2d.reset.render.miter_limit.html | 30 + .../reset/2d.reset.render.miter_limit.w.html | 44 + .../reset/2d.reset.render.text-expected.html | 14 + .../offscreen/reset/2d.reset.render.text.html | 31 + .../offscreen/reset/2d.reset.render.text.w.html | 45 + .../reset/2d.reset.state.clip-expected.html | 14 + .../offscreen/reset/2d.reset.state.clip.html | 26 + .../offscreen/reset/2d.reset.state.clip.w.html | 40 + .../offscreen/reset/2d.reset.state.direction.html | 33 + .../reset/2d.reset.state.direction.worker.js | 28 + .../offscreen/reset/2d.reset.state.fill_style.html | 33 + .../reset/2d.reset.state.fill_style.worker.js | 28 + .../offscreen/reset/2d.reset.state.filter.html | 33 + .../reset/2d.reset.state.filter.worker.js | 28 + .../offscreen/reset/2d.reset.state.font.html | 33 + .../offscreen/reset/2d.reset.state.font.worker.js | 28 + .../reset/2d.reset.state.font_kerning.html | 33 + .../reset/2d.reset.state.font_kerning.worker.js | 28 + .../reset/2d.reset.state.font_stretch.html | 33 + .../reset/2d.reset.state.font_stretch.worker.js | 28 + .../reset/2d.reset.state.font_variant_caps.html | 33 + .../2d.reset.state.font_variant_caps.worker.js | 28 + .../reset/2d.reset.state.global_alpha.html | 33 + .../reset/2d.reset.state.global_alpha.worker.js | 28 + .../2d.reset.state.global_composite_operation.html | 33 + ...eset.state.global_composite_operation.worker.js | 28 + .../2d.reset.state.image_smoothing_enabled.html | 33 + ...d.reset.state.image_smoothing_enabled.worker.js | 28 + .../2d.reset.state.image_smoothing_quality.html | 33 + ...d.reset.state.image_smoothing_quality.worker.js | 28 + .../reset/2d.reset.state.letter_spacing.html | 33 + .../reset/2d.reset.state.letter_spacing.worker.js | 28 + .../offscreen/reset/2d.reset.state.line_cap.html | 33 + .../reset/2d.reset.state.line_cap.worker.js | 28 + .../offscreen/reset/2d.reset.state.line_dash.html | 30 + .../reset/2d.reset.state.line_dash.worker.js | 25 + .../reset/2d.reset.state.line_dash_offset.html | 33 + .../2d.reset.state.line_dash_offset.worker.js | 28 + .../offscreen/reset/2d.reset.state.line_join.html | 33 + .../reset/2d.reset.state.line_join.worker.js | 28 + .../offscreen/reset/2d.reset.state.line_width.html | 33 + .../reset/2d.reset.state.line_width.worker.js | 28 + .../reset/2d.reset.state.miter_limit.html | 33 + .../reset/2d.reset.state.miter_limit.worker.js | 28 + .../reset/2d.reset.state.shadow_blur.html | 33 + .../reset/2d.reset.state.shadow_blur.worker.js | 28 + .../reset/2d.reset.state.shadow_color.html | 33 + .../reset/2d.reset.state.shadow_color.worker.js | 28 + .../reset/2d.reset.state.shadow_offset_x.html | 33 + .../reset/2d.reset.state.shadow_offset_x.worker.js | 28 + .../reset/2d.reset.state.shadow_offset_y.html | 33 + .../reset/2d.reset.state.shadow_offset_y.worker.js | 28 + .../reset/2d.reset.state.stroke_style.html | 33 + .../reset/2d.reset.state.stroke_style.worker.js | 28 + .../offscreen/reset/2d.reset.state.text_align.html | 33 + .../reset/2d.reset.state.text_align.worker.js | 28 + .../reset/2d.reset.state.text_baseline.html | 33 + .../reset/2d.reset.state.text_baseline.worker.js | 28 + .../reset/2d.reset.state.text_rendering.html | 33 + .../reset/2d.reset.state.text_rendering.worker.js | 28 + .../2d.reset.state.transformation_matrix.html | 30 + .../2d.reset.state.transformation_matrix.worker.js | 25 + .../reset/2d.reset.state.word_spacing.html | 33 + .../reset/2d.reset.state.word_spacing.worker.js | 28 + .../set-proprietary-font-names-001-crash.html | 13 + .../offscreen/shadows/2d.shadow.alpha.1.html | 33 + .../offscreen/shadows/2d.shadow.alpha.1.worker.js | 28 + .../offscreen/shadows/2d.shadow.alpha.2.html | 33 + .../canvas/offscreen/shadows/2d.shadow.alpha.2.png | Bin 0 -> 206 bytes .../offscreen/shadows/2d.shadow.alpha.2.worker.js | 28 + .../offscreen/shadows/2d.shadow.alpha.3.html | 35 + .../canvas/offscreen/shadows/2d.shadow.alpha.3.png | Bin 0 -> 206 bytes .../offscreen/shadows/2d.shadow.alpha.3.worker.js | 30 + .../offscreen/shadows/2d.shadow.alpha.4.html | 35 + .../canvas/offscreen/shadows/2d.shadow.alpha.4.png | Bin 0 -> 206 bytes .../offscreen/shadows/2d.shadow.alpha.4.worker.js | 30 + .../offscreen/shadows/2d.shadow.alpha.5.html | 34 + .../canvas/offscreen/shadows/2d.shadow.alpha.5.png | Bin 0 -> 206 bytes .../offscreen/shadows/2d.shadow.alpha.5.worker.js | 29 + .../2d.shadow.attributes.shadowBlur.initial.html | 27 + ....shadow.attributes.shadowBlur.initial.worker.js | 22 + .../2d.shadow.attributes.shadowBlur.invalid.html | 53 + ....shadow.attributes.shadowBlur.invalid.worker.js | 48 + .../2d.shadow.attributes.shadowBlur.valid.html | 37 + ...2d.shadow.attributes.shadowBlur.valid.worker.js | 32 + .../2d.shadow.attributes.shadowColor.initial.html | 27 + ...shadow.attributes.shadowColor.initial.worker.js | 22 + .../2d.shadow.attributes.shadowColor.invalid.html | 41 + ...shadow.attributes.shadowColor.invalid.worker.js | 36 + .../2d.shadow.attributes.shadowColor.valid.html | 31 + ...d.shadow.attributes.shadowColor.valid.worker.js | 26 + .../2d.shadow.attributes.shadowOffset.initial.html | 28 + ...hadow.attributes.shadowOffset.initial.worker.js | 23 + .../2d.shadow.attributes.shadowOffset.invalid.html | 67 + ...hadow.attributes.shadowOffset.invalid.worker.js | 62 + .../2d.shadow.attributes.shadowOffset.valid.html | 50 + ....shadow.attributes.shadowOffset.valid.worker.js | 45 + .../shadows/2d.shadow.blur.high-manual.html | 32 + .../shadows/2d.shadow.blur.high-manual.worker.js | 27 + .../offscreen/shadows/2d.shadow.blur.high.png | Bin 0 -> 246 bytes .../shadows/2d.shadow.blur.low-manual.html | 39 + .../shadows/2d.shadow.blur.low-manual.worker.js | 34 + .../offscreen/shadows/2d.shadow.blur.low.png | Bin 0 -> 1586 bytes .../offscreen/shadows/2d.shadow.canvas.alpha.html | 38 + .../offscreen/shadows/2d.shadow.canvas.alpha.png | Bin 0 -> 206 bytes .../shadows/2d.shadow.canvas.alpha.worker.js | 33 + .../offscreen/shadows/2d.shadow.canvas.basic.html | 38 + .../shadows/2d.shadow.canvas.basic.worker.js | 33 + .../shadows/2d.shadow.canvas.transparent.1.html | 36 + .../2d.shadow.canvas.transparent.1.worker.js | 31 + .../shadows/2d.shadow.canvas.transparent.2.html | 44 + .../2d.shadow.canvas.transparent.2.worker.js | 39 + .../canvas/offscreen/shadows/2d.shadow.clip.1.html | 42 + .../offscreen/shadows/2d.shadow.clip.1.worker.js | 37 + .../canvas/offscreen/shadows/2d.shadow.clip.2.html | 42 + .../offscreen/shadows/2d.shadow.clip.2.worker.js | 37 + .../canvas/offscreen/shadows/2d.shadow.clip.3.html | 43 + .../offscreen/shadows/2d.shadow.clip.3.worker.js | 38 + .../offscreen/shadows/2d.shadow.composite.1.html | 35 + .../shadows/2d.shadow.composite.1.worker.js | 30 + .../offscreen/shadows/2d.shadow.composite.2.html | 35 + .../shadows/2d.shadow.composite.2.worker.js | 30 + .../offscreen/shadows/2d.shadow.composite.3.html | 36 + .../shadows/2d.shadow.composite.3.worker.js | 31 + .../offscreen/shadows/2d.shadow.enable.blur.html | 32 + .../shadows/2d.shadow.enable.blur.worker.js | 27 + .../offscreen/shadows/2d.shadow.enable.off.1.html | 30 + .../shadows/2d.shadow.enable.off.1.worker.js | 25 + .../offscreen/shadows/2d.shadow.enable.off.2.html | 31 + .../shadows/2d.shadow.enable.off.2.worker.js | 26 + .../offscreen/shadows/2d.shadow.enable.x.html | 32 + .../offscreen/shadows/2d.shadow.enable.x.worker.js | 27 + .../offscreen/shadows/2d.shadow.enable.y.html | 32 + .../offscreen/shadows/2d.shadow.enable.y.worker.js | 27 + .../shadows/2d.shadow.gradient.alpha.html | 37 + .../offscreen/shadows/2d.shadow.gradient.alpha.png | Bin 0 -> 206 bytes .../shadows/2d.shadow.gradient.alpha.worker.js | 32 + .../shadows/2d.shadow.gradient.basic.html | 37 + .../shadows/2d.shadow.gradient.basic.worker.js | 32 + .../shadows/2d.shadow.gradient.transparent.1.html | 37 + .../2d.shadow.gradient.transparent.1.worker.js | 32 + .../shadows/2d.shadow.gradient.transparent.2.html | 43 + .../2d.shadow.gradient.transparent.2.worker.js | 38 + .../offscreen/shadows/2d.shadow.image.alpha.html | 30 + .../offscreen/shadows/2d.shadow.image.alpha.png | Bin 0 -> 206 bytes .../shadows/2d.shadow.image.alpha.worker.js | 26 + .../offscreen/shadows/2d.shadow.image.basic.html | 30 + .../shadows/2d.shadow.image.basic.worker.js | 26 + .../offscreen/shadows/2d.shadow.image.scale.html | 32 + .../shadows/2d.shadow.image.scale.worker.js | 28 + .../offscreen/shadows/2d.shadow.image.section.html | 32 + .../shadows/2d.shadow.image.section.worker.js | 28 + .../shadows/2d.shadow.image.transparent.1.html | 30 + .../2d.shadow.image.transparent.1.worker.js | 26 + .../shadows/2d.shadow.image.transparent.2.html | 36 + .../2d.shadow.image.transparent.2.worker.js | 32 + .../shadows/2d.shadow.offset.negativeX.html | 34 + .../shadows/2d.shadow.offset.negativeX.worker.js | 29 + .../shadows/2d.shadow.offset.negativeY.html | 34 + .../shadows/2d.shadow.offset.negativeY.worker.js | 29 + .../shadows/2d.shadow.offset.positiveX.html | 34 + .../shadows/2d.shadow.offset.positiveX.worker.js | 29 + .../shadows/2d.shadow.offset.positiveY.html | 34 + .../shadows/2d.shadow.offset.positiveY.worker.js | 29 + .../offscreen/shadows/2d.shadow.outside.html | 42 + .../offscreen/shadows/2d.shadow.outside.worker.js | 37 + .../offscreen/shadows/2d.shadow.pattern.alpha.html | 32 + .../offscreen/shadows/2d.shadow.pattern.alpha.png | Bin 0 -> 206 bytes .../shadows/2d.shadow.pattern.alpha.worker.js | 28 + .../offscreen/shadows/2d.shadow.pattern.basic.html | 32 + .../shadows/2d.shadow.pattern.basic.worker.js | 28 + .../shadows/2d.shadow.pattern.transparent.1.html | 32 + .../2d.shadow.pattern.transparent.1.worker.js | 28 + .../shadows/2d.shadow.pattern.transparent.2.html | 36 + .../2d.shadow.pattern.transparent.2.worker.js | 32 + .../offscreen/shadows/2d.shadow.stroke.basic.html | 40 + .../shadows/2d.shadow.stroke.basic.worker.js | 35 + .../offscreen/shadows/2d.shadow.stroke.cap.1.html | 43 + .../shadows/2d.shadow.stroke.cap.1.worker.js | 38 + .../offscreen/shadows/2d.shadow.stroke.cap.2.html | 41 + .../shadows/2d.shadow.stroke.cap.2.worker.js | 36 + .../offscreen/shadows/2d.shadow.stroke.join.1.html | 43 + .../shadows/2d.shadow.stroke.join.1.worker.js | 38 + .../offscreen/shadows/2d.shadow.stroke.join.2.html | 45 + .../shadows/2d.shadow.stroke.join.2.worker.js | 40 + .../offscreen/shadows/2d.shadow.stroke.join.3.html | 44 + .../shadows/2d.shadow.stroke.join.3.worker.js | 39 + .../offscreen/shadows/2d.shadow.transform.1.html | 34 + .../shadows/2d.shadow.transform.1.worker.js | 29 + .../offscreen/shadows/2d.shadow.transform.2.html | 34 + .../shadows/2d.shadow.transform.2.worker.js | 29 + .../offscreen/text/2d.text.align.default.html | 27 + .../offscreen/text/2d.text.align.default.worker.js | 22 + .../offscreen/text/2d.text.align.invalid.html | 41 + .../offscreen/text/2d.text.align.invalid.worker.js | 36 + .../canvas/offscreen/text/2d.text.align.valid.html | 40 + .../offscreen/text/2d.text.align.valid.worker.js | 35 + .../offscreen/text/2d.text.baseline.default.html | 27 + .../text/2d.text.baseline.default.worker.js | 22 + .../offscreen/text/2d.text.baseline.invalid.html | 41 + .../text/2d.text.baseline.invalid.worker.js | 36 + .../offscreen/text/2d.text.baseline.valid.html | 43 + .../text/2d.text.baseline.valid.worker.js | 38 + .../offscreen/text/2d.text.draw.align.center.html | 36 + .../text/2d.text.draw.align.center.worker.js | 32 + .../offscreen/text/2d.text.draw.align.end.ltr.html | 37 + .../text/2d.text.draw.align.end.ltr.worker.js | 33 + .../offscreen/text/2d.text.draw.align.end.rtl.html | 37 + .../text/2d.text.draw.align.end.rtl.worker.js | 33 + .../offscreen/text/2d.text.draw.align.left.html | 36 + .../text/2d.text.draw.align.left.worker.js | 32 + .../offscreen/text/2d.text.draw.align.right.html | 36 + .../text/2d.text.draw.align.right.worker.js | 32 + .../text/2d.text.draw.align.start.ltr.html | 37 + .../text/2d.text.draw.align.start.ltr.worker.js | 33 + .../text/2d.text.draw.align.start.rtl.html | 37 + .../text/2d.text.draw.align.start.rtl.worker.js | 33 + .../text/2d.text.draw.baseline.alphabetic.html | 36 + .../2d.text.draw.baseline.alphabetic.worker.js | 32 + .../text/2d.text.draw.baseline.bottom.html | 36 + .../text/2d.text.draw.baseline.bottom.worker.js | 32 + .../text/2d.text.draw.baseline.hanging.html | 36 + .../text/2d.text.draw.baseline.hanging.worker.js | 32 + .../text/2d.text.draw.baseline.ideographic.html | 36 + .../2d.text.draw.baseline.ideographic.worker.js | 32 + .../text/2d.text.draw.baseline.middle.html | 36 + .../text/2d.text.draw.baseline.middle.worker.js | 32 + .../offscreen/text/2d.text.draw.baseline.top.html | 36 + .../text/2d.text.draw.baseline.top.worker.js | 32 + .../text/2d.text.draw.fill.basic-manual.html | 32 + .../text/2d.text.draw.fill.basic-manual.worker.js | 27 + .../offscreen/text/2d.text.draw.fill.basic.png | Bin 0 -> 1137 bytes .../text/2d.text.draw.fill.maxWidth.NaN.html | 32 + .../text/2d.text.draw.fill.maxWidth.NaN.worker.js | 27 + .../text/2d.text.draw.fill.maxWidth.bound.html | 33 + .../2d.text.draw.fill.maxWidth.bound.worker.js | 29 + .../text/2d.text.draw.fill.maxWidth.fontface.html | 33 + .../2d.text.draw.fill.maxWidth.fontface.worker.js | 29 + .../2d.text.draw.fill.maxWidth.large-manual.html | 31 + ....text.draw.fill.maxWidth.large-manual.worker.js | 26 + .../text/2d.text.draw.fill.maxWidth.large.png | Bin 0 -> 1137 bytes .../text/2d.text.draw.fill.maxWidth.negative.html | 32 + .../2d.text.draw.fill.maxWidth.negative.worker.js | 27 + .../text/2d.text.draw.fill.maxWidth.small.html | 32 + .../2d.text.draw.fill.maxWidth.small.worker.js | 27 + .../text/2d.text.draw.fill.maxWidth.zero.html | 32 + .../text/2d.text.draw.fill.maxWidth.zero.worker.js | 27 + .../text/2d.text.draw.fill.rtl-manual.html | 32 + .../text/2d.text.draw.fill.rtl-manual.worker.js | 27 + .../offscreen/text/2d.text.draw.fill.rtl.png | Bin 0 -> 1137 bytes .../text/2d.text.draw.fill.unaffected.html | 42 + .../text/2d.text.draw.fill.unaffected.worker.js | 37 + .../offscreen/text/2d.text.draw.fontface.html | 33 + .../text/2d.text.draw.fontface.notinpage.html | 33 + .../text/2d.text.draw.fontface.notinpage.worker.js | 29 + .../text/2d.text.draw.fontface.repeat.html | 36 + .../text/2d.text.draw.fontface.repeat.worker.js | 32 + .../offscreen/text/2d.text.draw.fontface.worker.js | 29 + .../text/2d.text.draw.kern.consistent-manual.html | 36 + .../2d.text.draw.kern.consistent-manual.worker.js | 31 + .../offscreen/text/2d.text.draw.space.basic.html | 31 + .../text/2d.text.draw.space.basic.worker.js | 27 + .../text/2d.text.draw.space.collapse.end.html | 32 + .../text/2d.text.draw.space.collapse.end.worker.js | 28 + .../text/2d.text.draw.space.collapse.nonspace.html | 31 + .../2d.text.draw.space.collapse.nonspace.worker.js | 27 + .../text/2d.text.draw.space.collapse.other.html | 31 + .../2d.text.draw.space.collapse.other.worker.js | 27 + .../text/2d.text.draw.space.collapse.space.html | 31 + .../2d.text.draw.space.collapse.space.worker.js | 27 + .../text/2d.text.draw.space.collapse.start.html | 31 + .../2d.text.draw.space.collapse.start.worker.js | 27 + .../text/2d.text.draw.stroke.basic-manual.html | 33 + .../2d.text.draw.stroke.basic-manual.worker.js | 28 + .../offscreen/text/2d.text.draw.stroke.basic.png | Bin 0 -> 1634 bytes .../text/2d.text.draw.stroke.unaffected.html | 43 + .../text/2d.text.draw.stroke.unaffected.worker.js | 38 + .../2d.text.drawing.style.absolute.spacing.html | 46 + ...d.text.drawing.style.absolute.spacing.worker.js | 41 + ...d.text.drawing.style.font-relative.spacing.html | 38 + ...t.drawing.style.font-relative.spacing.worker.js | 33 + .../text/2d.text.drawing.style.fontKerning.html | 34 + ...t.drawing.style.fontKerning.with.uppercase.html | 58 + ...wing.style.fontKerning.with.uppercase.worker.js | 53 + .../2d.text.drawing.style.fontKerning.worker.js | 29 + ...2d.text.drawing.style.fontStretch.settings.html | 82 + ...xt.drawing.style.fontStretch.settings.worker.js | 77 + ...2d.text.drawing.style.fontVariant.settings.html | 79 + ...xt.drawing.style.fontVariant.settings.worker.js | 74 + .../2d.text.drawing.style.invalid.spacing.html | 43 + ...2d.text.drawing.style.invalid.spacing.worker.js | 38 + ...xt.drawing.style.letterSpacing.change.font.html | 46 + ...awing.style.letterSpacing.change.font.worker.js | 41 + ...d.text.drawing.style.letterSpacing.measure.html | 55 + ...t.drawing.style.letterSpacing.measure.worker.js | 50 + .../2d.text.drawing.style.measure.direction.html | 33 + ....text.drawing.style.measure.direction.worker.js | 28 + .../2d.text.drawing.style.measure.rtl.text.html | 31 + ...d.text.drawing.style.measure.rtl.text.worker.js | 26 + .../2d.text.drawing.style.measure.textAlign.html | 33 + ....text.drawing.style.measure.textAlign.worker.js | 28 + .../2d.text.drawing.style.nonfinite.spacing.html | 38 + ....text.drawing.style.nonfinite.spacing.worker.js | 33 + ....text.drawing.style.textRendering.settings.html | 81 + ....drawing.style.textRendering.settings.worker.js | 76 + ...text.drawing.style.wordSpacing.change.font.html | 46 + ...drawing.style.wordSpacing.change.font.worker.js | 41 + .../2d.text.drawing.style.wordSpacing.measure.html | 55 + ...ext.drawing.style.wordSpacing.measure.worker.js | 50 + .../offscreen/text/2d.text.font.default.html | 27 + .../offscreen/text/2d.text.font.default.worker.js | 22 + .../offscreen/text/2d.text.font.parse.basic.html | 31 + .../text/2d.text.font.parse.basic.worker.js | 26 + .../offscreen/text/2d.text.font.parse.complex.html | 28 + .../text/2d.text.font.parse.complex.worker.js | 23 + .../text/2d.text.font.parse.complex2.html | 28 + .../text/2d.text.font.parse.complex2.worker.js | 23 + .../offscreen/text/2d.text.font.parse.family.html | 28 + .../text/2d.text.font.parse.family.worker.js | 23 + .../offscreen/text/2d.text.font.parse.invalid.html | 72 + .../text/2d.text.font.parse.invalid.worker.js | 67 + .../offscreen/text/2d.text.font.parse.system.html | 28 + .../text/2d.text.font.parse.system.worker.js | 23 + .../offscreen/text/2d.text.font.parse.tiny.html | 28 + .../text/2d.text.font.parse.tiny.worker.js | 23 + .../offscreen/text/2d.text.font.relative_size.html | 28 + .../text/2d.text.font.relative_size.worker.js | 23 + .../canvas/offscreen/text/2d.text.font.weight.html | 31 + .../offscreen/text/2d.text.font.weight.worker.js | 26 + .../text/2d.text.fontVariantCaps1-expected.html | 15 + .../offscreen/text/2d.text.fontVariantCaps1.html | 21 + .../offscreen/text/2d.text.fontVariantCaps1.w.html | 35 + .../text/2d.text.fontVariantCaps2-unexpected.html | 16 + .../offscreen/text/2d.text.fontVariantCaps2.html | 33 + .../text/2d.text.fontVariantCaps2.worker.js | 28 + .../text/2d.text.fontVariantCaps3-expected.html | 15 + .../offscreen/text/2d.text.fontVariantCaps3.html | 22 + .../offscreen/text/2d.text.fontVariantCaps3.w.html | 36 + .../text/2d.text.fontVariantCaps4-expected.html | 15 + .../offscreen/text/2d.text.fontVariantCaps4.html | 22 + .../offscreen/text/2d.text.fontVariantCaps4.w.html | 36 + .../text/2d.text.fontVariantCaps5-expected.html | 15 + .../offscreen/text/2d.text.fontVariantCaps5.html | 22 + .../offscreen/text/2d.text.fontVariantCaps5.w.html | 36 + .../text/2d.text.fontVariantCaps6-expected.html | 15 + .../offscreen/text/2d.text.fontVariantCaps6.html | 22 + .../offscreen/text/2d.text.fontVariantCaps6.w.html | 36 + .../text/2d.text.measure.actualBoundingBox.html | 50 + .../2d.text.measure.actualBoundingBox.worker.js | 46 + .../offscreen/text/2d.text.measure.advances.html | 41 + .../text/2d.text.measure.advances.worker.js | 37 + .../offscreen/text/2d.text.measure.baselines.html | 34 + .../text/2d.text.measure.baselines.worker.js | 30 + .../text/2d.text.measure.emHeights-low-ascent.html | 34 + .../2d.text.measure.emHeights-low-ascent.worker.js | 30 + .../2d.text.measure.emHeights-zero-descent.html | 34 + ...d.text.measure.emHeights-zero-descent.worker.js | 30 + .../offscreen/text/2d.text.measure.emHeights.html | 34 + .../text/2d.text.measure.emHeights.worker.js | 30 + ...ext.measure.fontBoundingBox-reduced-ascent.html | 32 + ...easure.fontBoundingBox-reduced-ascent.worker.js | 28 + ....text.measure.fontBoundingBox-zero-descent.html | 32 + ....measure.fontBoundingBox-zero-descent.worker.js | 28 + .../text/2d.text.measure.fontBoundingBox.ahem.html | 31 + .../2d.text.measure.fontBoundingBox.ahem.worker.js | 27 + .../text/2d.text.measure.fontBoundingBox.html | 32 + .../text/2d.text.measure.fontBoundingBox.worker.js | 28 + .../text/2d.text.measure.width.basic.html | 31 + .../text/2d.text.measure.width.basic.worker.js | 27 + .../text/2d.text.measure.width.empty.html | 26 + .../text/2d.text.measure.width.empty.worker.js | 22 + .../text/2d.text.measure.width.space.html | 32 + .../text/2d.text.measure.width.space.worker.js | 28 + .../offscreen/text/2d.text.setFont.mathFont.html | 27 + .../text/2d.text.setFont.mathFont.worker.js | 22 + .../offscreen/text/canvas.2d.fontStretch-ref.html | 19 + .../text/canvas.2d.fontStretch.condensed.html | 30 + .../text/canvas.2d.fontStretch.expanded.html | 30 + .../canvas.2d.fontStretch.extra-condensed.html | 30 + .../text/canvas.2d.fontStretch.extra-expanded.html | 30 + .../text/canvas.2d.fontStretch.normal.html | 33 + .../text/canvas.2d.fontStretch.semi-condensed.html | 30 + .../text/canvas.2d.fontStretch.semi-expanded.html | 30 + .../canvas.2d.fontStretch.ultra-condensed.html | 30 + .../text/canvas.2d.fontStretch.ultra-expanded.html | 30 + .../2d.state.saverestore.bitmap.html | 33 + .../2d.state.saverestore.bitmap.worker.js | 28 + .../2d.state.saverestore.clip.html | 35 + .../2d.state.saverestore.clip.worker.js | 30 + .../2d.state.saverestore.fillStyle.html | 41 + .../2d.state.saverestore.fillStyle.worker.js | 36 + .../2d.state.saverestore.globalAlpha.html | 41 + .../2d.state.saverestore.globalAlpha.worker.js | 36 + ...state.saverestore.globalCompositeOperation.html | 41 + ....saverestore.globalCompositeOperation.worker.js | 36 + .../2d.state.saverestore.lineCap.html | 41 + .../2d.state.saverestore.lineCap.worker.js | 36 + .../2d.state.saverestore.lineJoin.html | 41 + .../2d.state.saverestore.lineJoin.worker.js | 36 + .../2d.state.saverestore.lineWidth.html | 41 + .../2d.state.saverestore.lineWidth.worker.js | 36 + .../2d.state.saverestore.miterLimit.html | 41 + .../2d.state.saverestore.miterLimit.worker.js | 36 + .../2d.state.saverestore.path.html | 34 + .../2d.state.saverestore.path.worker.js | 29 + .../2d.state.saverestore.shadowBlur.html | 41 + .../2d.state.saverestore.shadowBlur.worker.js | 36 + .../2d.state.saverestore.shadowColor.html | 41 + .../2d.state.saverestore.shadowColor.worker.js | 36 + .../2d.state.saverestore.shadowOffsetX.html | 41 + .../2d.state.saverestore.shadowOffsetX.worker.js | 36 + .../2d.state.saverestore.shadowOffsetY.html | 41 + .../2d.state.saverestore.shadowOffsetY.worker.js | 36 + .../2d.state.saverestore.stack.html | 36 + .../2d.state.saverestore.stack.worker.js | 31 + .../2d.state.saverestore.stackdepth.html | 37 + .../2d.state.saverestore.stackdepth.worker.js | 32 + .../2d.state.saverestore.strokeStyle.html | 41 + .../2d.state.saverestore.strokeStyle.worker.js | 36 + .../2d.state.saverestore.transformation.html | 34 + .../2d.state.saverestore.transformation.worker.js | 29 + .../2d.state.saverestore.underflow.html | 31 + .../2d.state.saverestore.underflow.worker.js | 26 + .../transformations/2d.transformation.order.html | 34 + .../2d.transformation.order.worker.js | 29 + .../2d.transformation.rotate.direction.html | 33 + .../2d.transformation.rotate.direction.worker.js | 28 + .../2d.transformation.rotate.nonfinite.html | 38 + .../2d.transformation.rotate.nonfinite.worker.js | 33 + .../2d.transformation.rotate.radians.html | 33 + .../2d.transformation.rotate.radians.worker.js | 28 + .../2d.transformation.rotate.wrap.html | 38 + .../2d.transformation.rotate.wrap.worker.js | 33 + .../2d.transformation.rotate.wrapnegative.html | 35 + ...2d.transformation.rotate.wrapnegative.worker.js | 30 + .../2d.transformation.rotate.zero.html | 33 + .../2d.transformation.rotate.zero.worker.js | 28 + .../2d.transformation.scale.basic.html | 33 + .../2d.transformation.scale.basic.worker.js | 28 + .../2d.transformation.scale.large.html | 33 + .../2d.transformation.scale.large.worker.js | 28 + .../2d.transformation.scale.multiple.html | 34 + .../2d.transformation.scale.multiple.worker.js | 29 + .../2d.transformation.scale.negative.html | 42 + .../2d.transformation.scale.negative.worker.js | 37 + .../2d.transformation.scale.nonfinite.html | 42 + .../2d.transformation.scale.nonfinite.worker.js | 37 + .../2d.transformation.scale.zero.html | 44 + .../2d.transformation.scale.zero.worker.js | 39 + .../2d.transformation.setTransform.multiple.html | 35 + ....transformation.setTransform.multiple.worker.js | 30 + .../2d.transformation.setTransform.nonfinite.html | 110 + ...transformation.setTransform.nonfinite.worker.js | 105 + .../2d.transformation.setTransform.skewed.html | 55 + ...2d.transformation.setTransform.skewed.worker.js | 50 + .../2d.transformation.transform.identity.html | 33 + .../2d.transformation.transform.identity.worker.js | 28 + .../2d.transformation.transform.multiply.html | 34 + .../2d.transformation.transform.multiply.worker.js | 29 + .../2d.transformation.transform.nonfinite.html | 110 + ...2d.transformation.transform.nonfinite.worker.js | 105 + .../2d.transformation.transform.skewed.html | 55 + .../2d.transformation.transform.skewed.worker.js | 50 + .../2d.transformation.translate.basic.html | 33 + .../2d.transformation.translate.basic.worker.js | 28 + .../2d.transformation.translate.nonfinite.html | 42 + ...2d.transformation.translate.nonfinite.worker.js | 37 + .../wide-gamut-canvas/2d.color.space.p3.to.p3.html | 39 + .../2d.color.space.p3.to.p3.worker.js | 34 + .../2d.color.space.p3.to.srgb.html | 38 + .../2d.color.space.p3.to.srgb.worker.js | 33 + .../tests/html/canvas/resources/2x2.png | Bin 0 -> 1575 bytes .../tests/html/canvas/resources/canvas-frame.css | 21 + .../html/canvas/resources/canvas-frame.css.headers | 1 + .../tests/html/canvas/resources/canvas-index.css | 31 + .../html/canvas/resources/canvas-index.css.headers | 1 + .../tests/html/canvas/resources/canvas-spec.css | 50 + .../html/canvas/resources/canvas-spec.css.headers | 1 + .../tests/html/canvas/resources/canvas-tests.css | 134 + .../html/canvas/resources/canvas-tests.css.headers | 1 + .../tests/html/canvas/resources/canvas-tests.js | 221 ++ .../html/canvas/resources/canvas-tests.js.headers | 1 + .../tests/html/canvas/tools/gentest.py | 18 + .../tests/html/canvas/tools/gentest_union.py | 3 + .../tests/html/canvas/tools/gentestutils.py | 369 +++ .../tests/html/canvas/tools/gentestutilsunion.py | 535 +++ .../tests/html/canvas/tools/name2dir-canvas.yaml | 26 + .../html/canvas/tools/name2dir-offscreen.yaml | 22 + .../tests/html/canvas/tools/name2dir.yaml | 25 + .../tests/html/canvas/tools/templates.yaml | 80 + .../tests/html/canvas/tools/templates/reftest.html | 14 + .../canvas/tools/templates/reftest_element.html | 34 + .../canvas/tools/templates/reftest_offscreen.html | 29 + .../canvas/tools/templates/reftest_worker.html | 37 + .../tools/templates/testharness_element.html | 68 + .../tools/templates/testharness_offscreen.html | 45 + .../canvas/tools/templates/testharness_worker.js | 35 + .../html/canvas/tools/yaml-new/color_space.yaml | 319 ++ .../html/canvas/tools/yaml-new/compositing.yaml | 232 ++ .../tools/yaml-new/conformance_requirements.yaml | 178 + .../yaml-new/drawing-images-to-the-canvas.yaml | 640 ++++ .../yaml-new/drawing-rectangles-to-the-canvas.yaml | 469 +++ .../tools/yaml-new/fill-and-stroke-styles.yaml | 2104 ++++++++++++ .../tests/html/canvas/tools/yaml-new/filters.yaml | 680 ++++ .../tests/html/canvas/tools/yaml-new/layers.yaml | 1022 ++++++ .../html/canvas/tools/yaml-new/line-styles.yaml | 954 ++++++ .../html/canvas/tools/yaml-new/path-objects.yaml | 3403 ++++++++++++++++++++ .../canvas/tools/yaml-new/pixel-manipulation.yaml | 1042 ++++++ .../tests/html/canvas/tools/yaml-new/reset.yaml | 286 ++ .../tests/html/canvas/tools/yaml-new/scroll.yaml | 76 + .../tests/html/canvas/tools/yaml-new/shadows.yaml | 1090 +++++++ .../tests/html/canvas/tools/yaml-new/text.yaml | 1680 ++++++++++ .../canvas/tools/yaml-new/the-canvas-state.yaml | 89 + .../canvas/tools/yaml-new/transformations.yaml | 356 ++ .../tests/html/canvas/tools/yaml-new/video.yaml | 10 + .../tests/html/canvas/tools/yaml/element/meta.yaml | 539 ++++ .../tools/yaml/element/the-canvas-element.yaml | 143 + .../html/canvas/tools/yaml/offscreen/meta.yaml | 539 ++++ .../tools/yaml/offscreen/the-offscreen-canvas.yaml | 269 ++ 3913 files changed, 147059 insertions(+) create mode 100644 testing/web-platform/tests/html/canvas/META.yml create mode 100644 testing/web-platform/tests/html/canvas/README.md create mode 100644 testing/web-platform/tests/html/canvas/element/2d.conformance.requirements.basics.html create mode 100644 testing/web-platform/tests/html/canvas/element/2d.conformance.requirements.delete.html create mode 100644 testing/web-platform/tests/html/canvas/element/2d.conformance.requirements.drawings.html create mode 100644 testing/web-platform/tests/html/canvas/element/2d.conformance.requirements.missingargs.html create mode 100644 testing/web-platform/tests/html/canvas/element/2d.text-outside-of-the-flat-tree-ref.html create mode 100644 testing/web-platform/tests/html/canvas/element/2d.text-outside-of-the-flat-tree.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.exists.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.extraargs.cache.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.extraargs.create.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.invalid.args.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.prototype.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.shared.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.type.exists.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.type.extend.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.type.prototype.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.type.replace.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.unique.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.initial.reset.2dstate.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.readonly.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.reference.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.scaled-manual.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.scaled.png create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.decimal.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.decimal.png create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.em.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.em.png create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.empty.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.empty.png create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.exp.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.exp.png create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.hex.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.junk.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.junk.png create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.minus.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.minus.png create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.octal.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.octal.png create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.onlyspace.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.onlyspace.png create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.percent.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.percent.png create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.plus.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.plus.png create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.space.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.space.png create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.trailingjunk.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.trailingjunk.png create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.whitespace.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.whitespace.png create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.zero.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.decimal.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.decimal.png create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.em.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.em.png create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.empty.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.empty.png create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.exp.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.exp.png create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.hex.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.junk.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.junk.png create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.minus.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.minus.png create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.octal.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.octal.png create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.onlyspace.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.onlyspace.png create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.percent.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.percent.png create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.plus.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.plus.png create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.space.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.space.png create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.trailingjunk.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.trailingjunk.png create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.whitespace.html create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.whitespace.png create mode 100644 testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.zero.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.clear.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.clear.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.copy.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.copy.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-atop.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-atop.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-in.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-in.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-out.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-out.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-over.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-over.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.lighter.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.lighter.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-atop.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-atop.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-in.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-in.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-out.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-out.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-over.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-over.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.xor.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.xor.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.clear.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.copy.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.destination-atop.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.destination-in.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.destination-out.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.destination-over.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.lighter.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.source-atop.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.source-in.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.source-out.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.source-over.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.xor.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.canvas.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.canvascopy.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.canvaspattern.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.default.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.fill.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.image.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.imagepattern.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.range.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.clear.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.clear.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.copy.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.copy.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-atop.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-atop.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-in.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-in.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-out.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-out.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-over.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-over.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.lighter.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.lighter.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-atop.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-atop.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-in.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-in.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-out.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-out.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-over.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-over.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.xor.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.xor.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.casesensitive.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.clear.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.darker.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.default.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.get.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.highlight.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.nullsuffix.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.over.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.unrecognised.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.clear.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.clear.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.copy.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.copy.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-atop.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-atop.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-in.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-in.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-out.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-out.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-over.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-over.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.lighter.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.lighter.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-atop.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-atop.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-in.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-in.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-out.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-out.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-over.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-over.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.xor.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.xor.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.clear.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.clear.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.copy.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.copy.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-atop.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-atop.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-in.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-in.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-out.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-out.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-over.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-over.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.lighter.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.lighter.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-atop.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-atop.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-in.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-in.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-out.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-out.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-over.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-over.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.xor.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.xor.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.copy.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.copy.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.destination-atop.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.destination-atop.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.destination-in.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.destination-in.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.source-in.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.source-in.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.source-out.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.source-out.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.copy.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.copy.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.destination-atop.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.destination-atop.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.destination-in.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.destination-in.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.source-in.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.source-in.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.source-out.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.source-out.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.copy.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.copy.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.destination-atop.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.destination-atop.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.destination-in.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.destination-in.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.source-in.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.source-in.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.source-out.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.source-out.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.copy.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.copy.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.destination-atop.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.destination-atop.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.destination-in.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.destination-in.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.source-in.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.source-in.png create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.source-out.html create mode 100644 testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.source-out.png create mode 100644 testing/web-platform/tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.basics.html create mode 100644 testing/web-platform/tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.delete.html create mode 100644 testing/web-platform/tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.drawings.html create mode 100644 testing/web-platform/tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.missingargs.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.3arg.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.5arg.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.alpha.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.gif.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.broken.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.canvas.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.clip.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.composite.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.floatsource.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.emptysrc.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.immediate.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.nosrc.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.reload.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.removedsrc.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativedest.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativedir.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativesource.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nonexistent.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nowrap.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.null.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.path.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.self.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.self.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.svg.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.transform.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.wrongtype.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.wrongtype.paragraph.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.clip.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.negative.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.path.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.transform.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.zero.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.clip.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.negative.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.path.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.transform.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.zero.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.path.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.html create mode 100644 testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.CSSHSL.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.CSSRGB.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.colorObject.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.colorObject.transparency.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.colormix.currentcolor.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.colormix.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.default.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.halftransparent.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.semitransparent.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.solid.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.transparent.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.invalidstring.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.invalidtype.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-5.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-5.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-2.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.current.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.current.changed.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.current.removed.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.current.removed.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex3.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex3.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex4.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex4.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex6.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex6.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex8.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex8.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-1.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-2.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-3.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-3.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-4.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-4.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-5.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-5.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-1.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-2.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-2.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.html4.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.html4.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-3.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-4.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-5.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-3.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-3.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-4.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-5.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-3.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex3.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex4.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex5.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex6.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex7.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex8.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-3.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-4.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-5.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-6.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-3.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-3.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-4.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-5.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-3.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-3.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-4.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-5.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-2.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-3.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-3.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-4.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-4.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-5.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-5.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-eof.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-eof.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-num.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-num.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-percent.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-percent.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-1.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-eof.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-eof.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-1.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-2.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-4.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-4.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.svg-1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.svg-1.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.system.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.toStringFunctionCallback.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.invalid.inputs.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.negative.rotation.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.positive.rotation.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.empty.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.alpha.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.alpha.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.color.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.color.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.multiple.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.multiple.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.outside.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.overlap.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.overlap.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.overlap2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.solid.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.vertical.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.vertical.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fill.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillRect.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillText.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.stroke.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeRect.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeText.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.transform.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.transform.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.transform.3.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.compare.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.crosscanvas.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.current.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.current.png create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.invalidcolor.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.invalidoffset.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.return.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.type.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.update.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.behind.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.beside.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.bottom.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.cylinder.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.front.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.shape1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.shape2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.top.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.equal.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.inside1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.inside2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.inside3.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.negative.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.outside1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.outside2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.outside3.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.touch1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.touch2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.touch3.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.transform.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.transform.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.transform.3.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.animated.gif.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.canvas.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.image.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.nocontext.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.type.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.zerocanvas.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.crosscanvas.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.broken.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.emptysrc.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.immediate.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.nosrc.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.reload.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.removedsrc.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.nonexistent-but-loading.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.nonexistent.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.nosrc.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.null.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.string.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.undefined.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.zeroheight.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.zerowidth.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.canvas1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.canvas2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.image1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.image2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.orientation.image.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.case.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.empty.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.null.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.undefined.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.unrecognised.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.svgimage.nonexistent.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.svgimage.zeroheight.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.svgimage.zerowidth.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.transform.identity.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.transform.infinity.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.transform.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.colorObject.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.colorObject.transparency.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.colormix.html create mode 100644 testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.default.html create mode 100644 testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.tentative-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic.html create mode 100644 testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x.html create mode 100644 testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y.html create mode 100644 testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only.html create mode 100644 testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only.html create mode 100644 testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/element/filters/2d.filter.value.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.isotropic-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.isotropic.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.mostly-x-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.mostly-x.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.mostly-y-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.mostly-y.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.x-only-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.x-only.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.y-only-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.y-only.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.beginLayer-options.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.blur-from-outside-canvas.no-clipping-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.blur-from-outside-canvas.no-clipping.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.blur-from-outside-canvas.with-clipping-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.blur-from-outside-canvas.with-clipping.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.clearRect.full-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.clearRect.full.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.clearRect.partial-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.clearRect.partial.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.clip-inside-and-outside-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.clip-inside-and-outside.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.clip-inside-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.clip-inside.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.clip-outside-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.clip-outside.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.cross-layer-paths-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.cross-layer-paths.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.css-filters.blur-and-shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.css-filters.blur-and-shadow.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.css-filters.blur-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.css-filters.blur.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.css-filters.shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.css-filters.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.exceptions-are-no-op.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.flush-on-frame-presentation-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.flush-on-frame-presentation.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-filter-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-filter.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending.shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite.shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.blending-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.blending.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.blending.shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.blending.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.composite-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.composite.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.composite.shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.composite.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending.shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite.shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.blending-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.blending.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.blending.shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.blending.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.composite-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.composite.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.composite.shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.composite.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.no-global-states-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.no-global-states.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.no-global-states-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.no-global-states.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.invalid-calls.beginLayer-reset-endLayer.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.invalid-calls.beginLayer-restore.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.invalid-calls.beginLayer-save-endLayer.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.invalid-calls.endLayer.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.invalid-calls.save-beginLayer-restore.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.invalid-calls.save-endLayer.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.layer-rendering-state-reset-in-layer.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.malformed-operations-with-promises.createImageBitmap.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.malformed-operations-with-promises.toBlob.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.malformed-operations.createPattern.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.malformed-operations.drawImage.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.malformed-operations.getImageData.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.malformed-operations.putImageData.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.malformed-operations.toDataURL.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.nested-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.nested-filters-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.nested-filters.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.nested.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.opaque-canvas-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.opaque-canvas.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.reset-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.reset.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.restore-style-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.restore-style.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.several-complex-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.several-complex.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.long-distance-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.long-distance-with-clipping-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.long-distance-with-clipping.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.long-distance.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.short-distance-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.short-distance-with-clipping-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.short-distance-with-clipping.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.short-distance.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.beginLayer-endLayer.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.beginLayer-save.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.beginLayer.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.restore.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.save-beginLayer.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.save.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.save_reset_restore.html create mode 100644 testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.save_restore.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cap.butt.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cap.closed.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cap.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cap.open.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cap.round.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cap.square.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cap.valid.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cross.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.defaults.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.fill.noop.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.invalid.strokestyle.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.bevel.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.closed.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.miter.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.open.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.parallel.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.round.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.valid.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.acute.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.exceeded.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.lineedge.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.obtuse.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.rightangle.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.valid.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.within.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.union.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.width.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.width.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.width.scaledefault.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.width.transformed.html create mode 100644 testing/web-platform/tests/html/canvas/element/line-styles/2d.line.width.valid.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/README.md create mode 100644 testing/web-platform/tests/html/canvas/element/manual/building-paths/canvas_complexshapes_arcto_001-ref.htm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/building-paths/canvas_complexshapes_arcto_001.htm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/building-paths/canvas_complexshapes_beziercurveto_001-ref.htm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/building-paths/canvas_complexshapes_beziercurveto_001.htm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/compositing/alpha_filter_shadow-ref.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/compositing/alpha_filter_shadow.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/compositing/canvas_compositing_globalcompositeoperation_001-ref.htm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/compositing/canvas_compositing_globalcompositeoperation_001.htm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/context-attributes/canvas-with-padding.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/context-attributes/clearRect_alpha_false-ref.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/context-attributes/clearRect_alpha_false.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/context-attributes/drawImage_alpha_false-ref.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/context-attributes/drawImage_alpha_false.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/context-attributes/fillRect_alpha_false-ref.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/context-attributes/fillRect_alpha_false.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/context-attributes/fill_alpha_false-ref.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/context-attributes/fill_alpha_false.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/context-attributes/getContextAttributes.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/context-attributes/initial_color_alpha_false-ref.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/context-attributes/initial_color_alpha_false.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/context-attributes/reset_color_alpha_false-ref.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/context-attributes/reset_color_alpha_false.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_canvas.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_canvas_self.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_canvas_self_ref.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_crossorigin.sub.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_html_image.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_svg_image_1.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_svg_image_with_foreign_object_does_not_taint.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-orientation-none-ref.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-orientation-none.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-ref.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-swap-width-height-orientation-none-ref.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-swap-width-height-orientation-none.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-swap-width-height-ref.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-swap-width-height.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-blob-ref.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-blob.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-orientation-none-ref.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-orientation-none.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-ref.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-swap-width-height-orientation-none-ref.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-swap-width-height-orientation-none.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-swap-width-height-ref.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-swap-width-height.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-with-src-rect-ref.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-with-src-rect.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-paths-to-the-canvas/canvas_complexshapes_ispointInpath_001.htm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-paths-to-the-canvas/canvas_focus_drawFocusIfNeeded_AAPI_001-manual.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-paths-to-the-canvas/drawFocusIfNeeded_001.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-paths-to-the-canvas/drawFocusIfNeeded_002.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-paths-to-the-canvas/drawFocusIfNeeded_003.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-paths-to-the-canvas/drawFocusIfNeeded_004.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-paths-to-the-canvas/drawFocusIfNeeded_005.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-text-to-the-canvas/canvas.2d.disconnected-font-size-math-ref.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/drawing-text-to-the-canvas/canvas.2d.disconnected-font-size-math.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/fill-and-stroke-styles/2d.fillStyle.parse.current.notrendered.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/fill-and-stroke-styles/canvas_colorsandstyles_createlineargradient_001.htm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/fill-and-stroke-styles/conic-gradient-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/fill-and-stroke-styles/conic-gradient-rotation-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/fill-and-stroke-styles/conic-gradient-rotation.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/fill-and-stroke-styles/conic-gradient.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/filters/canvas-fillStyle-opacity.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-opacity-alpha-and-fillStyle-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-opacity-alpha-and-fillStyle.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-opacity.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-shadow-and-properties-blur-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-shadow-and-properties-blur.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-shadow-and-properties-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-shadow-and-properties.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-shadow.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/filters/canvas-globalAlpha.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/filters/canvas-opacity-blend-modes-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/filters/canvas-opacity-blend-modes.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/filters/canvas-opacity-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/filters/svg-filter-crash.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-blur-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-blur.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-component-transfer-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-component-transfer.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-convolve-matrix-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-convolve-matrix.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-turbulence-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-turbulence.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/filters/tentative/idl-conversions/canvas-filter-boolean-conversion-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/filters/tentative/idl-conversions/canvas-filter-boolean-conversion.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/filters/tentative/idl-conversions/canvas-filter-long-conversion-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/filters/tentative/idl-conversions/canvas-filter-long-conversion.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/filters/tentative/idl-conversions/canvas-filter-sequence-conversion.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/image-smoothing/imagesmoothing.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/canvas-ImageBitmap-close.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/canvas-createImageBitmap-resize.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/canvas-createImageBitmap-video-resize.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/common.sub.js create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-blob-invalidtype.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-bounds.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-colorSpaceConversion.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-drawImage-closed.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-drawImage.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-exif-orientation.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-exif-orientation_none.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-flipY.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-in-worker-transfer.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-invalid-args.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-origin.sub.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-serializable.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-sizeOverflow.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-transfer.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-worker.js create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmap-from-imageData-no-image-rotation-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmap-from-imageData-no-image-rotation.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmapRendering-transferFromImageBitmap-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmapRendering-transferFromImageBitmap-flipped-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmapRendering-transferFromImageBitmap-flipped.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmapRendering-transferFromImageBitmap-webgl-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmapRendering-transferFromImageBitmap-webgl.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmapRendering-transferFromImageBitmap.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imagebitmap-replication-exif-orientation.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_1.jpg create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_2.jpg create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_3.jpg create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_4.jpg create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_5.jpg create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_6.jpg create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_7.jpg create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_8.jpg create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/serialize-worker.js create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/transfer-worker.js create mode 100644 testing/web-platform/tests/html/canvas/element/manual/imagebitmap/worker-onmessage-noop.js create mode 100644 testing/web-platform/tests/html/canvas/element/manual/layers/unclosed-layers-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/layers/unclosed-layers.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/layers/unclosed-nested-layers-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/layers/unclosed-nested-layers.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/line-styles/canvas_linestyles_linecap_001-ref.htm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/line-styles/canvas_linestyles_linecap_001.htm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/line-styles/lineto_a.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/line-styles/lineto_ref.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/line-styles/setLineDash.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/shadows/canvas_shadows_001.htm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/shadows/canvas_shadows_002-ref.htm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/shadows/canvas_shadows_002.htm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/shadows/canvas_shadows_system_colors-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/shadows/canvas_shadows_system_colors.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/shadows/shadowBlur_gaussian_tolerance.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.disconnected-ref.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.disconnected.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch-ref.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.condensed.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.expanded.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.extra-condensed.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.extra-expanded.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.normal.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.semi-condensed.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.semi-expanded.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.ultra-condensed.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.ultra-expanded.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/text/canvas_text_font_001-ref.htm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/text/canvas_text_font_001.htm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/the-canvas-state/2d.state.saverestore.imageSmoothingEnabled.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/the-canvas-state/2d.zero.size.canvas.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/the-canvas-state/canvas_state_restore_001-ref.htm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/the-canvas-state/canvas_state_restore_001.htm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/transformations/2d.transformation.getTransform.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/transformations/canvas_transformations_reset_001-ref.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/transformations/canvas_transformations_reset_001.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/transformations/canvas_transformations_scale_001-ref.htm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/transformations/canvas_transformations_scale_001.htm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/transformations/transform_a.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/transformations/transform_ref.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-1-expected.htm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-1.htm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-2-expected.htm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-2.htm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-3-expected.htm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-3.htm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-4-expected.htm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-4.htm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/ImageData-fidelity.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-Blob.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-ImageBitmap.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-ImageData.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-canvas.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-cloned.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-image.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-video.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-video.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage.https.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-canvas.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-image.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-settings.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3.js create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/imagedata-no-color-settings-crash.html create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-BB0000CC.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-BB0000FF.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-BBBC00000000CCCC.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-BBBC00000000FFFF.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-FF0000CC.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-FF0000FF.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-FFFF00000000CCCC.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-FFFF00000000FFFF.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-0.7333-0-0.svg create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-1-0-0.svg create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-BB0000CC.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-BB0000FF.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-BBBC00000000CCCC.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-BBBC00000000FFFF.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-FF0000CC.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-FF0000FF.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-FFFF00000000CCCC.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-FFFF00000000FFFF.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Generic-CMYK-BE000000.jpg create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Generic-CMYK-FF000000.jpg create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-222000000.mp4 create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-222000000.webm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-3FF000000.mp4 create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-3FF000000.webm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-semitransparent-p3d65.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-semitransparent-rec2020.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-semitransparent-srgb.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb-transparent.avif create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb-transparent.bmp create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb-transparent.ico create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb-transparent.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb-transparent.webp create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.avif create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.bmp create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.gif create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.ico create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.jpg create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.svg create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.webp create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_AdobeRGB_opaque.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_AdobeRGB_transparent.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_DisplayP3_opaque.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_DisplayP3_transparent.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_ProPhoto_opaque.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_ProPhoto_transparent.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_Rec2020_opaque.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_Rec2020_transparent.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_AdobeRGB_opaque.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_AdobeRGB_transparent.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_DisplayP3_opaque.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_DisplayP3_transparent.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_ProPhoto_opaque.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_ProPhoto_transparent.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_Rec2020_opaque.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_Rec2020_transparent.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_sRGB_opaque.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_sRGB_transparent.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_sRGB_opaque.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_sRGB_transparent.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_AdobeRGB_opaque.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_AdobeRGB_transparent.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_DisplayP3_opaque.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_DisplayP3_transparent.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_ProPhoto_opaque.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_ProPhoto_transparent.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_Rec2020_opaque.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_Rec2020_transparent.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_sRGB_opaque.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_sRGB_transparent.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000.mp4 create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000.svg create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000.webm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000CC.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000FF.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BBBC00000000CCCC.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BBBC00000000FFFF.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0000.svg create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0000CC.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0000FF.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0100.mp4 create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0100.webm create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FFFF00000000CCCC.png create mode 100644 testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FFFF00000000FFFF.png create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.angle.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.angle.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.angle.3.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.angle.4.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.angle.5.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.angle.6.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.default.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.empty.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.end.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.negative.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.nonempty.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.scale.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.scale.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.selfintersect.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.selfintersect.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.shape.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.shape.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.shape.3.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.shape.4.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.shape.5.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.twopie.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.twopie.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.twopie.3.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.twopie.4.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.twopie.5.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.twopie.6.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.zero.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.zero.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.zeroradius.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.coincide.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.coincide.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.collinear.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.collinear.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.collinear.3.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.ensuresubpath.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.ensuresubpath.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.negative.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.scale.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.shape.curve1.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.shape.curve2.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.shape.end.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.shape.start.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.transformation.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.zero.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.zero.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.beginPath.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.ensuresubpath.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.scaled.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.shape.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.clip.basic.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.clip.basic.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.clip.empty.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.clip.intersect.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.clip.unaffected.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.clip.winding.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.clip.winding.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.closePath.empty.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.closePath.newline.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.closePath.nextpoint.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.ellipse.basics.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.closed.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.closed.unaffected.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.overlap.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.overlap.png create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.winding.add.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.winding.subtract.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.winding.subtract.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.winding.subtract.3.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.initial.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.arc.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.basic.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.basic.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.bezier.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.bigarc.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.edge.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.empty.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.outside.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.subpath.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.3.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.4.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.unclosed.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.winding.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInStroke.scaleddashes.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInpath.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInpath.multi.path.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.lineTo.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.lineTo.ensuresubpath.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.lineTo.ensuresubpath.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.lineTo.nextpoint.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.lineTo.nonfinite.details.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.lineTo.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.moveTo.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.moveTo.multiple.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.moveTo.newsubpath.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.moveTo.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.ensuresubpath.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.ensuresubpath.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.scaled.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.shape.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.closed.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.end.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.end.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.negative.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.newsubpath.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.selfintersect.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.winding.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.zero.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.zero.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.zero.3.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.zero.4.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.zero.5.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.zero.6.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompoint.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompointinit.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.double.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.double.single.argument.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.1.dompoint.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.1.dompointinit.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.1.double.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.2.dompoint.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.2.dompointinit.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.2.double.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.1.dompoint.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.1.dompointinit.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.1.double.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.2.dompoint.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.2.dompointinit.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.2.double.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.3.dompoint.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.3.dompointinit.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.3.double.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.1.dompoint.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.1.dompointinit.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.1.double.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.2.dompoint.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.2.dompointinit.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.2.double.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.3.dompoint.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.3.dompointinit.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.3.double.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.4.dompoint.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.4.dompointinit.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.4.double.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.badinput.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.closed.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.end.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.end.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.end.3.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.end.4.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.negative.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.newsubpath.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.radius.intersecting.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.radius.intersecting.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.radius.negative.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.radius.noargument.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.radius.noarugment.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.radius.none.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.radius.toomany.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.selfintersect.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.winding.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.zero.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.zero.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.zero.3.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.zero.4.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.zero.5.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.zero.6.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.empty.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.overlap.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.overlap.png create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.prune.arc.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.prune.closed.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.prune.corner.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.prune.curve.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.prune.line.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.prune.rect.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.scale1.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.scale2.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.skew.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.unaffected.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.union.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.transformation.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.transformation.changing.html create mode 100644 testing/web-platform/tests/html/canvas/element/path-objects/2d.path.transformation.multiple.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create.and.resize.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.initial.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.this.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.type.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.zero.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.double.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.initial.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.large.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.negative.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.round.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.this.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.type.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.zero.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.clamp.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.double.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.large.crash.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.length.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.nonpremul.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.alpha.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.cols.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.rgb.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.rows.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.range.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.rounding.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.source.negative.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.source.outside.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.source.size.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.type.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.unaffected.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.zero.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.clamp.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.array.bounds.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.array.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.basics.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.size.bounds.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.size.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.nan.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.properties.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.readonly.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.round.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.set.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.string.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.undefined.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.alpha.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.alpha.png create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.clip.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.created.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.cross.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.negative.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.outside.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.rect1.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.rect2.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.zero.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.modified.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.null.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.path.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.unaffected.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.unchanged.html create mode 100644 testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.wrongtype.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.drop_shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.drop_shadow.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.global_composite_operation-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.global_composite_operation.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.line-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.line.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.misc-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.misc.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.miter_limit-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.miter_limit.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.text-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.text.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.clip-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.clip.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.direction.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.fill_style.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.filter.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.font.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.font_kerning.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.font_stretch.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.font_variant_caps.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.global_alpha.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.global_composite_operation.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.image_smoothing_enabled.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.image_smoothing_quality.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.letter_spacing.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.line_cap.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.line_dash.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.line_dash_offset.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.line_join.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.line_width.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.miter_limit.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.shadow_blur.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.shadow_color.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.shadow_offset_x.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.shadow_offset_y.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.stroke_style.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.text_align.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.text_baseline.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.text_rendering.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.transformation_matrix.html create mode 100644 testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.word_spacing.html create mode 100644 testing/web-platform/tests/html/canvas/element/scroll/2d.scrollPathIntoView.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/scroll/2d.scrollPathIntoView.path.html create mode 100644 testing/web-platform/tests/html/canvas/element/scroll/2d.scrollPathIntoView.verticalLR.html create mode 100644 testing/web-platform/tests/html/canvas/element/scroll/2d.scrollPathIntoView.verticalRL.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.2.png create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.3.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.3.png create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.4.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.4.png create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.5.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.5.png create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowBlur.initial.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowBlur.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowBlur.valid.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.current.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.current.changed.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.current.removed.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.initial.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.valid.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowOffset.initial.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowOffset.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowOffset.valid.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.blur.high-manual.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.blur.high.png create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.blur.low-manual.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.blur.low.png create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.canvas.alpha.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.canvas.alpha.png create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.canvas.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.canvas.transparent.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.canvas.transparent.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.clip.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.clip.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.clip.3.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.composite.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.composite.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.composite.3.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.enable.blur.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.enable.off.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.enable.off.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.enable.x.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.enable.y.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.gradient.alpha.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.gradient.alpha.png create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.gradient.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.gradient.transparent.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.gradient.transparent.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.image.alpha.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.image.alpha.png create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.image.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.image.scale.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.image.section.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.image.transparent.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.image.transparent.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.offset.negativeX.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.offset.negativeY.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.offset.positiveX.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.offset.positiveY.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.outside.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.pattern.alpha.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.pattern.alpha.png create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.pattern.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.pattern.transparent.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.pattern.transparent.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.stroke.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.stroke.cap.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.stroke.cap.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.stroke.join.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.stroke.join.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.stroke.join.3.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.transform.1.html create mode 100644 testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.transform.2.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.align.default.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.align.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.align.valid.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.baseline.default.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.baseline.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.baseline.valid.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.align.center.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.align.end.ltr.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.align.end.rtl.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.align.left.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.align.right.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.align.start.ltr.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.align.start.rtl.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.baseline.alphabetic.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.baseline.bottom.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.baseline.hanging.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.baseline.ideographic.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.baseline.middle.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.baseline.top.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.basic-manual.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.basic.png create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.NaN.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.bound.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.fontface.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.large-manual.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.large.png create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.negative.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.small.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.zero.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.rtl-manual.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.rtl.png create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.unaffected.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fontface.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fontface.notinpage.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fontface.repeat.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.kern.consistent-manual.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.space.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.space.collapse.end.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.space.collapse.nonspace.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.space.collapse.other.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.space.collapse.space.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.space.collapse.start.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.stroke.basic-manual.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.stroke.basic.png create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.draw.stroke.unaffected.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.absolute.spacing.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.font-relative.spacing.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.fontKerning.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.fontKerning.with.uppercase.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.fontStretch.settings.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.fontVariant.settings.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.invalid.spacing.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.letterSpacing.change.font.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.letterSpacing.measure.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.measure.direction.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.measure.rtl.text.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.measure.textAlign.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.nonfinite.spacing.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.textRendering.settings.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.wordSpacing.change.font.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.wordSpacing.measure.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.font.default.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.complex.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.complex2.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.family.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.size.percentage.default.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.size.percentage.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.system.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.tiny.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.font.relative_size.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.font.weight.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps1-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps1.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps2.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps3-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps3.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps4-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps4.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps5-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps5.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps6-expected.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps6.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.measure.actualBoundingBox.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.measure.advances.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.measure.baselines.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.measure.emHeights-low-ascent.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.measure.emHeights-zero-descent.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.measure.emHeights.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.measure.fontBoundingBox-reduced-ascent.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.measure.fontBoundingBox-zero-descent.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.measure.fontBoundingBox.ahem.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.measure.fontBoundingBox.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.measure.width.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.measure.width.empty.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.measure.width.space.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/2d.text.setFont.mathFont.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/direction-inherit-rtl.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/direction-ltr.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/direction-rtl.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/parent-style-relative-units.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/reference/direction-default-ref.html create mode 100644 testing/web-platform/tests/html/canvas/element/text/reference/direction-rtl-ref.html create mode 100644 testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.bitmap.html create mode 100644 testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.clip.html create mode 100644 testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.fillStyle.html create mode 100644 testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.font.html create mode 100644 testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.globalAlpha.html create mode 100644 testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.globalCompositeOperation.html create mode 100644 testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.lineCap.html create mode 100644 testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.lineJoin.html create mode 100644 testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.lineWidth.html create mode 100644 testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.miterLimit.html create mode 100644 testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.path.html create mode 100644 testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowBlur.html create mode 100644 testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowColor.html create mode 100644 testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowOffsetX.html create mode 100644 testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowOffsetY.html create mode 100644 testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.stack.html create mode 100644 testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.stackdepth.html create mode 100644 testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.strokeStyle.html create mode 100644 testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.textAlign.html create mode 100644 testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.textBaseline.html create mode 100644 testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.transformation.html create mode 100644 testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.underflow.html create mode 100644 testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.order.html create mode 100644 testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.rotate.direction.html create mode 100644 testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.rotate.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.rotate.radians.html create mode 100644 testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.rotate.wrap.html create mode 100644 testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.rotate.wrapnegative.html create mode 100644 testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.rotate.zero.html create mode 100644 testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.scale.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.scale.large.html create mode 100644 testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.scale.multiple.html create mode 100644 testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.scale.negative.html create mode 100644 testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.scale.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.scale.zero.html create mode 100644 testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.setTransform.multiple.html create mode 100644 testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.setTransform.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.setTransform.skewed.html create mode 100644 testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.transform.identity.html create mode 100644 testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.transform.multiply.html create mode 100644 testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.transform.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.transform.skewed.html create mode 100644 testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.translate.basic.html create mode 100644 testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.translate.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/element/video/2d.video.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.html create mode 100644 testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.strokeText.html create mode 100644 testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.to.p3.html create mode 100644 testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.to.srgb.html create mode 100644 testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toBlob.p3.canvas.html create mode 100644 testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toBlob.with.putImageData.html create mode 100644 testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.jpeg.p3.canvas.html create mode 100644 testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.p3.canvas.html create mode 100644 testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.with.putImageData.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/2d.conformance.requirements.basics.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/2d.conformance.requirements.basics.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/2d.conformance.requirements.missingargs.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/2d.conformance.requirements.missingargs.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/META.yml create mode 100644 testing/web-platform/tests/html/canvas/offscreen/WEB_FEATURES.yml create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.arguments.missing.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.arguments.missing.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.casesensitive.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.casesensitive.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.emptystring.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.emptystring.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.exists.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.exists.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.extraargs.cache.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.extraargs.cache.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.extraargs.create.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.extraargs.create.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.shared.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.shared.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unique.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unique.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.badname.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.badname.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.badsuffix.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.badsuffix.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.nullsuffix.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.nullsuffix.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.unicode.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.unicode.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.getContext.options.any.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.color.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.color.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.2dstate.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.2dstate.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.clip.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.clip.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.different.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.different.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.gradient.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.gradient.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.path.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.path.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.pattern.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.pattern.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.same.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.same.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.transform.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.transform.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.readonly.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.readonly.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.reference.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.reference.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.default.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.default.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.idl.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.idl.set.zero.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.idl.set.zero.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.idl.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.decimal.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.decimal.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.em.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.em.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.empty.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.empty.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.exp.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.exp.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.hex.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.hex.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.junk.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.junk.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.minus.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.minus.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.octal.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.octal.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.onlyspace.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.onlyspace.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.percent.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.percent.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.plus.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.plus.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.space.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.space.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.trailingjunk.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.trailingjunk.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.whitespace.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.whitespace.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.zero.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.zero.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.reflect.setidl.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.reflect.setidl.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.reflect.setidlzero.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.reflect.setidlzero.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.large.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.large.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.clear.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.clear.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.copy.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.copy.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-atop.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-atop.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-in.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-in.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-out.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-out.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-over.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-over.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.lighter.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.lighter.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-atop.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-atop.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-in.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-in.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-out.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-out.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-over.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-over.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.xor.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.xor.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.clear.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.clear.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.copy.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.copy.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-atop.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-atop.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-in.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-in.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-out.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-out.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-over.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-over.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.lighter.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.lighter.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-atop.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-atop.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-in.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-in.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-out.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-out.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-over.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-over.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.xor.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.xor.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvas.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvas.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvascopy.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvascopy.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvaspattern.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvaspattern.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.default.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.default.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.fill.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.fill.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.image.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.image.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.imagepattern.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.imagepattern.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.invalid.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.range.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.range.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.clear.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.clear.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.copy.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.copy.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-atop.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-atop.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-in.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-in.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-out.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-out.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-over.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-over.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.lighter.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.lighter.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-atop.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-atop.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-in.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-in.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-out.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-out.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-over.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-over.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.xor.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.xor.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.casesensitive.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.casesensitive.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.clear.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.clear.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.darker.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.darker.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.default.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.default.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.get.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.get.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.highlight.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.highlight.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.nullsuffix.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.nullsuffix.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.over.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.over.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.unrecognised.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.unrecognised.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.clear.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.clear.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.copy.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.copy.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-atop.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-atop.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-in.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-in.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-out.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-out.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-over.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-over.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.lighter.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.lighter.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-atop.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-atop.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-in.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-in.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-out.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-out.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-over.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-over.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.xor.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.xor.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.clear.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.clear.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.copy.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.copy.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-atop.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-atop.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-in.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-in.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-out.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-out.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-over.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-over.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.lighter.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.lighter.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-atop.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-atop.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-in.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-in.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-out.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-out.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-over.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-over.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.xor.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.xor.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.copy.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.copy.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-atop.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-atop.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-in.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-in.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-in.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-in.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-out.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-out.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.copy.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.copy.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-atop.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-atop.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-in.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-in.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-in.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-in.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-out.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-out.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.copy.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.copy.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-atop.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-atop.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-in.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-in.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-in.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-in.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-out.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-out.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.copy.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.copy.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-atop.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-atop.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-in.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-in.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-in.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-in.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-out.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-out.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.basics.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.basics.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.missingargs.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.missingargs.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.3arg.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.3arg.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.5arg.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.5arg.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.alpha.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.alpha.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.broken.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.broken.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.canvas.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.canvas.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.clip.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.clip.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.composite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.composite.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.floatsource.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.floatsource.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedest.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedest.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedir.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedir.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativesource.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativesource.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nonfinite.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.null.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.null.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.path.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.path.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.transform.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.transform.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.wrongtype.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.wrongtype.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.clip.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.clip.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.negative.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.negative.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.path.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.path.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.transform.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.transform.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.zero.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.zero.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.clip.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.clip.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.negative.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.negative.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.path.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.path.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.transform.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.transform.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.zero.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.zero.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.path.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.path.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.CSSHSL.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.CSSRGB.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.colormix.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.colormix.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.default.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.default.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.halftransparent.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.halftransparent.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.semitransparent.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.semitransparent.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.solid.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.solid.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.transparent.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.transparent.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidstring.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidstring.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidtype.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidtype.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-5.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-5.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex4.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex4.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex6.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex6.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex8.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex8.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-4.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-4.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-5.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-5.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.html4.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.html4.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-4.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-4.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-5.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-5.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-4.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-4.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-5.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-5.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex4.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex4.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex5.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex5.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex6.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex6.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex7.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex7.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex8.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex8.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-4.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-4.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-5.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-5.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-6.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-6.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-4.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-4.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-5.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-5.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-4.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-4.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-5.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-5.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-4.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-4.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-5.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-5.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-eof.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-eof.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-num.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-num.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-percent.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-percent.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-eof.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-eof.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-4.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-4.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.system.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.system.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.toStringFunctionCallback.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.toStringFunctionCallback.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.invalid.inputs.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.invalid.inputs.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.negative.rotation.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.negative.rotation.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.positive.rotation.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.positive.rotation.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.empty.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.empty.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.alpha.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.alpha.png create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.alpha.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.color.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.color.png create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.color.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.png create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.multiple.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.multiple.png create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.multiple.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.outside.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.outside.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap.png create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.solid.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.solid.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.vertical.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.vertical.png create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.vertical.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fill.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fill.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillRect.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillRect.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillText.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillText.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.stroke.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.stroke.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeRect.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeRect.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeText.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeText.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.nonfinite.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.compare.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.compare.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.crosscanvas.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.crosscanvas.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidcolor.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidcolor.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidoffset.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidoffset.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.return.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.return.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.type.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.type.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.update.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.update.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.behind.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.behind.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.beside.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.beside.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.bottom.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.bottom.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.cylinder.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.cylinder.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.front.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.front.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.top.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.top.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.equal.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.equal.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.negative.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.negative.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.nonfinite.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.canvas.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.canvas.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.image.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.image.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.nocontext.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.nocontext.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.type.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.type.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.zerocanvas.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.zerocanvas.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.crosscanvas.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.crosscanvas.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.null.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.null.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.string.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.string.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.undefined.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.undefined.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.image.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.image.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.case.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.case.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.empty.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.empty.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.null.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.null.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.undefined.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.undefined.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognised.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognised.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.transform.identity.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.transform.identity.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.transform.infinity.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.transform.infinity.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.transform.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.transform.invalid.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.strokeStyle.colormix.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.strokeStyle.default.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.strokeStyle.default.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.tentative-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.tentative.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.tentative.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.value.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.value.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.isotropic-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.isotropic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.isotropic.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.mostly-x-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.mostly-x.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.mostly-x.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.mostly-y-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.mostly-y.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.mostly-y.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.x-only-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.x-only.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.x-only.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.y-only-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.y-only.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.y-only.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.beginLayer-options.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.beginLayer-options.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.blur-from-outside-canvas.no-clipping-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.blur-from-outside-canvas.no-clipping.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.blur-from-outside-canvas.no-clipping.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.blur-from-outside-canvas.with-clipping-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.blur-from-outside-canvas.with-clipping.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.blur-from-outside-canvas.with-clipping.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clearRect.full-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clearRect.full.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clearRect.full.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clearRect.partial-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clearRect.partial.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clearRect.partial.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-inside-and-outside-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-inside-and-outside.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-inside-and-outside.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-inside-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-inside.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-inside.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-outside-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-outside.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-outside.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.cross-layer-paths-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.cross-layer-paths.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.cross-layer-paths.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-and-shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-and-shadow.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-and-shadow.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.shadow.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.exceptions-are-no-op.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.exceptions-are-no-op.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-filter-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-filter.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-filter.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.shadow.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.blending-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.shadow.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.composite-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.no-global-states-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.no-global-states.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.no-global-states.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.shadow.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.shadow.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.beginLayer-reset-endLayer.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.beginLayer-reset-endLayer.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.beginLayer-restore.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.beginLayer-restore.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.beginLayer-save-endLayer.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.beginLayer-save-endLayer.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.endLayer.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.endLayer.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.save-beginLayer-restore.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.save-beginLayer-restore.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.save-endLayer.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.save-endLayer.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.layer-rendering-state-reset-in-layer.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.layer-rendering-state-reset-in-layer.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.convertToBlob.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.convertToBlob.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.createImageBitmap.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.createImageBitmap.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.createPattern.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.createPattern.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.drawImage.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.drawImage.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.getImageData.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.getImageData.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.putImageData.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.putImageData.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.transferToImageBitmap.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.transferToImageBitmap.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.nested-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.nested-filters-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.nested-filters.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.nested-filters.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.nested.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.nested.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.opaque-canvas-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.opaque-canvas.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.opaque-canvas.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.reset-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.reset.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.reset.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.restore-style-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.restore-style.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.restore-style.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.several-complex-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.several-complex.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.several-complex.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.long-distance-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.long-distance-with-clipping-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.long-distance-with-clipping.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.long-distance-with-clipping.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.long-distance.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.long-distance.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.short-distance-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.short-distance-with-clipping-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.short-distance-with-clipping.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.short-distance-with-clipping.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.short-distance.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.short-distance.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.beginLayer-endLayer.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.beginLayer-endLayer.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.beginLayer-save.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.beginLayer-save.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.beginLayer.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.beginLayer.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.restore.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.restore.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save-beginLayer.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save-beginLayer.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save_reset_restore.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save_reset_restore.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save_restore.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save_restore.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.butt.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.butt.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.closed.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.closed.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.invalid.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.open.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.open.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.round.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.round.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.square.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.square.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.valid.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.valid.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cross.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cross.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.defaults.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.defaults.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.fill.noop.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.fill.noop.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.invalid.strokestyle.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.invalid.strokestyle.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.bevel.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.bevel.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.closed.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.closed.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.invalid.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.miter.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.miter.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.open.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.open.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.parallel.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.parallel.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.round.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.round.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.valid.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.valid.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.acute.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.acute.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.exceeded.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.exceeded.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.invalid.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.lineedge.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.lineedge.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.obtuse.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.obtuse.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.rightangle.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.rightangle.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.valid.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.valid.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.within.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.within.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.union.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.union.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.invalid.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.scaledefault.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.scaledefault.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.transformed.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.transformed.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.valid.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.valid.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/draw-generic-family/2d.text.draw.generic.family.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/draw-generic-family/2d.text.draw.generic.family.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/layers/unclosed-layers-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/layers/unclosed-layers.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/layers/unclosed-layers.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/layers/unclosed-nested-layers-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/layers/unclosed-nested-layers.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/layers/unclosed-nested-layers.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas-worker-font-load-crash.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.resize.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.lowlatency.nocrash.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.nocrash.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/transformations/2d.transformation.getTransform.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/manual/wide-gamut-canvas/2d.color.space.p3.convertToBlobp3.canvas.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.4.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.4.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.5.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.5.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.6.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.6.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.default.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.default.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.empty.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.empty.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.end.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.end.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.negative.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.negative.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.nonempty.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.nonempty.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.nonfinite.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.4.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.4.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.5.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.5.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.4.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.4.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.5.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.5.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.6.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.6.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.zeroradius.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.zeroradius.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.negative.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.negative.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.nonfinite.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.scale.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.scale.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.end.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.end.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.start.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.start.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.transformation.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.transformation.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.beginPath.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.beginPath.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.nonfinite.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.scaled.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.scaled.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.shape.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.shape.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.empty.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.empty.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.intersect.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.intersect.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.unaffected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.unaffected.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.closePath.empty.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.closePath.empty.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.closePath.newline.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.closePath.newline.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.closePath.nextpoint.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.closePath.nextpoint.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.ellipse.basics.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.ellipse.basics.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.unaffected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.unaffected.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.overlap.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.overlap.png create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.overlap.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.add.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.add.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.initial.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.initial.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.arc.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.arc.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bezier.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bezier.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bigarc.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bigarc.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.edge.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.edge.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.empty.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.empty.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.nonfinite.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.outside.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.outside.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.subpath.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.subpath.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.4.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.4.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.unclosed.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.unclosed.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.winding.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.winding.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.scaleddashes.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.scaleddashes.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.invalid.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.multi.path.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.multi.path.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nextpoint.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nextpoint.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.details.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.details.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.multiple.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.multiple.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.newsubpath.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.newsubpath.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.nonfinite.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.nonfinite.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.scaled.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.scaled.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.shape.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.shape.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.closed.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.closed.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.end.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.end.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.end.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.end.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.negative.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.negative.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.newsubpath.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.newsubpath.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.nonfinite.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.selfintersect.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.selfintersect.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.winding.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.winding.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.4.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.4.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.5.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.5.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.6.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.6.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.single.argument.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.single.argument.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompoint.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompoint.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.double.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.double.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompoint.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompoint.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.double.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.double.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompoint.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompoint.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompointinit.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompointinit.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.double.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.double.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompoint.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompoint.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.double.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.double.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompoint.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompoint.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompointinit.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompointinit.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.double.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.double.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompoint.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompoint.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompointinit.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompointinit.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.double.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.double.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompoint.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompoint.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompointinit.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompointinit.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.double.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.double.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompoint.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompoint.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompointinit.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompointinit.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.double.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.double.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompoint.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompoint.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompointinit.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompointinit.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.double.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.double.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.badinput.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.badinput.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.closed.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.closed.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.4.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.4.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.negative.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.negative.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.newsubpath.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.newsubpath.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.nonfinite.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.negative.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.negative.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.noargument.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.noargument.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.none.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.none.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.toomany.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.toomany.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.selfintersect.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.selfintersect.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.winding.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.winding.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.4.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.4.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.5.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.5.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.6.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.6.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.empty.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.empty.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.overlap.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.overlap.png create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.overlap.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.arc.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.arc.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closed.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closed.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.corner.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.corner.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.curve.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.curve.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.line.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.line.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.rect.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.rect.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.skew.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.skew.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.unaffected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.unaffected.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.union.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.union.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.transformation.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.transformation.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.transformation.changing.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.transformation.changing.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.transformation.multiple.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.transformation.multiple.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.initial.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.initial.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.zero.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.zero.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.double.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.double.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.initial.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.initial.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.large.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.large.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.negative.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.negative.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.nonfinite.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.round.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.round.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.zero.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.zero.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.clamp.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.clamp.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.double.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.double.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.invalid.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.large.crash.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.large.crash.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.length.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.length.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonfinite.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonpremul.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonpremul.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.alpha.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.alpha.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.cols.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.cols.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rgb.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rgb.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rows.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rows.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.range.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.range.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.rounding.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.rounding.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.negative.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.negative.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.outside.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.outside.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.size.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.size.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.unaffected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.unaffected.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.zero.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.zero.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.clamp.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.clamp.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.nan.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.nan.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.properties.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.properties.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.readonly.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.readonly.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.round.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.round.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.set.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.set.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.string.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.string.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.undefined.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.undefined.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.alpha.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.alpha.png create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.alpha.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.clip.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.clip.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.created.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.created.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.cross.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.cross.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.negative.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.negative.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.outside.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.outside.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.zero.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.zero.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.modified.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.modified.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.nonfinite.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.null.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.null.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.path.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.path.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unaffected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unaffected.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unchanged.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unchanged.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.wrongtype.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.wrongtype.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.drop_shadow-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.drop_shadow.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.drop_shadow.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.global_composite_operation-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.global_composite_operation.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.global_composite_operation.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.line-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.line.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.line.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.misc-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.misc.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.misc.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.miter_limit-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.miter_limit.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.miter_limit.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.text-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.text.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.text.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.clip-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.clip.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.clip.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.direction.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.direction.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.fill_style.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.fill_style.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.filter.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.filter.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font_kerning.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font_kerning.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font_stretch.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font_stretch.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font_variant_caps.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font_variant_caps.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.global_alpha.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.global_alpha.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.global_composite_operation.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.global_composite_operation.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.image_smoothing_enabled.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.image_smoothing_enabled.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.image_smoothing_quality.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.image_smoothing_quality.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.letter_spacing.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.letter_spacing.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_cap.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_cap.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_dash.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_dash.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_dash_offset.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_dash_offset.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_join.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_join.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_width.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_width.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.miter_limit.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.miter_limit.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_blur.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_blur.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_color.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_color.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_offset_x.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_offset_x.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_offset_y.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_offset_y.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.stroke_style.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.stroke_style.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.text_align.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.text_align.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.text_baseline.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.text_baseline.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.text_rendering.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.text_rendering.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.transformation_matrix.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.transformation_matrix.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.word_spacing.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.word_spacing.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/set-proprietary-font-names-001-crash.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.2.png create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.3.png create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.4.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.4.png create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.4.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.5.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.5.png create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.5.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.initial.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.initial.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.invalid.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.valid.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.valid.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.initial.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.initial.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.invalid.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.valid.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.valid.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.initial.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.initial.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.invalid.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.valid.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.valid.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.blur.high-manual.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.blur.high-manual.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.blur.high.png create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.blur.low-manual.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.blur.low-manual.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.blur.low.png create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.alpha.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.alpha.png create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.alpha.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.clip.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.clip.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.clip.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.clip.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.clip.3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.clip.3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.composite.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.composite.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.composite.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.composite.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.composite.3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.composite.3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.blur.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.blur.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.x.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.x.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.y.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.y.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.alpha.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.alpha.png create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.alpha.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.alpha.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.alpha.png create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.alpha.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.scale.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.scale.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.section.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.section.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeX.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeX.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeY.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeY.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveX.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveX.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveY.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveY.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.outside.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.outside.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.png create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.transform.1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.transform.1.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.transform.2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.transform.2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.align.default.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.align.default.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.align.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.align.invalid.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.align.valid.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.align.valid.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.baseline.default.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.baseline.default.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.baseline.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.baseline.invalid.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.baseline.valid.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.baseline.valid.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.center.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.center.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.end.ltr.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.end.ltr.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.end.rtl.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.end.rtl.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.left.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.left.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.right.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.right.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.start.ltr.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.start.ltr.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.start.rtl.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.start.rtl.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.alphabetic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.alphabetic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.bottom.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.bottom.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.middle.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.middle.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.top.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.top.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.basic-manual.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.basic-manual.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.basic.png create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.NaN.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.NaN.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.bound.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.bound.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.fontface.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.fontface.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.large-manual.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.large-manual.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.large.png create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.negative.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.negative.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.small.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.small.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.zero.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.zero.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.rtl-manual.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.rtl-manual.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.rtl.png create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.unaffected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.unaffected.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.notinpage.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.notinpage.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.repeat.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.repeat.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.kern.consistent-manual.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.kern.consistent-manual.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.end.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.end.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.nonspace.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.nonspace.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.other.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.other.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.space.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.space.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.start.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.start.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.stroke.basic-manual.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.stroke.basic-manual.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.stroke.basic.png create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.stroke.unaffected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.stroke.unaffected.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.absolute.spacing.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.absolute.spacing.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.font-relative.spacing.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.font-relative.spacing.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.with.uppercase.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.with.uppercase.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontStretch.settings.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontStretch.settings.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontVariant.settings.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontVariant.settings.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.invalid.spacing.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.invalid.spacing.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.change.font.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.change.font.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.measure.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.measure.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.direction.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.direction.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.rtl.text.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.rtl.text.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.textAlign.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.textAlign.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.textRendering.settings.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.textRendering.settings.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.change.font.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.change.font.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.measure.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.measure.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.default.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.default.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.complex.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.complex.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.complex2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.complex2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.family.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.family.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.invalid.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.invalid.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.system.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.system.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.tiny.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.tiny.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.relative_size.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.relative_size.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.weight.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.weight.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps1-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps1.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps1.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps2-unexpected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps2.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps2.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps3-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps3.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps4-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps4.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps4.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps5-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps5.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps5.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps6-expected.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps6.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps6.w.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.actualBoundingBox.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.actualBoundingBox.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.advances.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.advances.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.baselines.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.baselines.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights-low-ascent.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights-low-ascent.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights-zero-descent.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights-zero-descent.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox-reduced-ascent.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox-reduced-ascent.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox-zero-descent.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox-zero-descent.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.ahem.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.ahem.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.empty.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.empty.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.space.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.space.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.setFont.mathFont.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/2d.text.setFont.mathFont.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch-ref.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.condensed.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.expanded.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.extra-condensed.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.extra-expanded.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.normal.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.semi-condensed.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.semi-expanded.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.ultra-condensed.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.ultra-expanded.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.bitmap.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.bitmap.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.clip.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.clip.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.fillStyle.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.fillStyle.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalAlpha.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalAlpha.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalCompositeOperation.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalCompositeOperation.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineCap.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineCap.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineJoin.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineJoin.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineWidth.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineWidth.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.miterLimit.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.miterLimit.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.path.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.path.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowBlur.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowBlur.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowColor.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowColor.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetX.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetX.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetY.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetY.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stack.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stack.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stackdepth.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stackdepth.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.strokeStyle.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.strokeStyle.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.transformation.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.transformation.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.underflow.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.underflow.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.order.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.order.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.direction.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.direction.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.nonfinite.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.radians.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.radians.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrap.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrap.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrapnegative.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrapnegative.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.zero.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.zero.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.large.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.large.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.multiple.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.multiple.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.negative.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.negative.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.nonfinite.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.zero.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.zero.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.multiple.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.multiple.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.nonfinite.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.skewed.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.skewed.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.identity.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.identity.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.multiply.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.multiply.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.nonfinite.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.skewed.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.skewed.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.translate.basic.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.translate.basic.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.translate.nonfinite.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.translate.nonfinite.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.p3.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.p3.worker.js create mode 100644 testing/web-platform/tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.srgb.html create mode 100644 testing/web-platform/tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.srgb.worker.js create mode 100644 testing/web-platform/tests/html/canvas/resources/2x2.png create mode 100644 testing/web-platform/tests/html/canvas/resources/canvas-frame.css create mode 100644 testing/web-platform/tests/html/canvas/resources/canvas-frame.css.headers create mode 100644 testing/web-platform/tests/html/canvas/resources/canvas-index.css create mode 100644 testing/web-platform/tests/html/canvas/resources/canvas-index.css.headers create mode 100644 testing/web-platform/tests/html/canvas/resources/canvas-spec.css create mode 100644 testing/web-platform/tests/html/canvas/resources/canvas-spec.css.headers create mode 100644 testing/web-platform/tests/html/canvas/resources/canvas-tests.css create mode 100644 testing/web-platform/tests/html/canvas/resources/canvas-tests.css.headers create mode 100644 testing/web-platform/tests/html/canvas/resources/canvas-tests.js create mode 100644 testing/web-platform/tests/html/canvas/resources/canvas-tests.js.headers create mode 100644 testing/web-platform/tests/html/canvas/tools/gentest.py create mode 100644 testing/web-platform/tests/html/canvas/tools/gentest_union.py create mode 100644 testing/web-platform/tests/html/canvas/tools/gentestutils.py create mode 100644 testing/web-platform/tests/html/canvas/tools/gentestutilsunion.py create mode 100644 testing/web-platform/tests/html/canvas/tools/name2dir-canvas.yaml create mode 100644 testing/web-platform/tests/html/canvas/tools/name2dir-offscreen.yaml create mode 100644 testing/web-platform/tests/html/canvas/tools/name2dir.yaml create mode 100644 testing/web-platform/tests/html/canvas/tools/templates.yaml create mode 100644 testing/web-platform/tests/html/canvas/tools/templates/reftest.html create mode 100644 testing/web-platform/tests/html/canvas/tools/templates/reftest_element.html create mode 100644 testing/web-platform/tests/html/canvas/tools/templates/reftest_offscreen.html create mode 100644 testing/web-platform/tests/html/canvas/tools/templates/reftest_worker.html create mode 100644 testing/web-platform/tests/html/canvas/tools/templates/testharness_element.html create mode 100644 testing/web-platform/tests/html/canvas/tools/templates/testharness_offscreen.html create mode 100644 testing/web-platform/tests/html/canvas/tools/templates/testharness_worker.js create mode 100644 testing/web-platform/tests/html/canvas/tools/yaml-new/color_space.yaml create mode 100644 testing/web-platform/tests/html/canvas/tools/yaml-new/compositing.yaml create mode 100644 testing/web-platform/tests/html/canvas/tools/yaml-new/conformance_requirements.yaml create mode 100644 testing/web-platform/tests/html/canvas/tools/yaml-new/drawing-images-to-the-canvas.yaml create mode 100644 testing/web-platform/tests/html/canvas/tools/yaml-new/drawing-rectangles-to-the-canvas.yaml create mode 100644 testing/web-platform/tests/html/canvas/tools/yaml-new/fill-and-stroke-styles.yaml create mode 100644 testing/web-platform/tests/html/canvas/tools/yaml-new/filters.yaml create mode 100644 testing/web-platform/tests/html/canvas/tools/yaml-new/layers.yaml create mode 100644 testing/web-platform/tests/html/canvas/tools/yaml-new/line-styles.yaml create mode 100644 testing/web-platform/tests/html/canvas/tools/yaml-new/path-objects.yaml create mode 100644 testing/web-platform/tests/html/canvas/tools/yaml-new/pixel-manipulation.yaml create mode 100644 testing/web-platform/tests/html/canvas/tools/yaml-new/reset.yaml create mode 100644 testing/web-platform/tests/html/canvas/tools/yaml-new/scroll.yaml create mode 100644 testing/web-platform/tests/html/canvas/tools/yaml-new/shadows.yaml create mode 100644 testing/web-platform/tests/html/canvas/tools/yaml-new/text.yaml create mode 100644 testing/web-platform/tests/html/canvas/tools/yaml-new/the-canvas-state.yaml create mode 100644 testing/web-platform/tests/html/canvas/tools/yaml-new/transformations.yaml create mode 100644 testing/web-platform/tests/html/canvas/tools/yaml-new/video.yaml create mode 100644 testing/web-platform/tests/html/canvas/tools/yaml/element/meta.yaml create mode 100644 testing/web-platform/tests/html/canvas/tools/yaml/element/the-canvas-element.yaml create mode 100644 testing/web-platform/tests/html/canvas/tools/yaml/offscreen/meta.yaml create mode 100644 testing/web-platform/tests/html/canvas/tools/yaml/offscreen/the-offscreen-canvas.yaml (limited to 'testing/web-platform/tests/html/canvas') diff --git a/testing/web-platform/tests/html/canvas/META.yml b/testing/web-platform/tests/html/canvas/META.yml new file mode 100644 index 0000000000..0f79f25912 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/META.yml @@ -0,0 +1,6 @@ +spec: https://html.spec.whatwg.org/multipage/canvas.html#2dcontext +suggested_reviewers: + - AmeliaBR + - annevk + - kenrussell + - fserb diff --git a/testing/web-platform/tests/html/canvas/README.md b/testing/web-platform/tests/html/canvas/README.md new file mode 100644 index 0000000000..63f2246f2d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/README.md @@ -0,0 +1 @@ +To update the generated tests, run `wpt update-built --include canvas`. diff --git a/testing/web-platform/tests/html/canvas/element/2d.conformance.requirements.basics.html b/testing/web-platform/tests/html/canvas/element/2d.conformance.requirements.basics.html new file mode 100644 index 0000000000..fed4aa61ba --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/2d.conformance.requirements.basics.html @@ -0,0 +1,62 @@ + + +Canvas test: 2d.conformance.requirements.basics + + + + + + +

2d.conformance.requirements.basics

+

void methods return undefined

+ +

Defined in "Web IDL" (draft) +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/2d.conformance.requirements.delete.html b/testing/web-platform/tests/html/canvas/element/2d.conformance.requirements.delete.html new file mode 100644 index 0000000000..bfdf94319b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/2d.conformance.requirements.delete.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.conformance.requirements.delete + + + + + + +

2d.conformance.requirements.delete

+

window.CanvasRenderingContext2D is Configurable

+ +

Defined in "Web IDL" (draft) +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/2d.conformance.requirements.drawings.html b/testing/web-platform/tests/html/canvas/element/2d.conformance.requirements.drawings.html new file mode 100644 index 0000000000..40038b2191 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/2d.conformance.requirements.drawings.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.conformance.requirements.drawings + + + + + + +

2d.conformance.requirements.drawings

+

void methods return undefined

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + + diff --git a/testing/web-platform/tests/html/canvas/element/2d.conformance.requirements.missingargs.html b/testing/web-platform/tests/html/canvas/element/2d.conformance.requirements.missingargs.html new file mode 100644 index 0000000000..2ac3d58f4e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/2d.conformance.requirements.missingargs.html @@ -0,0 +1,141 @@ + + +Canvas test: 2d.conformance.requirements.missingargs + + + + + + +

2d.conformance.requirements.missingargs

+

Missing arguments cause TypeError

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/2d.text-outside-of-the-flat-tree-ref.html b/testing/web-platform/tests/html/canvas/element/2d.text-outside-of-the-flat-tree-ref.html new file mode 100644 index 0000000000..707bafd320 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/2d.text-outside-of-the-flat-tree-ref.html @@ -0,0 +1,9 @@ + +Test reference + + diff --git a/testing/web-platform/tests/html/canvas/element/2d.text-outside-of-the-flat-tree.html b/testing/web-platform/tests/html/canvas/element/2d.text-outside-of-the-flat-tree.html new file mode 100644 index 0000000000..cf76967a1e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/2d.text-outside-of-the-flat-tree.html @@ -0,0 +1,19 @@ + + +Canvas outside the flat tree + + + + +
+ diff --git a/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.exists.html b/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.exists.html new file mode 100644 index 0000000000..1c44acbd54 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.exists.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.canvas.context.exists + + + + + + +

2d.canvas.context.exists

+

The 2D context is implemented

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.extraargs.cache.html b/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.extraargs.cache.html new file mode 100644 index 0000000000..f4db40815d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.extraargs.cache.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.canvas.context.extraargs.cache + + + + + + +

2d.canvas.context.extraargs.cache

+

The 2D context doesn't throw with extra getContext arguments (cached)

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.extraargs.create.html b/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.extraargs.create.html new file mode 100644 index 0000000000..6ae7f787c6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.extraargs.create.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.canvas.context.extraargs.create + + + + + + +

2d.canvas.context.extraargs.create

+

The 2D context doesn't throw with extra getContext arguments (new context)

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.invalid.args.html b/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.invalid.args.html new file mode 100644 index 0000000000..cfa58266ea --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.invalid.args.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.canvas.context.invalid.args + + + + + + +

2d.canvas.context.invalid.args

+

Calling getContext with invalid arguments.

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.prototype.html b/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.prototype.html new file mode 100644 index 0000000000..5d5edc6864 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.prototype.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.canvas.context.prototype + + + + + + +

2d.canvas.context.prototype

+

checks CanvasRenderingContext2D prototype

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.shared.html b/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.shared.html new file mode 100644 index 0000000000..fd8deddec0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.shared.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.canvas.context.shared + + + + + + +

2d.canvas.context.shared

+

getContext('2d') returns objects which share canvas state

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.type.exists.html b/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.type.exists.html new file mode 100644 index 0000000000..d25f009abb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.type.exists.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.canvas.context.type.exists + + + + + + +

2d.canvas.context.type.exists

+

The 2D context interface is a property of 'window'

+ +

Defined in "Web IDL" (draft) +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.type.extend.html b/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.type.extend.html new file mode 100644 index 0000000000..8d34d53101 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.type.extend.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.canvas.context.type.extend + + + + + + +

2d.canvas.context.type.extend

+

Interface methods can be added

+ +

Defined in "Web IDL" (draft) +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.type.prototype.html b/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.type.prototype.html new file mode 100644 index 0000000000..a537fe5106 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.type.prototype.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.canvas.context.type.prototype + + + + + + +

2d.canvas.context.type.prototype

+

window.CanvasRenderingContext2D.prototype are not [[Writable]] and not [[Configurable]], and its methods are [[Configurable]].

+ +

Defined in "Web IDL" (draft) +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.type.replace.html b/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.type.replace.html new file mode 100644 index 0000000000..ac3c40587d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.type.replace.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.canvas.context.type.replace + + + + + + +

2d.canvas.context.type.replace

+

Interface methods can be overridden

+ +

Defined in "Web IDL" (draft) +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.unique.html b/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.unique.html new file mode 100644 index 0000000000..c7b1803856 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-context/2d.canvas.context.unique.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.canvas.context.unique + + + + + + +

2d.canvas.context.unique

+

getContext('2d') returns the same object

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.initial.reset.2dstate.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.initial.reset.2dstate.html new file mode 100644 index 0000000000..e194001198 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.initial.reset.2dstate.html @@ -0,0 +1,102 @@ + + +Canvas test: 2d.canvas.host.initial.reset.2dstate + + + + + + +

2d.canvas.host.initial.reset.2dstate

+

Resetting the canvas state resets 2D state variables

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.readonly.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.readonly.html new file mode 100644 index 0000000000..cbbf32f2e2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.readonly.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.canvas.host.readonly + + + + + + +

2d.canvas.host.readonly

+

CanvasRenderingContext2D.canvas is readonly

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.reference.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.reference.html new file mode 100644 index 0000000000..6a4bdb65b0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.reference.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.canvas.host.reference + + + + + + +

2d.canvas.host.reference

+

CanvasRenderingContext2D.canvas refers back to its canvas

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.scaled-manual.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.scaled-manual.html new file mode 100644 index 0000000000..acf3f9c7b3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.scaled-manual.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.canvas.host.scaled + + + + + + +

2d.canvas.host.scaled

+

CSS-scaled canvases get drawn correctly

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.scaled.png b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.scaled.png new file mode 100644 index 0000000000..875407769f Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.scaled.png differ diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.decimal.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.decimal.html new file mode 100644 index 0000000000..0de11e235d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.decimal.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.canvas.host.size.attributes.parse.decimal + + + + + + +

2d.canvas.host.size.attributes.parse.decimal

+

Parsing of non-negative integers

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.decimal.png b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.decimal.png new file mode 100644 index 0000000000..f842673330 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.decimal.png differ diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.em.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.em.html new file mode 100644 index 0000000000..315c8323fa --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.em.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.canvas.host.size.attributes.parse.em + + + + + + +

2d.canvas.host.size.attributes.parse.em

+

Parsing of non-negative integers

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.em.png b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.em.png new file mode 100644 index 0000000000..f842673330 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.em.png differ diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.empty.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.empty.html new file mode 100644 index 0000000000..b9568712e7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.empty.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.canvas.host.size.attributes.parse.empty + + + + + + +

2d.canvas.host.size.attributes.parse.empty

+

Parsing of non-negative integers

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.empty.png b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.empty.png new file mode 100644 index 0000000000..a72d047556 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.empty.png differ diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.exp.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.exp.html new file mode 100644 index 0000000000..208ddeceeb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.exp.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.canvas.host.size.attributes.parse.exp + + + + + + +

2d.canvas.host.size.attributes.parse.exp

+

Parsing of non-negative integers

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.exp.png b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.exp.png new file mode 100644 index 0000000000..f842673330 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.exp.png differ diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.hex.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.hex.html new file mode 100644 index 0000000000..05f7030d47 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.hex.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.canvas.host.size.attributes.parse.hex + + + + + + +

2d.canvas.host.size.attributes.parse.hex

+

Parsing of non-negative integers

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.junk.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.junk.html new file mode 100644 index 0000000000..3a55fd13dd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.junk.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.canvas.host.size.attributes.parse.junk + + + + + + +

2d.canvas.host.size.attributes.parse.junk

+

Parsing of non-negative integers

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.junk.png b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.junk.png new file mode 100644 index 0000000000..a72d047556 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.junk.png differ diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.minus.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.minus.html new file mode 100644 index 0000000000..da5f21ad04 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.minus.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.canvas.host.size.attributes.parse.minus + + + + + + +

2d.canvas.host.size.attributes.parse.minus

+

Parsing of non-negative integers

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.minus.png b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.minus.png new file mode 100644 index 0000000000..a72d047556 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.minus.png differ diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.octal.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.octal.html new file mode 100644 index 0000000000..ccc7efaafa --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.octal.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.canvas.host.size.attributes.parse.octal + + + + + + +

2d.canvas.host.size.attributes.parse.octal

+

Parsing of non-negative integers

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.octal.png b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.octal.png new file mode 100644 index 0000000000..f842673330 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.octal.png differ diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.onlyspace.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.onlyspace.html new file mode 100644 index 0000000000..da14fa25c0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.onlyspace.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.canvas.host.size.attributes.parse.onlyspace + + + + + + +

2d.canvas.host.size.attributes.parse.onlyspace

+

Parsing of non-negative integers

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.onlyspace.png b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.onlyspace.png new file mode 100644 index 0000000000..a72d047556 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.onlyspace.png differ diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.percent.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.percent.html new file mode 100644 index 0000000000..d699288f73 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.percent.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.canvas.host.size.attributes.parse.percent + + + + + + +

2d.canvas.host.size.attributes.parse.percent

+

Parsing of non-negative integers

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.percent.png b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.percent.png new file mode 100644 index 0000000000..f842673330 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.percent.png differ diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.plus.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.plus.html new file mode 100644 index 0000000000..58fb07f179 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.plus.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.canvas.host.size.attributes.parse.plus + + + + + + +

2d.canvas.host.size.attributes.parse.plus

+

Parsing of non-negative integers

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.plus.png b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.plus.png new file mode 100644 index 0000000000..f842673330 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.plus.png differ diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.space.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.space.html new file mode 100644 index 0000000000..52fadaad43 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.space.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.canvas.host.size.attributes.parse.space + + + + + + +

2d.canvas.host.size.attributes.parse.space

+

Parsing of non-negative integers

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.space.png b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.space.png new file mode 100644 index 0000000000..f842673330 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.space.png differ diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.trailingjunk.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.trailingjunk.html new file mode 100644 index 0000000000..b18167c599 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.trailingjunk.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.canvas.host.size.attributes.parse.trailingjunk + + + + + + +

2d.canvas.host.size.attributes.parse.trailingjunk

+

Parsing of non-negative integers

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.trailingjunk.png b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.trailingjunk.png new file mode 100644 index 0000000000..f842673330 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.trailingjunk.png differ diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.whitespace.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.whitespace.html new file mode 100644 index 0000000000..79e81c1020 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.whitespace.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.canvas.host.size.attributes.parse.whitespace + + + + + + +

2d.canvas.host.size.attributes.parse.whitespace

+

Parsing of non-negative integers

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.whitespace.png b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.whitespace.png new file mode 100644 index 0000000000..f842673330 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.whitespace.png differ diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.zero.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.zero.html new file mode 100644 index 0000000000..b7fd499d1f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.parse.zero.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.canvas.host.size.attributes.parse.zero + + + + + + +

2d.canvas.host.size.attributes.parse.zero

+

Parsing of non-negative integers

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.decimal.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.decimal.html new file mode 100644 index 0000000000..b6c2130bf0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.decimal.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.canvas.host.size.attributes.setAttribute.decimal + + + + + + +

2d.canvas.host.size.attributes.setAttribute.decimal

+

Parsing of non-negative integers in setAttribute

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.decimal.png b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.decimal.png new file mode 100644 index 0000000000..f842673330 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.decimal.png differ diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.em.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.em.html new file mode 100644 index 0000000000..f70713fd8f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.em.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.canvas.host.size.attributes.setAttribute.em + + + + + + +

2d.canvas.host.size.attributes.setAttribute.em

+

Parsing of non-negative integers in setAttribute

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.em.png b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.em.png new file mode 100644 index 0000000000..f842673330 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.em.png differ diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.empty.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.empty.html new file mode 100644 index 0000000000..fab2394fec --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.empty.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.canvas.host.size.attributes.setAttribute.empty + + + + + + +

2d.canvas.host.size.attributes.setAttribute.empty

+

Parsing of non-negative integers in setAttribute

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.empty.png b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.empty.png new file mode 100644 index 0000000000..a72d047556 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.empty.png differ diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.exp.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.exp.html new file mode 100644 index 0000000000..cfa11eb302 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.exp.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.canvas.host.size.attributes.setAttribute.exp + + + + + + +

2d.canvas.host.size.attributes.setAttribute.exp

+

Parsing of non-negative integers in setAttribute

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.exp.png b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.exp.png new file mode 100644 index 0000000000..f842673330 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.exp.png differ diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.hex.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.hex.html new file mode 100644 index 0000000000..80a1fbda60 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.hex.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.canvas.host.size.attributes.setAttribute.hex + + + + + + +

2d.canvas.host.size.attributes.setAttribute.hex

+

Parsing of non-negative integers in setAttribute

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.junk.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.junk.html new file mode 100644 index 0000000000..b583871f38 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.junk.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.canvas.host.size.attributes.setAttribute.junk + + + + + + +

2d.canvas.host.size.attributes.setAttribute.junk

+

Parsing of non-negative integers in setAttribute

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.junk.png b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.junk.png new file mode 100644 index 0000000000..a72d047556 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.junk.png differ diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.minus.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.minus.html new file mode 100644 index 0000000000..90a31403e1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.minus.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.canvas.host.size.attributes.setAttribute.minus + + + + + + +

2d.canvas.host.size.attributes.setAttribute.minus

+

Parsing of non-negative integers in setAttribute

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.minus.png b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.minus.png new file mode 100644 index 0000000000..a72d047556 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.minus.png differ diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.octal.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.octal.html new file mode 100644 index 0000000000..c5b263bd5f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.octal.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.canvas.host.size.attributes.setAttribute.octal + + + + + + +

2d.canvas.host.size.attributes.setAttribute.octal

+

Parsing of non-negative integers in setAttribute

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.octal.png b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.octal.png new file mode 100644 index 0000000000..f842673330 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.octal.png differ diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.onlyspace.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.onlyspace.html new file mode 100644 index 0000000000..ac4cdb001b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.onlyspace.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.canvas.host.size.attributes.setAttribute.onlyspace + + + + + + +

2d.canvas.host.size.attributes.setAttribute.onlyspace

+

Parsing of non-negative integers in setAttribute

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.onlyspace.png b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.onlyspace.png new file mode 100644 index 0000000000..a72d047556 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.onlyspace.png differ diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.percent.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.percent.html new file mode 100644 index 0000000000..5aebf5a0b1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.percent.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.canvas.host.size.attributes.setAttribute.percent + + + + + + +

2d.canvas.host.size.attributes.setAttribute.percent

+

Parsing of non-negative integers in setAttribute

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.percent.png b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.percent.png new file mode 100644 index 0000000000..f842673330 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.percent.png differ diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.plus.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.plus.html new file mode 100644 index 0000000000..60da44daf3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.plus.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.canvas.host.size.attributes.setAttribute.plus + + + + + + +

2d.canvas.host.size.attributes.setAttribute.plus

+

Parsing of non-negative integers in setAttribute

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.plus.png b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.plus.png new file mode 100644 index 0000000000..f842673330 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.plus.png differ diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.space.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.space.html new file mode 100644 index 0000000000..fbfd4c33c0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.space.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.canvas.host.size.attributes.setAttribute.space + + + + + + +

2d.canvas.host.size.attributes.setAttribute.space

+

Parsing of non-negative integers in setAttribute

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.space.png b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.space.png new file mode 100644 index 0000000000..f842673330 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.space.png differ diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.trailingjunk.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.trailingjunk.html new file mode 100644 index 0000000000..1d230bd654 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.trailingjunk.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.canvas.host.size.attributes.setAttribute.trailingjunk + + + + + + +

2d.canvas.host.size.attributes.setAttribute.trailingjunk

+

Parsing of non-negative integers in setAttribute

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.trailingjunk.png b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.trailingjunk.png new file mode 100644 index 0000000000..f842673330 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.trailingjunk.png differ diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.whitespace.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.whitespace.html new file mode 100644 index 0000000000..1aa86d6a9e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.whitespace.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.canvas.host.size.attributes.setAttribute.whitespace + + + + + + +

2d.canvas.host.size.attributes.setAttribute.whitespace

+

Parsing of non-negative integers in setAttribute

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.whitespace.png b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.whitespace.png new file mode 100644 index 0000000000..f842673330 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.whitespace.png differ diff --git a/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.zero.html b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.zero.html new file mode 100644 index 0000000000..64b4811d79 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/canvas-host/2d.canvas.host.size.attributes.setAttribute.zero.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.canvas.host.size.attributes.setAttribute.zero + + + + + + +

2d.canvas.host.size.attributes.setAttribute.zero

+

Parsing of non-negative integers in setAttribute

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.clear.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.clear.html new file mode 100644 index 0000000000..cb805b692e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.clear.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.composite.canvas.clear + + + + + + +

2d.composite.canvas.clear

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.clear.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.clear.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.clear.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.copy.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.copy.html new file mode 100644 index 0000000000..d4e75b7bac --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.copy.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.composite.canvas.copy + + + + + + +

2d.composite.canvas.copy

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.copy.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.copy.png new file mode 100644 index 0000000000..f5e9c21964 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.copy.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-atop.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-atop.html new file mode 100644 index 0000000000..6fded39e44 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-atop.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.composite.canvas.destination-atop + + + + + + +

2d.composite.canvas.destination-atop

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-atop.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-atop.png new file mode 100644 index 0000000000..504b42756e Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-atop.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-in.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-in.html new file mode 100644 index 0000000000..7277286d8b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-in.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.composite.canvas.destination-in + + + + + + +

2d.composite.canvas.destination-in

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-in.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-in.png new file mode 100644 index 0000000000..790e418a6b Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-in.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-out.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-out.html new file mode 100644 index 0000000000..5860c3d5cb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-out.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.composite.canvas.destination-out + + + + + + +

2d.composite.canvas.destination-out

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-out.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-out.png new file mode 100644 index 0000000000..7f5ed1a836 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-out.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-over.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-over.html new file mode 100644 index 0000000000..76bad84392 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-over.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.composite.canvas.destination-over + + + + + + +

2d.composite.canvas.destination-over

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-over.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-over.png new file mode 100644 index 0000000000..226390b2f8 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.destination-over.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.lighter.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.lighter.html new file mode 100644 index 0000000000..8d706df67e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.lighter.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.composite.canvas.lighter + + + + + + +

2d.composite.canvas.lighter

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.lighter.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.lighter.png new file mode 100644 index 0000000000..fc33f3301e Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.lighter.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-atop.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-atop.html new file mode 100644 index 0000000000..cf3e449123 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-atop.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.composite.canvas.source-atop + + + + + + +

2d.composite.canvas.source-atop

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-atop.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-atop.png new file mode 100644 index 0000000000..1ef9630195 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-atop.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-in.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-in.html new file mode 100644 index 0000000000..dabcced9dd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-in.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.composite.canvas.source-in + + + + + + +

2d.composite.canvas.source-in

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-in.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-in.png new file mode 100644 index 0000000000..c26cdccf02 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-in.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-out.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-out.html new file mode 100644 index 0000000000..2fcf708796 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-out.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.composite.canvas.source-out + + + + + + +

2d.composite.canvas.source-out

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-out.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-out.png new file mode 100644 index 0000000000..c26cdccf02 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-out.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-over.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-over.html new file mode 100644 index 0000000000..b9dca65744 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-over.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.composite.canvas.source-over + + + + + + +

2d.composite.canvas.source-over

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-over.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-over.png new file mode 100644 index 0000000000..e63ab7e308 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.source-over.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.xor.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.xor.html new file mode 100644 index 0000000000..c252e17a7e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.xor.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.composite.canvas.xor + + + + + + +

2d.composite.canvas.xor

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.xor.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.xor.png new file mode 100644 index 0000000000..1ef9630195 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.canvas.xor.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.clear.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.clear.html new file mode 100644 index 0000000000..65cfd951e8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.clear.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.composite.clip.clear + + + + + + +

2d.composite.clip.clear

+

fill() does not affect pixels outside the clip region.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.copy.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.copy.html new file mode 100644 index 0000000000..b38397a2c7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.copy.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.composite.clip.copy + + + + + + +

2d.composite.clip.copy

+

fill() does not affect pixels outside the clip region.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.destination-atop.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.destination-atop.html new file mode 100644 index 0000000000..79fb3af54c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.destination-atop.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.composite.clip.destination-atop + + + + + + +

2d.composite.clip.destination-atop

+

fill() does not affect pixels outside the clip region.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.destination-in.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.destination-in.html new file mode 100644 index 0000000000..63e8d3acfd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.destination-in.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.composite.clip.destination-in + + + + + + +

2d.composite.clip.destination-in

+

fill() does not affect pixels outside the clip region.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.destination-out.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.destination-out.html new file mode 100644 index 0000000000..839246427f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.destination-out.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.composite.clip.destination-out + + + + + + +

2d.composite.clip.destination-out

+

fill() does not affect pixels outside the clip region.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.destination-over.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.destination-over.html new file mode 100644 index 0000000000..fc7f1ab728 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.destination-over.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.composite.clip.destination-over + + + + + + +

2d.composite.clip.destination-over

+

fill() does not affect pixels outside the clip region.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.lighter.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.lighter.html new file mode 100644 index 0000000000..b3acab0231 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.lighter.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.composite.clip.lighter + + + + + + +

2d.composite.clip.lighter

+

fill() does not affect pixels outside the clip region.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.source-atop.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.source-atop.html new file mode 100644 index 0000000000..49c3eb0bb5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.source-atop.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.composite.clip.source-atop + + + + + + +

2d.composite.clip.source-atop

+

fill() does not affect pixels outside the clip region.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.source-in.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.source-in.html new file mode 100644 index 0000000000..afe92ba4bf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.source-in.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.composite.clip.source-in + + + + + + +

2d.composite.clip.source-in

+

fill() does not affect pixels outside the clip region.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.source-out.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.source-out.html new file mode 100644 index 0000000000..43b352fb46 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.source-out.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.composite.clip.source-out + + + + + + +

2d.composite.clip.source-out

+

fill() does not affect pixels outside the clip region.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.source-over.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.source-over.html new file mode 100644 index 0000000000..4973f8e6e6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.source-over.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.composite.clip.source-over + + + + + + +

2d.composite.clip.source-over

+

fill() does not affect pixels outside the clip region.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.xor.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.xor.html new file mode 100644 index 0000000000..5239d6fd10 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.clip.xor.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.composite.clip.xor + + + + + + +

2d.composite.clip.xor

+

fill() does not affect pixels outside the clip region.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.canvas.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.canvas.html new file mode 100644 index 0000000000..525a56ebc9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.canvas.html @@ -0,0 +1,38 @@ + + +Canvas test: 2d.composite.globalAlpha.canvas + + + + + + +

2d.composite.globalAlpha.canvas

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.canvascopy.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.canvascopy.html new file mode 100644 index 0000000000..17a46cfca2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.canvascopy.html @@ -0,0 +1,39 @@ + + +Canvas test: 2d.composite.globalAlpha.canvascopy + + + + + + +

2d.composite.globalAlpha.canvascopy

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.canvaspattern.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.canvaspattern.html new file mode 100644 index 0000000000..eea076c974 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.canvaspattern.html @@ -0,0 +1,39 @@ + + +Canvas test: 2d.composite.globalAlpha.canvaspattern + + + + + + +

2d.composite.globalAlpha.canvaspattern

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.default.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.default.html new file mode 100644 index 0000000000..97cdf267c7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.default.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.composite.globalAlpha.default + + + + + + +

2d.composite.globalAlpha.default

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.fill.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.fill.html new file mode 100644 index 0000000000..5766fdbe77 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.fill.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.composite.globalAlpha.fill + + + + + + +

2d.composite.globalAlpha.fill

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.image.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.image.html new file mode 100644 index 0000000000..5de1d5ff3e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.image.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.composite.globalAlpha.image + + + + + + +

2d.composite.globalAlpha.image

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.imagepattern.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.imagepattern.html new file mode 100644 index 0000000000..87e884524e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.imagepattern.html @@ -0,0 +1,38 @@ + + +Canvas test: 2d.composite.globalAlpha.imagepattern + + + + + + +

2d.composite.globalAlpha.imagepattern

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.invalid.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.invalid.html new file mode 100644 index 0000000000..db67f882f6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.invalid.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.composite.globalAlpha.invalid + + + + + + +

2d.composite.globalAlpha.invalid

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.range.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.range.html new file mode 100644 index 0000000000..883b0cac69 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.globalAlpha.range.html @@ -0,0 +1,38 @@ + + +Canvas test: 2d.composite.globalAlpha.range + + + + + + +

2d.composite.globalAlpha.range

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.clear.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.clear.html new file mode 100644 index 0000000000..a44f8e35b0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.clear.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.image.clear + + + + + + +

2d.composite.image.clear

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.clear.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.clear.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.clear.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.copy.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.copy.html new file mode 100644 index 0000000000..d3c972b6d2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.copy.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.image.copy + + + + + + +

2d.composite.image.copy

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.copy.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.copy.png new file mode 100644 index 0000000000..f5e9c21964 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.copy.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-atop.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-atop.html new file mode 100644 index 0000000000..7c6f93448b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-atop.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.image.destination-atop + + + + + + +

2d.composite.image.destination-atop

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-atop.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-atop.png new file mode 100644 index 0000000000..504b42756e Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-atop.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-in.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-in.html new file mode 100644 index 0000000000..a2bf972bb9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-in.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.image.destination-in + + + + + + +

2d.composite.image.destination-in

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-in.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-in.png new file mode 100644 index 0000000000..790e418a6b Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-in.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-out.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-out.html new file mode 100644 index 0000000000..d0d08fa09e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-out.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.image.destination-out + + + + + + +

2d.composite.image.destination-out

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-out.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-out.png new file mode 100644 index 0000000000..7f5ed1a836 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-out.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-over.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-over.html new file mode 100644 index 0000000000..7ac98904f3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-over.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.image.destination-over + + + + + + +

2d.composite.image.destination-over

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-over.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-over.png new file mode 100644 index 0000000000..226390b2f8 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.destination-over.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.lighter.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.lighter.html new file mode 100644 index 0000000000..1df4c683df --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.lighter.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.image.lighter + + + + + + +

2d.composite.image.lighter

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.lighter.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.lighter.png new file mode 100644 index 0000000000..fc33f3301e Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.lighter.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-atop.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-atop.html new file mode 100644 index 0000000000..86833df6b2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-atop.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.image.source-atop + + + + + + +

2d.composite.image.source-atop

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-atop.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-atop.png new file mode 100644 index 0000000000..1ef9630195 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-atop.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-in.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-in.html new file mode 100644 index 0000000000..0b6ca4b52e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-in.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.image.source-in + + + + + + +

2d.composite.image.source-in

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-in.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-in.png new file mode 100644 index 0000000000..c26cdccf02 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-in.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-out.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-out.html new file mode 100644 index 0000000000..31dfe471e5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-out.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.image.source-out + + + + + + +

2d.composite.image.source-out

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-out.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-out.png new file mode 100644 index 0000000000..c26cdccf02 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-out.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-over.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-over.html new file mode 100644 index 0000000000..e396faa5d7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-over.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.image.source-over + + + + + + +

2d.composite.image.source-over

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-over.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-over.png new file mode 100644 index 0000000000..e63ab7e308 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.source-over.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.xor.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.xor.html new file mode 100644 index 0000000000..d43742c272 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.xor.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.image.xor + + + + + + +

2d.composite.image.xor

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.xor.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.xor.png new file mode 100644 index 0000000000..1ef9630195 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.image.xor.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.casesensitive.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.casesensitive.html new file mode 100644 index 0000000000..13ae99b35f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.casesensitive.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.composite.operation.casesensitive + + + + + + +

2d.composite.operation.casesensitive

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.clear.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.clear.html new file mode 100644 index 0000000000..c1e88b4894 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.clear.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.composite.operation.clear + + + + + + +

2d.composite.operation.clear

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.darker.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.darker.html new file mode 100644 index 0000000000..4fb6998f71 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.darker.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.composite.operation.darker + + + + + + +

2d.composite.operation.darker

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.default.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.default.html new file mode 100644 index 0000000000..5ccd488b3c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.default.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.composite.operation.default + + + + + + +

2d.composite.operation.default

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.get.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.get.html new file mode 100644 index 0000000000..27b89c9fed --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.get.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.composite.operation.get + + + + + + +

2d.composite.operation.get

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.highlight.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.highlight.html new file mode 100644 index 0000000000..45c5dd15eb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.highlight.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.composite.operation.highlight + + + + + + +

2d.composite.operation.highlight

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.nullsuffix.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.nullsuffix.html new file mode 100644 index 0000000000..8a2443ff41 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.nullsuffix.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.composite.operation.nullsuffix + + + + + + +

2d.composite.operation.nullsuffix

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.over.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.over.html new file mode 100644 index 0000000000..1d742ef3cc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.over.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.composite.operation.over + + + + + + +

2d.composite.operation.over

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.unrecognised.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.unrecognised.html new file mode 100644 index 0000000000..e4aa877d96 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.operation.unrecognised.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.composite.operation.unrecognised + + + + + + +

2d.composite.operation.unrecognised

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.clear.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.clear.html new file mode 100644 index 0000000000..a946989544 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.clear.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.solid.clear + + + + + + +

2d.composite.solid.clear

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.clear.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.clear.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.clear.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.copy.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.copy.html new file mode 100644 index 0000000000..14bee74452 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.copy.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.solid.copy + + + + + + +

2d.composite.solid.copy

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.copy.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.copy.png new file mode 100644 index 0000000000..fc0883e74f Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.copy.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-atop.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-atop.html new file mode 100644 index 0000000000..d82fb44cce --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-atop.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.solid.destination-atop + + + + + + +

2d.composite.solid.destination-atop

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-atop.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-atop.png new file mode 100644 index 0000000000..dd04072baf Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-atop.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-in.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-in.html new file mode 100644 index 0000000000..6a491f57c7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-in.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.solid.destination-in + + + + + + +

2d.composite.solid.destination-in

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-in.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-in.png new file mode 100644 index 0000000000..dd04072baf Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-in.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-out.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-out.html new file mode 100644 index 0000000000..bcc7f24e7a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-out.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.solid.destination-out + + + + + + +

2d.composite.solid.destination-out

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-out.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-out.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-out.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-over.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-over.html new file mode 100644 index 0000000000..6e634e6ae5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-over.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.solid.destination-over + + + + + + +

2d.composite.solid.destination-over

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-over.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-over.png new file mode 100644 index 0000000000..dd04072baf Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.destination-over.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.lighter.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.lighter.html new file mode 100644 index 0000000000..fddbe92420 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.lighter.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.solid.lighter + + + + + + +

2d.composite.solid.lighter

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.lighter.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.lighter.png new file mode 100644 index 0000000000..bf48767a88 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.lighter.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-atop.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-atop.html new file mode 100644 index 0000000000..4bb0e3d8b5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-atop.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.solid.source-atop + + + + + + +

2d.composite.solid.source-atop

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-atop.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-atop.png new file mode 100644 index 0000000000..fc0883e74f Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-atop.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-in.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-in.html new file mode 100644 index 0000000000..f8fee40a93 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-in.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.solid.source-in + + + + + + +

2d.composite.solid.source-in

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-in.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-in.png new file mode 100644 index 0000000000..fc0883e74f Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-in.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-out.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-out.html new file mode 100644 index 0000000000..2c9d086182 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-out.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.solid.source-out + + + + + + +

2d.composite.solid.source-out

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-out.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-out.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-out.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-over.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-over.html new file mode 100644 index 0000000000..335987b12b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-over.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.solid.source-over + + + + + + +

2d.composite.solid.source-over

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-over.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-over.png new file mode 100644 index 0000000000..fc0883e74f Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.source-over.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.xor.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.xor.html new file mode 100644 index 0000000000..d9da43070e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.xor.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.solid.xor + + + + + + +

2d.composite.solid.xor

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.xor.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.xor.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.solid.xor.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.clear.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.clear.html new file mode 100644 index 0000000000..de417eea34 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.clear.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.transparent.clear + + + + + + +

2d.composite.transparent.clear

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.clear.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.clear.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.clear.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.copy.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.copy.html new file mode 100644 index 0000000000..2048975ec3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.copy.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.transparent.copy + + + + + + +

2d.composite.transparent.copy

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.copy.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.copy.png new file mode 100644 index 0000000000..b0cbe3a552 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.copy.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-atop.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-atop.html new file mode 100644 index 0000000000..1da1f1a4ee --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-atop.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.transparent.destination-atop + + + + + + +

2d.composite.transparent.destination-atop

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-atop.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-atop.png new file mode 100644 index 0000000000..5db0a0484a Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-atop.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-in.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-in.html new file mode 100644 index 0000000000..b0f8abe0ef --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-in.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.transparent.destination-in + + + + + + +

2d.composite.transparent.destination-in

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-in.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-in.png new file mode 100644 index 0000000000..c6895de985 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-in.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-out.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-out.html new file mode 100644 index 0000000000..badbfc4ad7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-out.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.transparent.destination-out + + + + + + +

2d.composite.transparent.destination-out

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-out.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-out.png new file mode 100644 index 0000000000..873a9c45d8 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-out.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-over.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-over.html new file mode 100644 index 0000000000..e8e0051b2c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-over.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.transparent.destination-over + + + + + + +

2d.composite.transparent.destination-over

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-over.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-over.png new file mode 100644 index 0000000000..5a8726bbca Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.destination-over.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.lighter.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.lighter.html new file mode 100644 index 0000000000..6e4c42ab9a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.lighter.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.transparent.lighter + + + + + + +

2d.composite.transparent.lighter

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.lighter.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.lighter.png new file mode 100644 index 0000000000..0e1c28c0cd Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.lighter.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-atop.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-atop.html new file mode 100644 index 0000000000..d3d3fbda12 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-atop.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.transparent.source-atop + + + + + + +

2d.composite.transparent.source-atop

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-atop.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-atop.png new file mode 100644 index 0000000000..e0afff6b00 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-atop.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-in.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-in.html new file mode 100644 index 0000000000..27c66cb673 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-in.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.transparent.source-in + + + + + + +

2d.composite.transparent.source-in

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-in.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-in.png new file mode 100644 index 0000000000..1459b5e54e Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-in.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-out.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-out.html new file mode 100644 index 0000000000..31bb6a2403 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-out.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.transparent.source-out + + + + + + +

2d.composite.transparent.source-out

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-out.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-out.png new file mode 100644 index 0000000000..1459b5e54e Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-out.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-over.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-over.html new file mode 100644 index 0000000000..ee20f52b46 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-over.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.transparent.source-over + + + + + + +

2d.composite.transparent.source-over

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-over.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-over.png new file mode 100644 index 0000000000..02acb7a861 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.source-over.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.xor.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.xor.html new file mode 100644 index 0000000000..d1818750df --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.xor.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.transparent.xor + + + + + + +

2d.composite.transparent.xor

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.xor.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.xor.png new file mode 100644 index 0000000000..e0afff6b00 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.transparent.xor.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.copy.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.copy.html new file mode 100644 index 0000000000..9dfd650b98 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.copy.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.composite.uncovered.fill.copy + + + + + + +

2d.composite.uncovered.fill.copy

+

fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.copy.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.copy.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.copy.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.destination-atop.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.destination-atop.html new file mode 100644 index 0000000000..685a139504 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.destination-atop.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.composite.uncovered.fill.destination-atop + + + + + + +

2d.composite.uncovered.fill.destination-atop

+

fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.destination-atop.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.destination-atop.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.destination-atop.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.destination-in.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.destination-in.html new file mode 100644 index 0000000000..9ca8021151 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.destination-in.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.composite.uncovered.fill.destination-in + + + + + + +

2d.composite.uncovered.fill.destination-in

+

fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.destination-in.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.destination-in.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.destination-in.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.source-in.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.source-in.html new file mode 100644 index 0000000000..9f1a5f9d51 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.source-in.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.composite.uncovered.fill.source-in + + + + + + +

2d.composite.uncovered.fill.source-in

+

fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.source-in.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.source-in.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.source-in.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.source-out.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.source-out.html new file mode 100644 index 0000000000..7653677fd5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.source-out.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.composite.uncovered.fill.source-out + + + + + + +

2d.composite.uncovered.fill.source-out

+

fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.source-out.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.source-out.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.fill.source-out.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.copy.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.copy.html new file mode 100644 index 0000000000..61dd0381ee --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.copy.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.composite.uncovered.image.copy + + + + + + +

2d.composite.uncovered.image.copy

+

drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.copy.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.copy.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.copy.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.destination-atop.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.destination-atop.html new file mode 100644 index 0000000000..440c832c71 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.destination-atop.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.composite.uncovered.image.destination-atop + + + + + + +

2d.composite.uncovered.image.destination-atop

+

drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.destination-atop.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.destination-atop.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.destination-atop.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.destination-in.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.destination-in.html new file mode 100644 index 0000000000..03e2e807ed --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.destination-in.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.composite.uncovered.image.destination-in + + + + + + +

2d.composite.uncovered.image.destination-in

+

drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.destination-in.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.destination-in.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.destination-in.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.source-in.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.source-in.html new file mode 100644 index 0000000000..de2e5fad63 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.source-in.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.composite.uncovered.image.source-in + + + + + + +

2d.composite.uncovered.image.source-in

+

drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.source-in.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.source-in.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.source-in.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.source-out.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.source-out.html new file mode 100644 index 0000000000..5cb9b072b9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.source-out.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.composite.uncovered.image.source-out + + + + + + +

2d.composite.uncovered.image.source-out

+

drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.source-out.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.source-out.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.image.source-out.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.copy.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.copy.html new file mode 100644 index 0000000000..cac66ade5a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.copy.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.uncovered.nocontext.copy + + + + + + +

2d.composite.uncovered.nocontext.copy

+

drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.copy.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.copy.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.copy.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.destination-atop.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.destination-atop.html new file mode 100644 index 0000000000..c7cecc2e3d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.destination-atop.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.uncovered.nocontext.destination-atop + + + + + + +

2d.composite.uncovered.nocontext.destination-atop

+

drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.destination-atop.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.destination-atop.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.destination-atop.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.destination-in.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.destination-in.html new file mode 100644 index 0000000000..e090d7d4b4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.destination-in.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.uncovered.nocontext.destination-in + + + + + + +

2d.composite.uncovered.nocontext.destination-in

+

drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.destination-in.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.destination-in.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.destination-in.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.source-in.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.source-in.html new file mode 100644 index 0000000000..0436b40817 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.source-in.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.uncovered.nocontext.source-in + + + + + + +

2d.composite.uncovered.nocontext.source-in

+

drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.source-in.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.source-in.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.source-in.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.source-out.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.source-out.html new file mode 100644 index 0000000000..efbc8ab2f0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.source-out.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.composite.uncovered.nocontext.source-out + + + + + + +

2d.composite.uncovered.nocontext.source-out

+

drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.source-out.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.source-out.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.source-out.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.copy.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.copy.html new file mode 100644 index 0000000000..aaee92022a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.copy.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.composite.uncovered.pattern.copy + + + + + + +

2d.composite.uncovered.pattern.copy

+

Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.copy.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.copy.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.copy.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.destination-atop.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.destination-atop.html new file mode 100644 index 0000000000..aded018f8e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.destination-atop.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.composite.uncovered.pattern.destination-atop + + + + + + +

2d.composite.uncovered.pattern.destination-atop

+

Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.destination-atop.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.destination-atop.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.destination-atop.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.destination-in.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.destination-in.html new file mode 100644 index 0000000000..e520e1ffa3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.destination-in.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.composite.uncovered.pattern.destination-in + + + + + + +

2d.composite.uncovered.pattern.destination-in

+

Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.destination-in.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.destination-in.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.destination-in.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.source-in.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.source-in.html new file mode 100644 index 0000000000..bee654877b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.source-in.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.composite.uncovered.pattern.source-in + + + + + + +

2d.composite.uncovered.pattern.source-in

+

Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.source-in.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.source-in.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.source-in.png differ diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.source-out.html b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.source-out.html new file mode 100644 index 0000000000..947893091e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.source-out.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.composite.uncovered.pattern.source-out + + + + + + +

2d.composite.uncovered.pattern.source-out

+

Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.source-out.png b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.source-out.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.source-out.png differ diff --git a/testing/web-platform/tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.basics.html b/testing/web-platform/tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.basics.html new file mode 100644 index 0000000000..cea531f9db --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.basics.html @@ -0,0 +1,61 @@ + + +Canvas test: 2d.conformance.requirements.basics + + + + + + +

2d.conformance.requirements.basics

+

void methods return undefined

+ +

Defined in "Web IDL" (draft) +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.delete.html b/testing/web-platform/tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.delete.html new file mode 100644 index 0000000000..a33cc869d6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.delete.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.conformance.requirements.delete + + + + + + +

2d.conformance.requirements.delete

+

window.CanvasRenderingContext2D is Configurable

+ +

Defined in "Web IDL" (draft) +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.drawings.html b/testing/web-platform/tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.drawings.html new file mode 100644 index 0000000000..efdad2eab9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.drawings.html @@ -0,0 +1,27 @@ + + +Canvas test: 2d.conformance.requirements.drawings + + + + + + +

2d.conformance.requirements.drawings

+

void methods return undefined

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + + diff --git a/testing/web-platform/tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.missingargs.html b/testing/web-platform/tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.missingargs.html new file mode 100644 index 0000000000..6744c6c381 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.missingargs.html @@ -0,0 +1,140 @@ + + +Canvas test: 2d.conformance.requirements.missingargs + + + + + + +

2d.conformance.requirements.missingargs

+

Missing arguments cause TypeError

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.3arg.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.3arg.html new file mode 100644 index 0000000000..d9e2de563b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.3arg.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.drawImage.3arg + + + + + + +

2d.drawImage.3arg

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.5arg.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.5arg.html new file mode 100644 index 0000000000..befa7108f8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.5arg.html @@ -0,0 +1,45 @@ + + +Canvas test: 2d.drawImage.5arg + + + + + + +

2d.drawImage.5arg

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html new file mode 100644 index 0000000000..f71eebc2e0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html @@ -0,0 +1,38 @@ + + +Canvas test: 2d.drawImage.9arg.basic + + + + + + +

2d.drawImage.9arg.basic

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.html new file mode 100644 index 0000000000..98da8eccbd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.drawImage.9arg.destpos + + + + + + +

2d.drawImage.9arg.destpos

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.html new file mode 100644 index 0000000000..f21096cd96 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.html @@ -0,0 +1,46 @@ + + +Canvas test: 2d.drawImage.9arg.destsize + + + + + + +

2d.drawImage.9arg.destsize

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html new file mode 100644 index 0000000000..ca4cc18948 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.drawImage.9arg.sourcepos + + + + + + +

2d.drawImage.9arg.sourcepos

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html new file mode 100644 index 0000000000..fb38943cfa --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.drawImage.9arg.sourcesize + + + + + + +

2d.drawImage.9arg.sourcesize

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.alpha.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.alpha.html new file mode 100644 index 0000000000..52acd11803 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.alpha.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.drawImage.alpha + + + + + + +

2d.drawImage.alpha

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.gif.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.gif.html new file mode 100644 index 0000000000..6330d06ade --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.gif.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.drawImage.animated.gif + + + + + + +

2d.drawImage.animated.gif

+

drawImage() of an animated GIF draws the first frame

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.broken.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.broken.html new file mode 100644 index 0000000000..f6516a8ecc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.broken.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.drawImage.broken + + + + + + +

2d.drawImage.broken

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.canvas.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.canvas.html new file mode 100644 index 0000000000..d1f9aeb326 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.canvas.html @@ -0,0 +1,46 @@ + + +Canvas test: 2d.drawImage.canvas + + + + + + +

2d.drawImage.canvas

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.clip.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.clip.html new file mode 100644 index 0000000000..70ec029d8e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.clip.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.drawImage.clip + + + + + + +

2d.drawImage.clip

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.composite.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.composite.html new file mode 100644 index 0000000000..4ff2026aad --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.composite.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.drawImage.composite + + + + + + +

2d.drawImage.composite

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.floatsource.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.floatsource.html new file mode 100644 index 0000000000..3e100c257f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.floatsource.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.drawImage.floatsource + + + + + + +

2d.drawImage.floatsource

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.emptysrc.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.emptysrc.html new file mode 100644 index 0000000000..849f41aaf6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.emptysrc.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.drawImage.incomplete.emptysrc + + + + + + +

2d.drawImage.incomplete.emptysrc

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.immediate.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.immediate.html new file mode 100644 index 0000000000..d2e8108d90 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.immediate.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.drawImage.incomplete.immediate + + + + + + +

2d.drawImage.incomplete.immediate

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.nosrc.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.nosrc.html new file mode 100644 index 0000000000..dccf75c6d8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.nosrc.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.drawImage.incomplete.nosrc + + + + + + +

2d.drawImage.incomplete.nosrc

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.reload.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.reload.html new file mode 100644 index 0000000000..b4a8440e46 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.reload.html @@ -0,0 +1,38 @@ + + +Canvas test: 2d.drawImage.incomplete.reload + + + + + + +

2d.drawImage.incomplete.reload

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.removedsrc.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.removedsrc.html new file mode 100644 index 0000000000..91e11eb15c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.removedsrc.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.drawImage.incomplete.removedsrc + + + + + + +

2d.drawImage.incomplete.removedsrc

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativedest.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativedest.html new file mode 100644 index 0000000000..94d4f71a7e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativedest.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.drawImage.negativedest + + + + + + +

2d.drawImage.negativedest

+

Negative destination width/height represents the correct rectangle

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativedir.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativedir.html new file mode 100644 index 0000000000..281da9a573 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativedir.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.drawImage.negativedir + + + + + + +

2d.drawImage.negativedir

+

Negative dimensions do not affect the direction of the image

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativesource.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativesource.html new file mode 100644 index 0000000000..5a504973d1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativesource.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.drawImage.negativesource + + + + + + +

2d.drawImage.negativesource

+

Negative source width/height represents the correct rectangle

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nonexistent.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nonexistent.html new file mode 100644 index 0000000000..0cebf6cf68 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nonexistent.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.drawImage.nonexistent + + + + + + +

2d.drawImage.nonexistent

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html new file mode 100644 index 0000000000..8225d15fdd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html @@ -0,0 +1,335 @@ + + +Canvas test: 2d.drawImage.nonfinite + + + + + + +

2d.drawImage.nonfinite

+

drawImage() with Infinity/NaN is ignored

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nowrap.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nowrap.html new file mode 100644 index 0000000000..8c32461b3a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nowrap.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.drawImage.nowrap + + + + + + +

2d.drawImage.nowrap

+

Stretched images do not get pixels wrapping around the edges

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.null.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.null.html new file mode 100644 index 0000000000..0f46c97dce --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.null.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.drawImage.null + + + + + + +

2d.drawImage.null

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.path.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.path.html new file mode 100644 index 0000000000..52852ec32e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.path.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.drawImage.path + + + + + + +

2d.drawImage.path

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.self.1.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.self.1.html new file mode 100644 index 0000000000..90eaaea5d9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.self.1.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.drawImage.self.1 + + + + + + +

2d.drawImage.self.1

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.self.2.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.self.2.html new file mode 100644 index 0000000000..39e619ddc5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.self.2.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.drawImage.self.2 + + + + + + +

2d.drawImage.self.2

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.svg.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.svg.html new file mode 100644 index 0000000000..bcfcdadb28 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.svg.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.drawImage.svg + + + + + + +

2d.drawImage.svg

+

drawImage() of an SVG image

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.transform.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.transform.html new file mode 100644 index 0000000000..42a277e200 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.transform.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.drawImage.transform + + + + + + +

2d.drawImage.transform

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.wrongtype.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.wrongtype.html new file mode 100644 index 0000000000..73e8f45090 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.wrongtype.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.drawImage.wrongtype + + + + + + +

2d.drawImage.wrongtype

+

Incorrect image types in drawImage do not match any defined overloads, so WebIDL throws a TypeError

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.wrongtype.paragraph.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.wrongtype.paragraph.html new file mode 100644 index 0000000000..ef0be39ca7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.wrongtype.paragraph.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.drawImage.wrongtype.paragraph + + + + + + +

2d.drawImage.wrongtype.paragraph

+

Incorrect image types in drawImage do not match any defined overloads, so WebIDL throws a TypeError

+ +

Defined in "Web IDL" (draft) +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.html new file mode 100644 index 0000000000..d3c644cf88 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.drawImage.zerocanvas + + + + + + +

2d.drawImage.zerocanvas

+

drawImage with zero-sized canvas as the source shoud throw exception

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.html new file mode 100644 index 0000000000..2b7b4ebea6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.drawImage.zerosource + + + + + + +

2d.drawImage.zerosource

+

drawImage with zero-sized source rectangle draws nothing without exception

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html new file mode 100644 index 0000000000..ea00f1f9a1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html @@ -0,0 +1,46 @@ + + +Canvas test: 2d.drawImage.zerosource.image + + + + + + +

2d.drawImage.zerosource.image

+

drawImage with zero-sized source rectangle from image draws nothing without exception

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.basic.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.basic.html new file mode 100644 index 0000000000..78a8c3ac06 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.basic.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.clearRect.basic + + + + + + +

2d.clearRect.basic

+

clearRect clears to transparent black

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.clip.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.clip.html new file mode 100644 index 0000000000..eb43a401e7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.clip.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.clearRect.clip + + + + + + +

2d.clearRect.clip

+

clearRect is affected by clipping regions

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.html new file mode 100644 index 0000000000..73b87ecc81 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.clearRect.globalalpha + + + + + + +

2d.clearRect.globalalpha

+

clearRect is not affected by globalAlpha

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.html new file mode 100644 index 0000000000..9eb3d33834 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.clearRect.globalcomposite + + + + + + +

2d.clearRect.globalcomposite

+

clearRect is not affected by globalCompositeOperation

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.negative.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.negative.html new file mode 100644 index 0000000000..baa48e2ba3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.negative.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.clearRect.negative + + + + + + +

2d.clearRect.negative

+

clearRect of negative sizes works

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.html new file mode 100644 index 0000000000..726ed05772 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.html @@ -0,0 +1,51 @@ + + +Canvas test: 2d.clearRect.nonfinite + + + + + + +

2d.clearRect.nonfinite

+

clearRect() with Infinity/NaN is ignored

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.path.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.path.html new file mode 100644 index 0000000000..77c9c037b7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.path.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.clearRect.path + + + + + + +

2d.clearRect.path

+

clearRect does not affect the current path

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.html new file mode 100644 index 0000000000..8240073a28 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.clearRect.shadow + + + + + + +

2d.clearRect.shadow

+

clearRect does not draw shadows

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.transform.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.transform.html new file mode 100644 index 0000000000..347bedb835 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.transform.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.clearRect.transform + + + + + + +

2d.clearRect.transform

+

clearRect is affected by transforms

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.zero.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.zero.html new file mode 100644 index 0000000000..2c192a7102 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.zero.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.clearRect.zero + + + + + + +

2d.clearRect.zero

+

clearRect of zero pixels has no effect

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.basic.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.basic.html new file mode 100644 index 0000000000..f29daf426a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.basic.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.fillRect.basic + + + + + + +

2d.fillRect.basic

+

fillRect works

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.clip.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.clip.html new file mode 100644 index 0000000000..cc46b765d4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.clip.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.fillRect.clip + + + + + + +

2d.fillRect.clip

+

fillRect is affected by clipping regions

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.negative.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.negative.html new file mode 100644 index 0000000000..7c64952e8b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.negative.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.fillRect.negative + + + + + + +

2d.fillRect.negative

+

fillRect of negative sizes works

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.html new file mode 100644 index 0000000000..090607766d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.html @@ -0,0 +1,52 @@ + + +Canvas test: 2d.fillRect.nonfinite + + + + + + +

2d.fillRect.nonfinite

+

fillRect() with Infinity/NaN is ignored

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.path.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.path.html new file mode 100644 index 0000000000..39a6e18103 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.path.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.fillRect.path + + + + + + +

2d.fillRect.path

+

fillRect does not affect the current path

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.html new file mode 100644 index 0000000000..48aa8538f1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.fillRect.shadow + + + + + + +

2d.fillRect.shadow

+

fillRect draws shadows

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.transform.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.transform.html new file mode 100644 index 0000000000..de6f790bc7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.transform.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.fillRect.transform + + + + + + +

2d.fillRect.transform

+

fillRect is affected by transforms

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.zero.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.zero.html new file mode 100644 index 0000000000..095eb19a66 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.zero.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.fillRect.zero + + + + + + +

2d.fillRect.zero

+

fillRect of zero pixels has no effect

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.html new file mode 100644 index 0000000000..d2ea813178 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.strokeRect.basic + + + + + + +

2d.strokeRect.basic

+

strokeRect works

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.html new file mode 100644 index 0000000000..31db69b6cd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.strokeRect.clip + + + + + + +

2d.strokeRect.clip

+

strokeRect is affected by clipping regions

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.html new file mode 100644 index 0000000000..323b663145 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.strokeRect.globalalpha + + + + + + +

2d.strokeRect.globalalpha

+

strokeRect is affected by globalAlpha

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.html new file mode 100644 index 0000000000..671db7f07a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.strokeRect.globalcomposite + + + + + + +

2d.strokeRect.globalcomposite

+

strokeRect is not affected by globalCompositeOperation

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.html new file mode 100644 index 0000000000..20bbc5bafe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.strokeRect.negative + + + + + + +

2d.strokeRect.negative

+

strokeRect of negative sizes works

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.html new file mode 100644 index 0000000000..af7a393c8f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.html @@ -0,0 +1,53 @@ + + +Canvas test: 2d.strokeRect.nonfinite + + + + + + +

2d.strokeRect.nonfinite

+

strokeRect() with Infinity/NaN is ignored

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.path.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.path.html new file mode 100644 index 0000000000..121789d864 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.path.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.strokeRect.path + + + + + + +

2d.strokeRect.path

+

strokeRect does not affect the current path

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.html new file mode 100644 index 0000000000..8e7a50a745 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.strokeRect.shadow + + + + + + +

2d.strokeRect.shadow

+

strokeRect draws shadows

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.html new file mode 100644 index 0000000000..312b9d2003 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.strokeRect.transform + + + + + + +

2d.strokeRect.transform

+

fillRect is affected by transforms

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.html new file mode 100644 index 0000000000..c140a2668b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.strokeRect.zero.1 + + + + + + +

2d.strokeRect.zero.1

+

strokeRect of 0x0 pixels draws nothing

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.html new file mode 100644 index 0000000000..f17620a302 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.strokeRect.zero.2 + + + + + + +

2d.strokeRect.zero.2

+

strokeRect of 0x0 pixels draws nothing, including caps and joins

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.html new file mode 100644 index 0000000000..e671ae4116 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.strokeRect.zero.3 + + + + + + +

2d.strokeRect.zero.3

+

strokeRect of Nx0 pixels draws a straight line

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.html new file mode 100644 index 0000000000..ff3c4040b3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.strokeRect.zero.4 + + + + + + +

2d.strokeRect.zero.4

+

strokeRect of Nx0 pixels draws a closed line with no caps

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.html b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.html new file mode 100644 index 0000000000..809781ab43 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.strokeRect.zero.5 + + + + + + +

2d.strokeRect.zero.5

+

strokeRect of Nx0 pixels draws a closed line with joins

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.CSSHSL.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.CSSHSL.html new file mode 100644 index 0000000000..481d6fe9e5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.CSSHSL.html @@ -0,0 +1,50 @@ + + +Canvas test: 2d.fillStyle.CSSHSL + + + + + + +

2d.fillStyle.CSSHSL

+

CSSHSL works as color input

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.CSSRGB.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.CSSRGB.html new file mode 100644 index 0000000000..cfdb603d5d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.CSSRGB.html @@ -0,0 +1,59 @@ + + +Canvas test: 2d.fillStyle.CSSRGB + + + + + + +

2d.fillStyle.CSSRGB

+

CSSRGB works as color input

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.colorObject.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.colorObject.html new file mode 100644 index 0000000000..ae6507350c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.colorObject.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.fillStyle.colorObject + + + + + + +

2d.fillStyle.colorObject

+

ctx.fillStyle works with color objects

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.colorObject.transparency.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.colorObject.transparency.html new file mode 100644 index 0000000000..b48715f093 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.colorObject.transparency.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.fillStyle.colorObject.transparency + + + + + + +

2d.fillStyle.colorObject.transparency

+

ctx.fillStyle with color objects has transparency

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.colormix.currentcolor.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.colormix.currentcolor.html new file mode 100644 index 0000000000..191395a20b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.colormix.currentcolor.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.fillStyle.colormix.currentcolor + + + + + + +

2d.fillStyle.colormix.currentcolor

+

color-mix works as color input with currentcolor

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.colormix.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.colormix.html new file mode 100644 index 0000000000..1faa6c0a9f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.colormix.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.colormix + + + + + + +

2d.fillStyle.colormix

+

color-mix works as color input

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.default.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.default.html new file mode 100644 index 0000000000..1bd3e2d4ad --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.default.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.fillStyle.default + + + + + + +

2d.fillStyle.default

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.halftransparent.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.halftransparent.html new file mode 100644 index 0000000000..423293e1b6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.halftransparent.html @@ -0,0 +1,27 @@ + + +Canvas test: 2d.fillStyle.get.halftransparent + + + + + + +

2d.fillStyle.get.halftransparent

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.semitransparent.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.semitransparent.html new file mode 100644 index 0000000000..ec63d7662d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.semitransparent.html @@ -0,0 +1,27 @@ + + +Canvas test: 2d.fillStyle.get.semitransparent + + + + + + +

2d.fillStyle.get.semitransparent

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.solid.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.solid.html new file mode 100644 index 0000000000..bcdd57a7ca --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.solid.html @@ -0,0 +1,27 @@ + + +Canvas test: 2d.fillStyle.get.solid + + + + + + +

2d.fillStyle.get.solid

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.transparent.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.transparent.html new file mode 100644 index 0000000000..21931aaf23 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.transparent.html @@ -0,0 +1,27 @@ + + +Canvas test: 2d.fillStyle.get.transparent + + + + + + +

2d.fillStyle.get.transparent

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.invalidstring.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.invalidstring.html new file mode 100644 index 0000000000..9fb83063f6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.invalidstring.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.fillStyle.invalidstring + + + + + + +

2d.fillStyle.invalidstring

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.invalidtype.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.invalidtype.html new file mode 100644 index 0000000000..84d8fbd3ff --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.invalidtype.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.fillStyle.invalidtype + + + + + + +

2d.fillStyle.invalidtype

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.html new file mode 100644 index 0000000000..87b5bc9371 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-hsl-1 + + + + + + +

2d.fillStyle.parse.css-color-4-hsl-1

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.html new file mode 100644 index 0000000000..746c358dbb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-hsl-2 + + + + + + +

2d.fillStyle.parse.css-color-4-hsl-2

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.png new file mode 100644 index 0000000000..c5661de82b Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.html new file mode 100644 index 0000000000..b8a9cd5a09 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-hsl-3 + + + + + + +

2d.fillStyle.parse.css-color-4-hsl-3

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.png new file mode 100644 index 0000000000..c5661de82b Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.html new file mode 100644 index 0000000000..d5e58b9321 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-hsl-4 + + + + + + +

2d.fillStyle.parse.css-color-4-hsl-4

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.png new file mode 100644 index 0000000000..c5661de82b Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.html new file mode 100644 index 0000000000..85bbb802b5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-hsl-5 + + + + + + +

2d.fillStyle.parse.css-color-4-hsl-5

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.png new file mode 100644 index 0000000000..c5661de82b Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.html new file mode 100644 index 0000000000..154bdcd49a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-hsl-6 + + + + + + +

2d.fillStyle.parse.css-color-4-hsl-6

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.html new file mode 100644 index 0000000000..5cf81e41a1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-hsl-7 + + + + + + +

2d.fillStyle.parse.css-color-4-hsl-7

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.html new file mode 100644 index 0000000000..17d0782df1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-hsl-8 + + + + + + +

2d.fillStyle.parse.css-color-4-hsl-8

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.html new file mode 100644 index 0000000000..2f4b1e8e1a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-hsl-9 + + + + + + +

2d.fillStyle.parse.css-color-4-hsl-9

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.html new file mode 100644 index 0000000000..bc70e21d62 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-hsla-1 + + + + + + +

2d.fillStyle.parse.css-color-4-hsla-1

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.html new file mode 100644 index 0000000000..7f77498531 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-hsla-2 + + + + + + +

2d.fillStyle.parse.css-color-4-hsla-2

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.png new file mode 100644 index 0000000000..c5661de82b Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.html new file mode 100644 index 0000000000..c33a50a946 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-hsla-3 + + + + + + +

2d.fillStyle.parse.css-color-4-hsla-3

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.png new file mode 100644 index 0000000000..c5661de82b Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.html new file mode 100644 index 0000000000..3d0cafc66b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-hsla-4 + + + + + + +

2d.fillStyle.parse.css-color-4-hsla-4

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.png new file mode 100644 index 0000000000..c5661de82b Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.html new file mode 100644 index 0000000000..a70613b49f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-hsla-5 + + + + + + +

2d.fillStyle.parse.css-color-4-hsla-5

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.png new file mode 100644 index 0000000000..c5661de82b Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.html new file mode 100644 index 0000000000..8c46d887ba --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-hsla-6 + + + + + + +

2d.fillStyle.parse.css-color-4-hsla-6

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.html new file mode 100644 index 0000000000..b6b4760086 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-hsla-7 + + + + + + +

2d.fillStyle.parse.css-color-4-hsla-7

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.html new file mode 100644 index 0000000000..7933d47fd2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-hsla-8 + + + + + + +

2d.fillStyle.parse.css-color-4-hsla-8

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.html new file mode 100644 index 0000000000..8a4e29d40e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-hsla-9 + + + + + + +

2d.fillStyle.parse.css-color-4-hsla-9

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.html new file mode 100644 index 0000000000..632b7f57fb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-rgb-1 + + + + + + +

2d.fillStyle.parse.css-color-4-rgb-1

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.html new file mode 100644 index 0000000000..1d3e683b35 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-rgb-2 + + + + + + +

2d.fillStyle.parse.css-color-4-rgb-2

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.png new file mode 100644 index 0000000000..c5661de82b Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.html new file mode 100644 index 0000000000..8a6f352350 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-rgb-3 + + + + + + +

2d.fillStyle.parse.css-color-4-rgb-3

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.png new file mode 100644 index 0000000000..c5661de82b Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.html new file mode 100644 index 0000000000..1fdf9ecf92 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-rgb-4 + + + + + + +

2d.fillStyle.parse.css-color-4-rgb-4

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-5.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-5.html new file mode 100644 index 0000000000..a1d99d5e24 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-5.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-rgb-5 + + + + + + +

2d.fillStyle.parse.css-color-4-rgb-5

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-5.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-5.png new file mode 100644 index 0000000000..c5661de82b Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-5.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.html new file mode 100644 index 0000000000..ad2c5f5484 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-rgb-6 + + + + + + +

2d.fillStyle.parse.css-color-4-rgb-6

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.png new file mode 100644 index 0000000000..c5661de82b Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.html new file mode 100644 index 0000000000..f394dbfb2f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-rgba-1 + + + + + + +

2d.fillStyle.parse.css-color-4-rgba-1

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-2.html new file mode 100644 index 0000000000..5529bc1462 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-2.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-rgba-2 + + + + + + +

2d.fillStyle.parse.css-color-4-rgba-2

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-2.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-2.png new file mode 100644 index 0000000000..c5661de82b Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-2.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.html new file mode 100644 index 0000000000..82047a5698 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-rgba-3 + + + + + + +

2d.fillStyle.parse.css-color-4-rgba-3

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.png new file mode 100644 index 0000000000..c5661de82b Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.html new file mode 100644 index 0000000000..5fea546f10 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-rgba-4 + + + + + + +

2d.fillStyle.parse.css-color-4-rgba-4

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.html new file mode 100644 index 0000000000..d048566522 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-rgba-5 + + + + + + +

2d.fillStyle.parse.css-color-4-rgba-5

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.png new file mode 100644 index 0000000000..c5661de82b Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.html new file mode 100644 index 0000000000..28feb2eb17 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.css-color-4-rgba-6 + + + + + + +

2d.fillStyle.parse.css-color-4-rgba-6

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.png new file mode 100644 index 0000000000..c5661de82b Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.current.basic.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.current.basic.html new file mode 100644 index 0000000000..a1481e36e1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.current.basic.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.fillStyle.parse.current.basic + + + + + + +

2d.fillStyle.parse.current.basic

+

currentColor is computed from the canvas element

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.current.changed.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.current.changed.html new file mode 100644 index 0000000000..2f4d0fe4f0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.current.changed.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.fillStyle.parse.current.changed + + + + + + +

2d.fillStyle.parse.current.changed

+

currentColor is computed when the attribute is set, not when it is painted

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.current.removed.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.current.removed.html new file mode 100644 index 0000000000..96b070c8c1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.current.removed.html @@ -0,0 +1,42 @@ + + +Canvas test: 2d.fillStyle.parse.current.removed + + + + + + +

2d.fillStyle.parse.current.removed

+

currentColor is solid black when the canvas element is not in a document

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.current.removed.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.current.removed.png new file mode 100644 index 0000000000..d638d03386 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.current.removed.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex3.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex3.html new file mode 100644 index 0000000000..017bfc88c2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex3.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.hex3 + + + + + + +

2d.fillStyle.parse.hex3

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex3.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex3.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex3.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex4.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex4.html new file mode 100644 index 0000000000..c8704edbb2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex4.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.hex4 + + + + + + +

2d.fillStyle.parse.hex4

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex4.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex4.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex4.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex6.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex6.html new file mode 100644 index 0000000000..9644a46a0c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex6.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.hex6 + + + + + + +

2d.fillStyle.parse.hex6

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex6.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex6.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex6.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex8.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex8.html new file mode 100644 index 0000000000..b2dd06982d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex8.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.hex8 + + + + + + +

2d.fillStyle.parse.hex8

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex8.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex8.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex8.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-1.html new file mode 100644 index 0000000000..ceb3da52e0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-1.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.hsl-1 + + + + + + +

2d.fillStyle.parse.hsl-1

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-1.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-1.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-1.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-2.html new file mode 100644 index 0000000000..22e67e33d4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-2.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.hsl-2 + + + + + + +

2d.fillStyle.parse.hsl-2

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-2.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-2.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-2.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-3.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-3.html new file mode 100644 index 0000000000..e182952fbf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-3.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.hsl-3 + + + + + + +

2d.fillStyle.parse.hsl-3

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-3.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-3.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-3.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-4.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-4.html new file mode 100644 index 0000000000..b320c1c98b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-4.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.hsl-4 + + + + + + +

2d.fillStyle.parse.hsl-4

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-4.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-4.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-4.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-5.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-5.html new file mode 100644 index 0000000000..1264f626de --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-5.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.hsl-5 + + + + + + +

2d.fillStyle.parse.hsl-5

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-5.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-5.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-5.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.html new file mode 100644 index 0000000000..e0fc787559 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.hsl-6 + + + + + + +

2d.fillStyle.parse.hsl-6

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-1.html new file mode 100644 index 0000000000..59d66c383c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-1.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.hsl-clamp-1 + + + + + + +

2d.fillStyle.parse.hsl-clamp-1

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-1.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-1.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-1.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-2.html new file mode 100644 index 0000000000..1a1939e47a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-2.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.hsl-clamp-2 + + + + + + +

2d.fillStyle.parse.hsl-clamp-2

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-2.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-2.png new file mode 100644 index 0000000000..88fd827985 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-2.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.html new file mode 100644 index 0000000000..56f3a0a8b5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.hsl-clamp-3 + + + + + + +

2d.fillStyle.parse.hsl-clamp-3

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.png new file mode 100644 index 0000000000..bf48767a88 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.html new file mode 100644 index 0000000000..af9d11e678 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.hsl-clamp-4 + + + + + + +

2d.fillStyle.parse.hsl-clamp-4

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.png new file mode 100644 index 0000000000..d638d03386 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.html new file mode 100644 index 0000000000..dbc738ffa7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.hsla-1 + + + + + + +

2d.fillStyle.parse.hsla-1

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.png new file mode 100644 index 0000000000..2aa6265f06 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.html new file mode 100644 index 0000000000..aa21789b02 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.hsla-2 + + + + + + +

2d.fillStyle.parse.hsla-2

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.html new file mode 100644 index 0000000000..2acac26e1a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.hsla-clamp-1 + + + + + + +

2d.fillStyle.parse.hsla-clamp-1

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-2.html new file mode 100644 index 0000000000..0f32fb5474 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-2.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.hsla-clamp-2 + + + + + + +

2d.fillStyle.parse.hsla-clamp-2

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-2.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-2.png new file mode 100644 index 0000000000..88fd827985 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-2.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.html new file mode 100644 index 0000000000..4bc134aec5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.hsla-clamp-3 + + + + + + +

2d.fillStyle.parse.hsla-clamp-3

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.png new file mode 100644 index 0000000000..bf48767a88 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.html new file mode 100644 index 0000000000..f8b2382755 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.hsla-clamp-4 + + + + + + +

2d.fillStyle.parse.hsla-clamp-4

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.png new file mode 100644 index 0000000000..d638d03386 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.html new file mode 100644 index 0000000000..9c5e2258b9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.hsla-clamp-5 + + + + + + +

2d.fillStyle.parse.hsla-clamp-5

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.html new file mode 100644 index 0000000000..153515eedd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.hsla-clamp-6 + + + + + + +

2d.fillStyle.parse.hsla-clamp-6

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.html4.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.html4.html new file mode 100644 index 0000000000..65d0d2020c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.html4.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.html4 + + + + + + +

2d.fillStyle.parse.html4

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.html4.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.html4.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.html4.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-1.html new file mode 100644 index 0000000000..4046f825a1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-1.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.css-color-4-hsl-1 + + + + + + +

2d.fillStyle.parse.invalid.css-color-4-hsl-1

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-2.html new file mode 100644 index 0000000000..2075f8e459 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-2.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.css-color-4-hsl-2 + + + + + + +

2d.fillStyle.parse.invalid.css-color-4-hsl-2

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-3.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-3.html new file mode 100644 index 0000000000..53bbf6c7ee --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-3.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.css-color-4-hsl-3 + + + + + + +

2d.fillStyle.parse.invalid.css-color-4-hsl-3

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-4.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-4.html new file mode 100644 index 0000000000..e8be93b59d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-4.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.css-color-4-hsl-4 + + + + + + +

2d.fillStyle.parse.invalid.css-color-4-hsl-4

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-5.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-5.html new file mode 100644 index 0000000000..b8938adeb2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-5.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.css-color-4-hsl-5 + + + + + + +

2d.fillStyle.parse.invalid.css-color-4-hsl-5

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-1.html new file mode 100644 index 0000000000..7104ca6a84 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-1.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.css-color-4-hsla-1 + + + + + + +

2d.fillStyle.parse.invalid.css-color-4-hsla-1

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-2.html new file mode 100644 index 0000000000..c340e7445d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-2.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.css-color-4-hsla-2 + + + + + + +

2d.fillStyle.parse.invalid.css-color-4-hsla-2

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-3.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-3.html new file mode 100644 index 0000000000..3f94ec16ff --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-3.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.css-color-4-hsla-3 + + + + + + +

2d.fillStyle.parse.invalid.css-color-4-hsla-3

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-1.html new file mode 100644 index 0000000000..69503593fe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-1.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.css-color-4-rgb-1 + + + + + + +

2d.fillStyle.parse.invalid.css-color-4-rgb-1

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-2.html new file mode 100644 index 0000000000..96af643ee8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-2.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.css-color-4-rgb-2 + + + + + + +

2d.fillStyle.parse.invalid.css-color-4-rgb-2

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-3.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-3.html new file mode 100644 index 0000000000..a2691acaf1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-3.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.css-color-4-rgb-3 + + + + + + +

2d.fillStyle.parse.invalid.css-color-4-rgb-3

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-4.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-4.html new file mode 100644 index 0000000000..eb5f56692a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-4.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.css-color-4-rgb-4 + + + + + + +

2d.fillStyle.parse.invalid.css-color-4-rgb-4

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-5.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-5.html new file mode 100644 index 0000000000..7de9dd4911 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-5.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.css-color-4-rgb-5 + + + + + + +

2d.fillStyle.parse.invalid.css-color-4-rgb-5

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-1.html new file mode 100644 index 0000000000..20b889c5cc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-1.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.css-color-4-rgba-1 + + + + + + +

2d.fillStyle.parse.invalid.css-color-4-rgba-1

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-2.html new file mode 100644 index 0000000000..908545cebe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-2.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.css-color-4-rgba-2 + + + + + + +

2d.fillStyle.parse.invalid.css-color-4-rgba-2

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-3.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-3.html new file mode 100644 index 0000000000..851314f643 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-3.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.css-color-4-rgba-3 + + + + + + +

2d.fillStyle.parse.invalid.css-color-4-rgba-3

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex1.html new file mode 100644 index 0000000000..9aba392276 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex1.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.hex1 + + + + + + +

2d.fillStyle.parse.invalid.hex1

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex2.html new file mode 100644 index 0000000000..361db1de43 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex2.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.hex2 + + + + + + +

2d.fillStyle.parse.invalid.hex2

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex3.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex3.html new file mode 100644 index 0000000000..7df089d840 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex3.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.hex3 + + + + + + +

2d.fillStyle.parse.invalid.hex3

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex4.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex4.html new file mode 100644 index 0000000000..6089675b81 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex4.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.hex4 + + + + + + +

2d.fillStyle.parse.invalid.hex4

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex5.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex5.html new file mode 100644 index 0000000000..488daf4690 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex5.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.hex5 + + + + + + +

2d.fillStyle.parse.invalid.hex5

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex6.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex6.html new file mode 100644 index 0000000000..ec0def2e10 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex6.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.hex6 + + + + + + +

2d.fillStyle.parse.invalid.hex6

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex7.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex7.html new file mode 100644 index 0000000000..2b07b8dc9b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex7.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.hex7 + + + + + + +

2d.fillStyle.parse.invalid.hex7

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex8.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex8.html new file mode 100644 index 0000000000..f886d4a67c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex8.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.hex8 + + + + + + +

2d.fillStyle.parse.invalid.hex8

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-1.html new file mode 100644 index 0000000000..153f9cb513 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-1.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.hsl-1 + + + + + + +

2d.fillStyle.parse.invalid.hsl-1

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-2.html new file mode 100644 index 0000000000..7a2bd4f930 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-2.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.hsl-2 + + + + + + +

2d.fillStyle.parse.invalid.hsl-2

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-3.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-3.html new file mode 100644 index 0000000000..8ad0f54264 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-3.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.hsl-3 + + + + + + +

2d.fillStyle.parse.invalid.hsl-3

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-4.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-4.html new file mode 100644 index 0000000000..780b83b383 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-4.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.hsl-4 + + + + + + +

2d.fillStyle.parse.invalid.hsl-4

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-5.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-5.html new file mode 100644 index 0000000000..ad5944f1c0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-5.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.hsl-5 + + + + + + +

2d.fillStyle.parse.invalid.hsl-5

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-6.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-6.html new file mode 100644 index 0000000000..948a9d8a36 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-6.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.hsl-6 + + + + + + +

2d.fillStyle.parse.invalid.hsl-6

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-1.html new file mode 100644 index 0000000000..7a4bdb318f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-1.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.hsla-1 + + + + + + +

2d.fillStyle.parse.invalid.hsla-1

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-2.html new file mode 100644 index 0000000000..4164de3bbd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-2.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.hsla-2 + + + + + + +

2d.fillStyle.parse.invalid.hsla-2

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-3.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-3.html new file mode 100644 index 0000000000..109a22cdf9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-3.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.hsla-3 + + + + + + +

2d.fillStyle.parse.invalid.hsla-3

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-1.html new file mode 100644 index 0000000000..acdd4d4c8e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-1.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.name-1 + + + + + + +

2d.fillStyle.parse.invalid.name-1

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-2.html new file mode 100644 index 0000000000..292f909bcd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-2.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.name-2 + + + + + + +

2d.fillStyle.parse.invalid.name-2

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-3.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-3.html new file mode 100644 index 0000000000..f47ec43f55 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-3.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.name-3 + + + + + + +

2d.fillStyle.parse.invalid.name-3

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-4.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-4.html new file mode 100644 index 0000000000..d15d787f63 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-4.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.name-4 + + + + + + +

2d.fillStyle.parse.invalid.name-4

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-5.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-5.html new file mode 100644 index 0000000000..ce391d0069 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-5.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.name-5 + + + + + + +

2d.fillStyle.parse.invalid.name-5

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-1.html new file mode 100644 index 0000000000..934f725dd3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-1.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.rgb-1 + + + + + + +

2d.fillStyle.parse.invalid.rgb-1

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-2.html new file mode 100644 index 0000000000..f92a06b450 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-2.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.rgb-2 + + + + + + +

2d.fillStyle.parse.invalid.rgb-2

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-3.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-3.html new file mode 100644 index 0000000000..8ebde1782a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-3.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.rgb-3 + + + + + + +

2d.fillStyle.parse.invalid.rgb-3

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-1.html new file mode 100644 index 0000000000..6e3d135f41 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-1.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.rgba-1 + + + + + + +

2d.fillStyle.parse.invalid.rgba-1

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-2.html new file mode 100644 index 0000000000..a6a61002da --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-2.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.rgba-2 + + + + + + +

2d.fillStyle.parse.invalid.rgba-2

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-3.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-3.html new file mode 100644 index 0000000000..464d562b2f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-3.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.rgba-3 + + + + + + +

2d.fillStyle.parse.invalid.rgba-3

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-4.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-4.html new file mode 100644 index 0000000000..815ce2f8b6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-4.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.rgba-4 + + + + + + +

2d.fillStyle.parse.invalid.rgba-4

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-5.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-5.html new file mode 100644 index 0000000000..33c3e33dfc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-5.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.invalid.rgba-5 + + + + + + +

2d.fillStyle.parse.invalid.rgba-5

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.html new file mode 100644 index 0000000000..0432a3bbd4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.rgb-clamp-1 + + + + + + +

2d.fillStyle.parse.rgb-clamp-1

+

+ +

Assumes colors are clamped to [0,255]. +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-2.html new file mode 100644 index 0000000000..cf81e3c73f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-2.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.rgb-clamp-2 + + + + + + +

2d.fillStyle.parse.rgb-clamp-2

+

+ +

Assumes colors are clamped to [0,255]. +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-2.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-2.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-2.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-3.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-3.html new file mode 100644 index 0000000000..b3c609fbee --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-3.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.rgb-clamp-3 + + + + + + +

2d.fillStyle.parse.rgb-clamp-3

+

+ +

Assumes colors are clamped to [0,255]. +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-3.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-3.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-3.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-4.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-4.html new file mode 100644 index 0000000000..60aa8563bd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-4.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.rgb-clamp-4 + + + + + + +

2d.fillStyle.parse.rgb-clamp-4

+

+ +

Assumes colors are clamped to [0,255]. +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-4.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-4.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-4.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-5.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-5.html new file mode 100644 index 0000000000..242ca3933d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-5.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.rgb-clamp-5 + + + + + + +

2d.fillStyle.parse.rgb-clamp-5

+

+ +

Assumes colors are clamped to [0,255]. +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-5.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-5.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-5.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-eof.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-eof.html new file mode 100644 index 0000000000..201874c27d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-eof.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.rgb-eof + + + + + + +

2d.fillStyle.parse.rgb-eof

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-eof.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-eof.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-eof.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-num.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-num.html new file mode 100644 index 0000000000..0ce1db836f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-num.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.rgb-num + + + + + + +

2d.fillStyle.parse.rgb-num

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-num.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-num.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-num.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-percent.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-percent.html new file mode 100644 index 0000000000..9b3de61672 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-percent.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.rgb-percent + + + + + + +

2d.fillStyle.parse.rgb-percent

+

+ +

CSS3 Color says "The integer value 255 corresponds to 100%". (In particular, it is not 254...) +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-percent.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-percent.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-percent.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-1.html new file mode 100644 index 0000000000..587253ad69 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-1.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.rgba-clamp-1 + + + + + + +

2d.fillStyle.parse.rgba-clamp-1

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-1.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-1.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-1.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.html new file mode 100644 index 0000000000..4e8156e60a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.rgba-clamp-2 + + + + + + +

2d.fillStyle.parse.rgba-clamp-2

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-eof.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-eof.html new file mode 100644 index 0000000000..5f07d38b68 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-eof.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.rgba-eof + + + + + + +

2d.fillStyle.parse.rgba-eof

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-eof.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-eof.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-eof.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-1.html new file mode 100644 index 0000000000..0c329c96ea --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-1.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.rgba-num-1 + + + + + + +

2d.fillStyle.parse.rgba-num-1

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-1.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-1.png new file mode 100644 index 0000000000..2aa6265f06 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-1.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.html new file mode 100644 index 0000000000..384a7f412a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.rgba-num-2 + + + + + + +

2d.fillStyle.parse.rgba-num-2

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.png new file mode 100644 index 0000000000..2aa6265f06 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.html new file mode 100644 index 0000000000..60ee007577 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.rgba-percent + + + + + + +

2d.fillStyle.parse.rgba-percent

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.png new file mode 100644 index 0000000000..2aa6265f06 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.html new file mode 100644 index 0000000000..eaec0debcb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.rgba-solid-1 + + + + + + +

2d.fillStyle.parse.rgba-solid-1

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-2.html new file mode 100644 index 0000000000..947bbbce8d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-2.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.rgba-solid-2 + + + + + + +

2d.fillStyle.parse.rgba-solid-2

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-2.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-2.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-2.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.html new file mode 100644 index 0000000000..052a12beae --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.rgba-solid-3 + + + + + + +

2d.fillStyle.parse.rgba-solid-3

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-4.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-4.html new file mode 100644 index 0000000000..ee9cd4e34e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-4.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.rgba-solid-4 + + + + + + +

2d.fillStyle.parse.rgba-solid-4

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-4.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-4.png new file mode 100644 index 0000000000..2733836c99 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-4.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.svg-1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.svg-1.html new file mode 100644 index 0000000000..0ff839b8cb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.svg-1.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.svg-1 + + + + + + +

2d.fillStyle.parse.svg-1

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.svg-1.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.svg-1.png new file mode 100644 index 0000000000..5bc39cc699 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.svg-1.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.html new file mode 100644 index 0000000000..141f4bfe46 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.svg-2 + + + + + + +

2d.fillStyle.parse.svg-2

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.png new file mode 100644 index 0000000000..5bc39cc699 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.system.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.system.html new file mode 100644 index 0000000000..3a56389973 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.system.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.fillStyle.parse.system + + + + + + +

2d.fillStyle.parse.system

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.html new file mode 100644 index 0000000000..5b9a834c0b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.transparent-1 + + + + + + +

2d.fillStyle.parse.transparent-1

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.html new file mode 100644 index 0000000000..a077534c23 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.fillStyle.parse.transparent-2 + + + + + + +

2d.fillStyle.parse.transparent-2

+

+ +

+

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.png new file mode 100644 index 0000000000..eeedd0ff05 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.toStringFunctionCallback.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.toStringFunctionCallback.html new file mode 100644 index 0000000000..2a12b05839 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.toStringFunctionCallback.html @@ -0,0 +1,39 @@ + + +Canvas test: 2d.fillStyle.toStringFunctionCallback + + + + + + +

2d.fillStyle.toStringFunctionCallback

+

Passing a function in to ctx.fillStyle or ctx.strokeStyle with a toString callback works as specified

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.invalid.inputs.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.invalid.inputs.html new file mode 100644 index 0000000000..1a4cde4146 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.invalid.inputs.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.gradient.conic.invalid.inputs + + + + + + +

2d.gradient.conic.invalid.inputs

+

Conic gradient function with invalid inputs

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.negative.rotation.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.negative.rotation.html new file mode 100644 index 0000000000..ba85463b41 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.negative.rotation.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.gradient.conic.negative.rotation + + + + + + +

2d.gradient.conic.negative.rotation

+

Conic gradient with negative rotation

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.positive.rotation.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.positive.rotation.html new file mode 100644 index 0000000000..f8cebbb0d4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.positive.rotation.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.gradient.conic.positive.rotation + + + + + + +

2d.gradient.conic.positive.rotation

+

Conic gradient with positive rotation

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.empty.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.empty.html new file mode 100644 index 0000000000..dcc7575254 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.empty.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.gradient.empty + + + + + + +

2d.gradient.empty

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.alpha.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.alpha.html new file mode 100644 index 0000000000..13f48f37bf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.alpha.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.gradient.interpolate.alpha + + + + + + +

2d.gradient.interpolate.alpha

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.alpha.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.alpha.png new file mode 100644 index 0000000000..af5ac0f07d Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.alpha.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.color.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.color.html new file mode 100644 index 0000000000..3f7e27abe0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.color.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.gradient.interpolate.color + + + + + + +

2d.gradient.interpolate.color

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.color.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.color.png new file mode 100644 index 0000000000..af5ac0f07d Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.color.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.html new file mode 100644 index 0000000000..0d635ed671 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.gradient.interpolate.coloralpha + + + + + + +

2d.gradient.interpolate.coloralpha

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.png new file mode 100644 index 0000000000..552e6ee44b Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.multiple.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.multiple.html new file mode 100644 index 0000000000..9e62f3436c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.multiple.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.gradient.interpolate.multiple + + + + + + +

2d.gradient.interpolate.multiple

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.multiple.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.multiple.png new file mode 100644 index 0000000000..86122450d3 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.multiple.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.outside.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.outside.html new file mode 100644 index 0000000000..b46a7bed36 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.outside.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.gradient.interpolate.outside + + + + + + +

2d.gradient.interpolate.outside

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.overlap.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.overlap.html new file mode 100644 index 0000000000..099a3ea81a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.overlap.html @@ -0,0 +1,51 @@ + + +Canvas test: 2d.gradient.interpolate.overlap + + + + + + +

2d.gradient.interpolate.overlap

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.overlap.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.overlap.png new file mode 100644 index 0000000000..5c2bb964e0 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.overlap.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.overlap2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.overlap2.html new file mode 100644 index 0000000000..a4a2955d3b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.overlap2.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.gradient.interpolate.overlap2 + + + + + + +

2d.gradient.interpolate.overlap2

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.solid.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.solid.html new file mode 100644 index 0000000000..9ac31626df --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.solid.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.gradient.interpolate.solid + + + + + + +

2d.gradient.interpolate.solid

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.vertical.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.vertical.html new file mode 100644 index 0000000000..80302761d6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.vertical.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.gradient.interpolate.vertical + + + + + + +

2d.gradient.interpolate.vertical

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.vertical.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.vertical.png new file mode 100644 index 0000000000..37d6a00c62 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.vertical.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fill.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fill.html new file mode 100644 index 0000000000..7a8892db11 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fill.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.gradient.interpolate.zerosize.fill + + + + + + +

2d.gradient.interpolate.zerosize.fill

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillRect.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillRect.html new file mode 100644 index 0000000000..7696cefdd0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillRect.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.gradient.interpolate.zerosize.fillRect + + + + + + +

2d.gradient.interpolate.zerosize.fillRect

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillText.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillText.html new file mode 100644 index 0000000000..98ef6c3425 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillText.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.gradient.interpolate.zerosize.fillText + + + + + + +

2d.gradient.interpolate.zerosize.fillText

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.stroke.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.stroke.html new file mode 100644 index 0000000000..283e3874ad --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.stroke.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.gradient.interpolate.zerosize.stroke + + + + + + +

2d.gradient.interpolate.zerosize.stroke

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeRect.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeRect.html new file mode 100644 index 0000000000..7d243ecbc4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeRect.html @@ -0,0 +1,42 @@ + + +Canvas test: 2d.gradient.interpolate.zerosize.strokeRect + + + + + + +

2d.gradient.interpolate.zerosize.strokeRect

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeText.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeText.html new file mode 100644 index 0000000000..bab7c6b6d9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeText.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.gradient.interpolate.zerosize.strokeText + + + + + + +

2d.gradient.interpolate.zerosize.strokeText

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.nonfinite.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.nonfinite.html new file mode 100644 index 0000000000..89d0092715 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.nonfinite.html @@ -0,0 +1,48 @@ + + +Canvas test: 2d.gradient.linear.nonfinite + + + + + + +

2d.gradient.linear.nonfinite

+

createLinearGradient() throws TypeError if arguments are not finite

+ +

Defined in "Web IDL" (draft) +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.transform.1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.transform.1.html new file mode 100644 index 0000000000..0ae3220f06 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.transform.1.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.gradient.linear.transform.1 + + + + + + +

2d.gradient.linear.transform.1

+

Linear gradient coordinates are relative to the coordinate space at the time of filling

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.transform.2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.transform.2.html new file mode 100644 index 0000000000..8f761c666f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.transform.2.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.gradient.linear.transform.2 + + + + + + +

2d.gradient.linear.transform.2

+

Linear gradient coordinates are relative to the coordinate space at the time of filling

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.transform.3.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.transform.3.html new file mode 100644 index 0000000000..fdd1e0e9a4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.transform.3.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.gradient.linear.transform.3 + + + + + + +

2d.gradient.linear.transform.3

+

Linear gradient transforms do not experience broken caching effects

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.compare.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.compare.html new file mode 100644 index 0000000000..9ff3e607c7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.compare.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.gradient.object.compare + + + + + + +

2d.gradient.object.compare

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.crosscanvas.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.crosscanvas.html new file mode 100644 index 0000000000..9c30d9cbac --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.crosscanvas.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.gradient.object.crosscanvas + + + + + + +

2d.gradient.object.crosscanvas

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.current.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.current.html new file mode 100644 index 0000000000..95cc893671 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.current.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.gradient.object.current + + + + + + +

2d.gradient.object.current

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.current.png b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.current.png new file mode 100644 index 0000000000..d638d03386 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.current.png differ diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.invalidcolor.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.invalidcolor.html new file mode 100644 index 0000000000..2be7b3d6fd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.invalidcolor.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.gradient.object.invalidcolor + + + + + + +

2d.gradient.object.invalidcolor

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.invalidoffset.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.invalidoffset.html new file mode 100644 index 0000000000..76aaed7115 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.invalidoffset.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.gradient.object.invalidoffset + + + + + + +

2d.gradient.object.invalidoffset

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.return.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.return.html new file mode 100644 index 0000000000..c32312142d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.return.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.gradient.object.return + + + + + + +

2d.gradient.object.return

+

createLinearGradient() and createRadialGradient() returns objects implementing CanvasGradient

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.type.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.type.html new file mode 100644 index 0000000000..37c77d2f2c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.type.html @@ -0,0 +1,27 @@ + + +Canvas test: 2d.gradient.object.type + + + + + + +

2d.gradient.object.type

+

window.CanvasGradient exists and has the right properties

+ +

Defined in "Web IDL" (draft) +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.update.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.update.html new file mode 100644 index 0000000000..ae78d0d78f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.update.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.gradient.object.update + + + + + + +

2d.gradient.object.update

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.behind.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.behind.html new file mode 100644 index 0000000000..d32e972cc5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.behind.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.gradient.radial.cone.behind + + + + + + +

2d.gradient.radial.cone.behind

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.beside.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.beside.html new file mode 100644 index 0000000000..b9774aeba6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.beside.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.gradient.radial.cone.beside + + + + + + +

2d.gradient.radial.cone.beside

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.bottom.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.bottom.html new file mode 100644 index 0000000000..15808ee50e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.bottom.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.gradient.radial.cone.bottom + + + + + + +

2d.gradient.radial.cone.bottom

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.cylinder.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.cylinder.html new file mode 100644 index 0000000000..067f129983 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.cylinder.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.gradient.radial.cone.cylinder + + + + + + +

2d.gradient.radial.cone.cylinder

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.front.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.front.html new file mode 100644 index 0000000000..88ecdb9810 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.front.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.gradient.radial.cone.front + + + + + + +

2d.gradient.radial.cone.front

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.shape1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.shape1.html new file mode 100644 index 0000000000..046e4d97b1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.shape1.html @@ -0,0 +1,52 @@ + + +Canvas test: 2d.gradient.radial.cone.shape1 + + + + + + +

2d.gradient.radial.cone.shape1

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.shape2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.shape2.html new file mode 100644 index 0000000000..1c7660ac99 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.shape2.html @@ -0,0 +1,52 @@ + + +Canvas test: 2d.gradient.radial.cone.shape2 + + + + + + +

2d.gradient.radial.cone.shape2

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.top.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.top.html new file mode 100644 index 0000000000..6760b18db7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.top.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.gradient.radial.cone.top + + + + + + +

2d.gradient.radial.cone.top

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.equal.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.equal.html new file mode 100644 index 0000000000..1ff7c44193 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.equal.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.gradient.radial.equal + + + + + + +

2d.gradient.radial.equal

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.inside1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.inside1.html new file mode 100644 index 0000000000..00ece5750e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.inside1.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.gradient.radial.inside1 + + + + + + +

2d.gradient.radial.inside1

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.inside2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.inside2.html new file mode 100644 index 0000000000..be9c1a810a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.inside2.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.gradient.radial.inside2 + + + + + + +

2d.gradient.radial.inside2

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.inside3.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.inside3.html new file mode 100644 index 0000000000..5e9bd4c721 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.inside3.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.gradient.radial.inside3 + + + + + + +

2d.gradient.radial.inside3

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.negative.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.negative.html new file mode 100644 index 0000000000..d86812b68c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.negative.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.gradient.radial.negative + + + + + + +

2d.gradient.radial.negative

+

createRadialGradient() throws INDEX_SIZE_ERR if either radius is negative

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.nonfinite.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.nonfinite.html new file mode 100644 index 0000000000..0c16b41540 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.nonfinite.html @@ -0,0 +1,100 @@ + + +Canvas test: 2d.gradient.radial.nonfinite + + + + + + +

2d.gradient.radial.nonfinite

+

createRadialGradient() throws TypeError if arguments are not finite

+ +

Defined in "Web IDL" (draft) +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.outside1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.outside1.html new file mode 100644 index 0000000000..ea9dfdb3bb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.outside1.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.gradient.radial.outside1 + + + + + + +

2d.gradient.radial.outside1

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.outside2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.outside2.html new file mode 100644 index 0000000000..b07fd02518 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.outside2.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.gradient.radial.outside2 + + + + + + +

2d.gradient.radial.outside2

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.outside3.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.outside3.html new file mode 100644 index 0000000000..7c19baf5c5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.outside3.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.gradient.radial.outside3 + + + + + + +

2d.gradient.radial.outside3

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.touch1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.touch1.html new file mode 100644 index 0000000000..6487fc440b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.touch1.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.gradient.radial.touch1 + + + + + + +

2d.gradient.radial.touch1

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.touch2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.touch2.html new file mode 100644 index 0000000000..908a0dbc19 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.touch2.html @@ -0,0 +1,45 @@ + + +Canvas test: 2d.gradient.radial.touch2 + + + + + + +

2d.gradient.radial.touch2

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.touch3.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.touch3.html new file mode 100644 index 0000000000..07f52d7363 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.touch3.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.gradient.radial.touch3 + + + + + + +

2d.gradient.radial.touch3

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.transform.1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.transform.1.html new file mode 100644 index 0000000000..d0eb13c457 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.transform.1.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.gradient.radial.transform.1 + + + + + + +

2d.gradient.radial.transform.1

+

Radial gradient coordinates are relative to the coordinate space at the time of filling

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.transform.2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.transform.2.html new file mode 100644 index 0000000000..6e56c4c63b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.transform.2.html @@ -0,0 +1,38 @@ + + +Canvas test: 2d.gradient.radial.transform.2 + + + + + + +

2d.gradient.radial.transform.2

+

Radial gradient coordinates are relative to the coordinate space at the time of filling

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.transform.3.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.transform.3.html new file mode 100644 index 0000000000..426021d097 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.transform.3.html @@ -0,0 +1,38 @@ + + +Canvas test: 2d.gradient.radial.transform.3 + + + + + + +

2d.gradient.radial.transform.3

+

Radial gradient transforms do not experience broken caching effects

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.animated.gif.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.animated.gif.html new file mode 100644 index 0000000000..be69cca997 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.animated.gif.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.pattern.animated.gif + + + + + + +

2d.pattern.animated.gif

+

createPattern() of an animated GIF draws the first frame

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.canvas.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.canvas.html new file mode 100644 index 0000000000..069263adff --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.canvas.html @@ -0,0 +1,48 @@ + + +Canvas test: 2d.pattern.basic.canvas + + + + + + +

2d.pattern.basic.canvas

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.image.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.image.html new file mode 100644 index 0000000000..5ebffe50f6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.image.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.pattern.basic.image + + + + + + +

2d.pattern.basic.image

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.nocontext.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.nocontext.html new file mode 100644 index 0000000000..f24899c302 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.nocontext.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.pattern.basic.nocontext + + + + + + +

2d.pattern.basic.nocontext

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.type.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.type.html new file mode 100644 index 0000000000..c510063d80 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.type.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.pattern.basic.type + + + + + + +

2d.pattern.basic.type

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.zerocanvas.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.zerocanvas.html new file mode 100644 index 0000000000..fbeb7bd797 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.zerocanvas.html @@ -0,0 +1,42 @@ + + +Canvas test: 2d.pattern.basic.zerocanvas + + + + + + +

2d.pattern.basic.zerocanvas

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.crosscanvas.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.crosscanvas.html new file mode 100644 index 0000000000..f93b36ddf2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.crosscanvas.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.pattern.crosscanvas + + + + + + +

2d.pattern.crosscanvas

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.broken.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.broken.html new file mode 100644 index 0000000000..2cf21746ca --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.broken.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.pattern.image.broken + + + + + + +

2d.pattern.image.broken

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.emptysrc.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.emptysrc.html new file mode 100644 index 0000000000..fb05cbb455 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.emptysrc.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.pattern.image.incomplete.emptysrc + + + + + + +

2d.pattern.image.incomplete.emptysrc

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.immediate.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.immediate.html new file mode 100644 index 0000000000..375c1b49c9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.immediate.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.pattern.image.incomplete.immediate + + + + + + +

2d.pattern.image.incomplete.immediate

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.nosrc.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.nosrc.html new file mode 100644 index 0000000000..d43a0ca918 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.nosrc.html @@ -0,0 +1,27 @@ + + +Canvas test: 2d.pattern.image.incomplete.nosrc + + + + + + +

2d.pattern.image.incomplete.nosrc

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.reload.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.reload.html new file mode 100644 index 0000000000..984bd36a74 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.reload.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.pattern.image.incomplete.reload + + + + + + +

2d.pattern.image.incomplete.reload

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.removedsrc.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.removedsrc.html new file mode 100644 index 0000000000..20d5543684 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.removedsrc.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.pattern.image.incomplete.removedsrc + + + + + + +

2d.pattern.image.incomplete.removedsrc

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.nonexistent-but-loading.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.nonexistent-but-loading.html new file mode 100644 index 0000000000..2af0a3ed09 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.nonexistent-but-loading.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.pattern.image.nonexistent-but-loading + + + + + + +

2d.pattern.image.nonexistent-but-loading

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.nonexistent.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.nonexistent.html new file mode 100644 index 0000000000..b365281179 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.nonexistent.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.pattern.image.nonexistent + + + + + + +

2d.pattern.image.nonexistent

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.nosrc.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.nosrc.html new file mode 100644 index 0000000000..710749dd54 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.nosrc.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.pattern.image.nosrc + + + + + + +

2d.pattern.image.nosrc

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.null.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.null.html new file mode 100644 index 0000000000..8ae002d682 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.null.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.pattern.image.null + + + + + + +

2d.pattern.image.null

+

+ +

Defined in "Web IDL" (draft) +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.string.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.string.html new file mode 100644 index 0000000000..af32e63bba --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.string.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.pattern.image.string + + + + + + +

2d.pattern.image.string

+

+ +

Defined in "Web IDL" (draft) +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.undefined.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.undefined.html new file mode 100644 index 0000000000..75f50c7a4a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.undefined.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.pattern.image.undefined + + + + + + +

2d.pattern.image.undefined

+

+ +

Defined in "Web IDL" (draft) +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.zeroheight.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.zeroheight.html new file mode 100644 index 0000000000..cd12c2e883 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.zeroheight.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.pattern.image.zeroheight + + + + + + +

2d.pattern.image.zeroheight

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.zerowidth.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.zerowidth.html new file mode 100644 index 0000000000..053b8ac648 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.zerowidth.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.pattern.image.zerowidth + + + + + + +

2d.pattern.image.zerowidth

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.canvas1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.canvas1.html new file mode 100644 index 0000000000..0524351fdb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.canvas1.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.pattern.modify.canvas1 + + + + + + +

2d.pattern.modify.canvas1

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.canvas2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.canvas2.html new file mode 100644 index 0000000000..6e50a5761c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.canvas2.html @@ -0,0 +1,48 @@ + + +Canvas test: 2d.pattern.modify.canvas2 + + + + + + +

2d.pattern.modify.canvas2

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.image1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.image1.html new file mode 100644 index 0000000000..94f55c84f6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.image1.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.pattern.modify.image1 + + + + + + +

2d.pattern.modify.image1

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.image2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.image2.html new file mode 100644 index 0000000000..1025d195f2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.image2.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.pattern.modify.image2 + + + + + + +

2d.pattern.modify.image2

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.html new file mode 100644 index 0000000000..036be9e068 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.html @@ -0,0 +1,38 @@ + + +Canvas test: 2d.pattern.paint.norepeat.basic + + + + + + +

2d.pattern.paint.norepeat.basic

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.html new file mode 100644 index 0000000000..dfe2b8589e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.pattern.paint.norepeat.coord1 + + + + + + +

2d.pattern.paint.norepeat.coord1

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html new file mode 100644 index 0000000000..dfd637211d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html @@ -0,0 +1,42 @@ + + +Canvas test: 2d.pattern.paint.norepeat.coord2 + + + + + + +

2d.pattern.paint.norepeat.coord2

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.html new file mode 100644 index 0000000000..5456a543da --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.html @@ -0,0 +1,42 @@ + + +Canvas test: 2d.pattern.paint.norepeat.coord3 + + + + + + +

2d.pattern.paint.norepeat.coord3

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.html new file mode 100644 index 0000000000..4df0cdfe67 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.pattern.paint.norepeat.outside + + + + + + +

2d.pattern.paint.norepeat.outside

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas.html new file mode 100644 index 0000000000..f0ad70fc1e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas.html @@ -0,0 +1,47 @@ + + +Canvas test: 2d.pattern.paint.orientation.canvas + + + + + + +

2d.pattern.paint.orientation.canvas

+

Canvas patterns do not get flipped when painted

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.orientation.image.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.orientation.image.html new file mode 100644 index 0000000000..b45f4ab773 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.orientation.image.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.pattern.paint.orientation.image + + + + + + +

2d.pattern.paint.orientation.image

+

Image patterns do not get flipped when painted

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.html new file mode 100644 index 0000000000..8999ac4e44 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.html @@ -0,0 +1,38 @@ + + +Canvas test: 2d.pattern.paint.repeat.basic + + + + + + +

2d.pattern.paint.repeat.basic

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.html new file mode 100644 index 0000000000..8dc6402d55 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.html @@ -0,0 +1,39 @@ + + +Canvas test: 2d.pattern.paint.repeat.coord1 + + + + + + +

2d.pattern.paint.repeat.coord1

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html new file mode 100644 index 0000000000..9c03d02898 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.pattern.paint.repeat.coord2 + + + + + + +

2d.pattern.paint.repeat.coord2

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.html new file mode 100644 index 0000000000..0dc0a865b4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.html @@ -0,0 +1,38 @@ + + +Canvas test: 2d.pattern.paint.repeat.coord3 + + + + + + +

2d.pattern.paint.repeat.coord3

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.html new file mode 100644 index 0000000000..b939195877 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.html @@ -0,0 +1,39 @@ + + +Canvas test: 2d.pattern.paint.repeat.outside + + + + + + +

2d.pattern.paint.repeat.outside

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.html new file mode 100644 index 0000000000..8c77908cd1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.pattern.paint.repeatx.basic + + + + + + +

2d.pattern.paint.repeatx.basic

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.html new file mode 100644 index 0000000000..4c7fa9d498 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.pattern.paint.repeatx.coord1 + + + + + + +

2d.pattern.paint.repeatx.coord1

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.html new file mode 100644 index 0000000000..26ee85e4d1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.pattern.paint.repeatx.outside + + + + + + +

2d.pattern.paint.repeatx.outside

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.html new file mode 100644 index 0000000000..c28ff155eb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.pattern.paint.repeaty.basic + + + + + + +

2d.pattern.paint.repeaty.basic

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.html new file mode 100644 index 0000000000..7f2bb163f3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.pattern.paint.repeaty.coord1 + + + + + + +

2d.pattern.paint.repeaty.coord1

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.html new file mode 100644 index 0000000000..7be743ec2b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.pattern.paint.repeaty.outside + + + + + + +

2d.pattern.paint.repeaty.outside

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.case.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.case.html new file mode 100644 index 0000000000..d998bbeb2f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.case.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.pattern.repeat.case + + + + + + +

2d.pattern.repeat.case

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.empty.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.empty.html new file mode 100644 index 0000000000..2810efe700 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.empty.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.pattern.repeat.empty + + + + + + +

2d.pattern.repeat.empty

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.null.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.null.html new file mode 100644 index 0000000000..0de121a4f5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.null.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.pattern.repeat.null + + + + + + +

2d.pattern.repeat.null

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix.html new file mode 100644 index 0000000000..33d601d974 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.pattern.repeat.nullsuffix + + + + + + +

2d.pattern.repeat.nullsuffix

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.undefined.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.undefined.html new file mode 100644 index 0000000000..f0a7ae8488 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.undefined.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.pattern.repeat.undefined + + + + + + +

2d.pattern.repeat.undefined

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.unrecognised.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.unrecognised.html new file mode 100644 index 0000000000..cdcc7d6523 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.unrecognised.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.pattern.repeat.unrecognised + + + + + + +

2d.pattern.repeat.unrecognised

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull.html new file mode 100644 index 0000000000..11c9ec0ebb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.pattern.repeat.unrecognisednull + + + + + + +

2d.pattern.repeat.unrecognisednull

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.svgimage.nonexistent.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.svgimage.nonexistent.html new file mode 100644 index 0000000000..8cd3983dc3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.svgimage.nonexistent.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.pattern.svgimage.nonexistent + + + + + + +

2d.pattern.svgimage.nonexistent

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.svgimage.zeroheight.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.svgimage.zeroheight.html new file mode 100644 index 0000000000..11c07e36de --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.svgimage.zeroheight.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.pattern.svgimage.zeroheight + + + + + + +

2d.pattern.svgimage.zeroheight

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.svgimage.zerowidth.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.svgimage.zerowidth.html new file mode 100644 index 0000000000..a8b8cb1351 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.svgimage.zerowidth.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.pattern.svgimage.zerowidth + + + + + + +

2d.pattern.svgimage.zerowidth

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.transform.identity.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.transform.identity.html new file mode 100644 index 0000000000..21da30581d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.transform.identity.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.pattern.transform.identity + + + + + + +

2d.pattern.transform.identity

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.transform.infinity.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.transform.infinity.html new file mode 100644 index 0000000000..bfb22aeb14 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.transform.infinity.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.pattern.transform.infinity + + + + + + +

2d.pattern.transform.infinity

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.transform.invalid.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.transform.invalid.html new file mode 100644 index 0000000000..13f0459e9f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.transform.invalid.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.pattern.transform.invalid + + + + + + +

2d.pattern.transform.invalid

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.colorObject.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.colorObject.html new file mode 100644 index 0000000000..308e6b54b7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.colorObject.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.strokeStyle.colorObject + + + + + + +

2d.strokeStyle.colorObject

+

ctx.strokeStyle works with color objects

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.colorObject.transparency.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.colorObject.transparency.html new file mode 100644 index 0000000000..0232140eaf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.colorObject.transparency.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.strokeStyle.colorObject.transparency + + + + + + +

2d.strokeStyle.colorObject.transparency

+

ctx.strokeStyle with color objects has transparency

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.colormix.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.colormix.html new file mode 100644 index 0000000000..c1971666e8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.colormix.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.strokeStyle.colormix + + + + + + +

2d.strokeStyle.colormix

+

color-mix works as color input

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.default.html b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.default.html new file mode 100644 index 0000000000..a432d74a42 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.default.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.strokeStyle.default + + + + + + +

2d.strokeStyle.default

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.html b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.html new file mode 100644 index 0000000000..42fb1ee8f8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.filter.canvasFilterObject.blur.exceptions.tentative + + + + + + +

2d.filter.canvasFilterObject.blur.exceptions.tentative

+

Test exceptions on CanvasFilter() blur.object

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.html b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.html new file mode 100644 index 0000000000..b2f6a6ac97 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.html @@ -0,0 +1,68 @@ + + +Canvas test: 2d.filter.canvasFilterObject.colorMatrix.tentative + + + + + + +

2d.filter.canvasFilterObject.colorMatrix.tentative

+

Test the functionality of ColorMatrix filters in CanvasFilter objects

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html new file mode 100644 index 0000000000..b392b189f2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html @@ -0,0 +1,66 @@ + + +Canvas test: 2d.filter.canvasFilterObject.componentTransfer.discrete.tentative + + + + + + +

2d.filter.canvasFilterObject.componentTransfer.discrete.tentative

+

Test pixels on CanvasFilter() componentTransfer with discrete type

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html new file mode 100644 index 0000000000..e5bff7e44d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html @@ -0,0 +1,57 @@ + + +Canvas test: 2d.filter.canvasFilterObject.componentTransfer.gamma.tentative + + + + + + +

2d.filter.canvasFilterObject.componentTransfer.gamma.tentative

+

Test pixels on CanvasFilter() componentTransfer with gamma type

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html new file mode 100644 index 0000000000..ecd3830be3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.filter.canvasFilterObject.componentTransfer.identity.tentative + + + + + + +

2d.filter.canvasFilterObject.componentTransfer.identity.tentative

+

Test pixels on CanvasFilter() componentTransfer with identity type

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html new file mode 100644 index 0000000000..8708887f6a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html @@ -0,0 +1,56 @@ + + +Canvas test: 2d.filter.canvasFilterObject.componentTransfer.linear.tentative + + + + + + +

2d.filter.canvasFilterObject.componentTransfer.linear.tentative

+

Test pixels on CanvasFilter() componentTransfer with linear type

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.html b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.html new file mode 100644 index 0000000000..4b296d9fd7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.html @@ -0,0 +1,66 @@ + + +Canvas test: 2d.filter.canvasFilterObject.componentTransfer.table.tentative + + + + + + +

2d.filter.canvasFilterObject.componentTransfer.table.tentative

+

Test pixels on CanvasFilter() componentTransfer with table type

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html new file mode 100644 index 0000000000..b80600c141 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html @@ -0,0 +1,42 @@ + + +Canvas test: 2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative + + + + + + +

2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative

+

Test exceptions on CanvasFilter() convolveMatrix

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html new file mode 100644 index 0000000000..8c07a72b2b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html @@ -0,0 +1,123 @@ + + +Canvas test: 2d.filter.canvasFilterObject.dropShadow.exceptions.tentative + + + + + + +

2d.filter.canvasFilterObject.dropShadow.exceptions.tentative

+

Test exceptions on CanvasFilter() dropShadow object

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.tentative-expected.html b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.tentative-expected.html new file mode 100644 index 0000000000..86c5710132 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.tentative-expected.html @@ -0,0 +1,57 @@ + + +Canvas test: 2d.filter.canvasFilterObject.dropShadow.tentative +

2d.filter.canvasFilterObject.dropShadow.tentative

+

Test CanvasFilter() dropShadow object.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.tentative.html b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.tentative.html new file mode 100644 index 0000000000..47bb891b3f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.tentative.html @@ -0,0 +1,107 @@ + + + +Canvas test: 2d.filter.canvasFilterObject.dropShadow.tentative +

2d.filter.canvasFilterObject.dropShadow.tentative

+

Test CanvasFilter() dropShadow object.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic-expected.html b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic-expected.html new file mode 100644 index 0000000000..f9571f208e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic-expected.html @@ -0,0 +1,15 @@ + + +Canvas test: 2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic +

2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic

+

Test CanvasFilter() with gaussianBlur.

+ + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic.html b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic.html new file mode 100644 index 0000000000..6376d07b0e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic.html @@ -0,0 +1,20 @@ + + + +Canvas test: 2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic +

2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic

+

Test CanvasFilter() with gaussianBlur.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x-expected.html b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x-expected.html new file mode 100644 index 0000000000..e76613271f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x-expected.html @@ -0,0 +1,15 @@ + + +Canvas test: 2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x +

2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x

+

Test CanvasFilter() with gaussianBlur.

+ + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x.html b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x.html new file mode 100644 index 0000000000..145cb32757 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x.html @@ -0,0 +1,20 @@ + + + +Canvas test: 2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x +

2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x

+

Test CanvasFilter() with gaussianBlur.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y-expected.html b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y-expected.html new file mode 100644 index 0000000000..0f214fca9f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y-expected.html @@ -0,0 +1,15 @@ + + +Canvas test: 2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y +

2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y

+

Test CanvasFilter() with gaussianBlur.

+ + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y.html b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y.html new file mode 100644 index 0000000000..e921e0eaa6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y.html @@ -0,0 +1,20 @@ + + + +Canvas test: 2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y +

2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y

+

Test CanvasFilter() with gaussianBlur.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only-expected.html b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only-expected.html new file mode 100644 index 0000000000..285a641726 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only-expected.html @@ -0,0 +1,15 @@ + + +Canvas test: 2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only +

2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only

+

Test CanvasFilter() with gaussianBlur.

+ + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only.html b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only.html new file mode 100644 index 0000000000..fd6ac687f9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only.html @@ -0,0 +1,20 @@ + + + +Canvas test: 2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only +

2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only

+

Test CanvasFilter() with gaussianBlur.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only-expected.html b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only-expected.html new file mode 100644 index 0000000000..d59945b5da --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only-expected.html @@ -0,0 +1,15 @@ + + +Canvas test: 2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only +

2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only

+

Test CanvasFilter() with gaussianBlur.

+ + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only.html b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only.html new file mode 100644 index 0000000000..6442433e7c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only.html @@ -0,0 +1,20 @@ + + + +Canvas test: 2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only +

2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only

+

Test CanvasFilter() with gaussianBlur.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.tentative.html b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.tentative.html new file mode 100644 index 0000000000..c40e718d72 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.tentative.html @@ -0,0 +1,48 @@ + + +Canvas test: 2d.filter.canvasFilterObject.tentative + + + + + + +

2d.filter.canvasFilterObject.tentative

+

Test CanvasFilter() object

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html new file mode 100644 index 0000000000..c24cfd2398 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html @@ -0,0 +1,129 @@ + + +Canvas test: 2d.filter.canvasFilterObject.turbulence.inputTypes.tentative + + + + + + +

2d.filter.canvasFilterObject.turbulence.inputTypes.tentative

+

Test exceptions on CanvasFilter() turbulence object

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/filters/2d.filter.value.html b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.value.html new file mode 100644 index 0000000000..5716b9bd16 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/filters/2d.filter.value.html @@ -0,0 +1,55 @@ + + +Canvas test: 2d.filter.value + + + + + + +

2d.filter.value

+

test if ctx.filter works correctly

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.isotropic-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.isotropic-expected.html new file mode 100644 index 0000000000..6a6f0f6892 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.isotropic-expected.html @@ -0,0 +1,16 @@ + + +Canvas test: 2d.layer.anisotropic-blur.isotropic +

2d.layer.anisotropic-blur.isotropic

+

Checks that layers allow gaussian blur with separate X and Y components.

+ + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.isotropic.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.isotropic.html new file mode 100644 index 0000000000..4e496b7e48 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.isotropic.html @@ -0,0 +1,20 @@ + + + +Canvas test: 2d.layer.anisotropic-blur.isotropic +

2d.layer.anisotropic-blur.isotropic

+

Checks that layers allow gaussian blur with separate X and Y components.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.mostly-x-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.mostly-x-expected.html new file mode 100644 index 0000000000..b0473f2ff0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.mostly-x-expected.html @@ -0,0 +1,16 @@ + + +Canvas test: 2d.layer.anisotropic-blur.mostly-x +

2d.layer.anisotropic-blur.mostly-x

+

Checks that layers allow gaussian blur with separate X and Y components.

+ + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.mostly-x.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.mostly-x.html new file mode 100644 index 0000000000..4217d9fad3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.mostly-x.html @@ -0,0 +1,20 @@ + + + +Canvas test: 2d.layer.anisotropic-blur.mostly-x +

2d.layer.anisotropic-blur.mostly-x

+

Checks that layers allow gaussian blur with separate X and Y components.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.mostly-y-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.mostly-y-expected.html new file mode 100644 index 0000000000..43da016eea --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.mostly-y-expected.html @@ -0,0 +1,16 @@ + + +Canvas test: 2d.layer.anisotropic-blur.mostly-y +

2d.layer.anisotropic-blur.mostly-y

+

Checks that layers allow gaussian blur with separate X and Y components.

+ + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.mostly-y.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.mostly-y.html new file mode 100644 index 0000000000..97a44e9045 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.mostly-y.html @@ -0,0 +1,20 @@ + + + +Canvas test: 2d.layer.anisotropic-blur.mostly-y +

2d.layer.anisotropic-blur.mostly-y

+

Checks that layers allow gaussian blur with separate X and Y components.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.x-only-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.x-only-expected.html new file mode 100644 index 0000000000..0b4d269189 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.x-only-expected.html @@ -0,0 +1,16 @@ + + +Canvas test: 2d.layer.anisotropic-blur.x-only +

2d.layer.anisotropic-blur.x-only

+

Checks that layers allow gaussian blur with separate X and Y components.

+ + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.x-only.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.x-only.html new file mode 100644 index 0000000000..fdf604616b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.x-only.html @@ -0,0 +1,20 @@ + + + +Canvas test: 2d.layer.anisotropic-blur.x-only +

2d.layer.anisotropic-blur.x-only

+

Checks that layers allow gaussian blur with separate X and Y components.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.y-only-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.y-only-expected.html new file mode 100644 index 0000000000..2572386412 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.y-only-expected.html @@ -0,0 +1,16 @@ + + +Canvas test: 2d.layer.anisotropic-blur.y-only +

2d.layer.anisotropic-blur.y-only

+

Checks that layers allow gaussian blur with separate X and Y components.

+ + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.y-only.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.y-only.html new file mode 100644 index 0000000000..c7ceb63a87 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.anisotropic-blur.y-only.html @@ -0,0 +1,20 @@ + + + +Canvas test: 2d.layer.anisotropic-blur.y-only +

2d.layer.anisotropic-blur.y-only

+

Checks that layers allow gaussian blur with separate X and Y components.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.beginLayer-options.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.beginLayer-options.html new file mode 100644 index 0000000000..658d7e0991 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.beginLayer-options.html @@ -0,0 +1,50 @@ + + +Canvas test: 2d.layer.beginLayer-options + + + + + + +

2d.layer.beginLayer-options

+

Checks beginLayer works for different option parameter values

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.blur-from-outside-canvas.no-clipping-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.blur-from-outside-canvas.no-clipping-expected.html new file mode 100644 index 0000000000..6cad180f14 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.blur-from-outside-canvas.no-clipping-expected.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.layer.blur-from-outside-canvas.no-clipping +

2d.layer.blur-from-outside-canvas.no-clipping

+

Checks blur leaking inside from drawing outside the canvas

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.blur-from-outside-canvas.no-clipping.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.blur-from-outside-canvas.no-clipping.html new file mode 100644 index 0000000000..b689ad39fe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.blur-from-outside-canvas.no-clipping.html @@ -0,0 +1,28 @@ + + + +Canvas test: 2d.layer.blur-from-outside-canvas.no-clipping +

2d.layer.blur-from-outside-canvas.no-clipping

+

Checks blur leaking inside from drawing outside the canvas

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.blur-from-outside-canvas.with-clipping-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.blur-from-outside-canvas.with-clipping-expected.html new file mode 100644 index 0000000000..1823f78983 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.blur-from-outside-canvas.with-clipping-expected.html @@ -0,0 +1,38 @@ + + +Canvas test: 2d.layer.blur-from-outside-canvas.with-clipping +

2d.layer.blur-from-outside-canvas.with-clipping

+

Checks blur leaking inside from drawing outside the canvas

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.blur-from-outside-canvas.with-clipping.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.blur-from-outside-canvas.with-clipping.html new file mode 100644 index 0000000000..9e8161019a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.blur-from-outside-canvas.with-clipping.html @@ -0,0 +1,30 @@ + + + +Canvas test: 2d.layer.blur-from-outside-canvas.with-clipping +

2d.layer.blur-from-outside-canvas.with-clipping

+

Checks blur leaking inside from drawing outside the canvas

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clearRect.full-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clearRect.full-expected.html new file mode 100644 index 0000000000..5a47f8e118 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clearRect.full-expected.html @@ -0,0 +1,15 @@ + + +Canvas test: 2d.layer.clearRect.full +

2d.layer.clearRect.full

+

clearRect inside a layer can clear all of the layer content.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clearRect.full.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clearRect.full.html new file mode 100644 index 0000000000..579c6e1053 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clearRect.full.html @@ -0,0 +1,23 @@ + + + +Canvas test: 2d.layer.clearRect.full +

2d.layer.clearRect.full

+

clearRect inside a layer can clear all of the layer content.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clearRect.partial-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clearRect.partial-expected.html new file mode 100644 index 0000000000..ac75105cec --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clearRect.partial-expected.html @@ -0,0 +1,21 @@ + + +Canvas test: 2d.layer.clearRect.partial +

2d.layer.clearRect.partial

+

clearRect inside a layer can clear a portion of the layer content.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clearRect.partial.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clearRect.partial.html new file mode 100644 index 0000000000..8323ffb931 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clearRect.partial.html @@ -0,0 +1,22 @@ + + + +Canvas test: 2d.layer.clearRect.partial +

2d.layer.clearRect.partial

+

clearRect inside a layer can clear a portion of the layer content.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clip-inside-and-outside-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clip-inside-and-outside-expected.html new file mode 100644 index 0000000000..14e6d56245 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clip-inside-and-outside-expected.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.layer.clip-inside-and-outside +

2d.layer.clip-inside-and-outside

+

Check clipping set inside and outside the layer

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clip-inside-and-outside.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clip-inside-and-outside.html new file mode 100644 index 0000000000..1a727bbd3c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clip-inside-and-outside.html @@ -0,0 +1,27 @@ + + + +Canvas test: 2d.layer.clip-inside-and-outside +

2d.layer.clip-inside-and-outside

+

Check clipping set inside and outside the layer

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clip-inside-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clip-inside-expected.html new file mode 100644 index 0000000000..281fc1d913 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clip-inside-expected.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.layer.clip-inside +

2d.layer.clip-inside

+

Check clipping set inside the layer

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clip-inside.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clip-inside.html new file mode 100644 index 0000000000..f3555c8321 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clip-inside.html @@ -0,0 +1,23 @@ + + + +Canvas test: 2d.layer.clip-inside +

2d.layer.clip-inside

+

Check clipping set inside the layer

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clip-outside-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clip-outside-expected.html new file mode 100644 index 0000000000..1b18c2e8a7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clip-outside-expected.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.layer.clip-outside +

2d.layer.clip-outside

+

Check clipping set outside the layer

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clip-outside.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clip-outside.html new file mode 100644 index 0000000000..bf8e84e3d2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.clip-outside.html @@ -0,0 +1,22 @@ + + + +Canvas test: 2d.layer.clip-outside +

2d.layer.clip-outside

+

Check clipping set outside the layer

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.cross-layer-paths-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.cross-layer-paths-expected.html new file mode 100644 index 0000000000..c394ecdfe3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.cross-layer-paths-expected.html @@ -0,0 +1,14 @@ + + +Canvas test: 2d.layer.cross-layer-paths +

2d.layer.cross-layer-paths

+

Checks that path defined in a layer is usable outside.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.cross-layer-paths.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.cross-layer-paths.html new file mode 100644 index 0000000000..7feebfdce6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.cross-layer-paths.html @@ -0,0 +1,20 @@ + + + +Canvas test: 2d.layer.cross-layer-paths +

2d.layer.cross-layer-paths

+

Checks that path defined in a layer is usable outside.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.css-filters.blur-and-shadow-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.css-filters.blur-and-shadow-expected.html new file mode 100644 index 0000000000..85503ae33a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.css-filters.blur-and-shadow-expected.html @@ -0,0 +1,17 @@ + + +Canvas test: 2d.layer.css-filters.blur-and-shadow +

2d.layer.css-filters.blur-and-shadow

+

Checks that beginLayer works with a CSS filter string as input.

+ + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.css-filters.blur-and-shadow.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.css-filters.blur-and-shadow.html new file mode 100644 index 0000000000..08adfa3d74 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.css-filters.blur-and-shadow.html @@ -0,0 +1,20 @@ + + + +Canvas test: 2d.layer.css-filters.blur-and-shadow +

2d.layer.css-filters.blur-and-shadow

+

Checks that beginLayer works with a CSS filter string as input.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.css-filters.blur-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.css-filters.blur-expected.html new file mode 100644 index 0000000000..c6131f6c1e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.css-filters.blur-expected.html @@ -0,0 +1,16 @@ + + +Canvas test: 2d.layer.css-filters.blur +

2d.layer.css-filters.blur

+

Checks that beginLayer works with a CSS filter string as input.

+ + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.css-filters.blur.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.css-filters.blur.html new file mode 100644 index 0000000000..3eb3ab8f9c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.css-filters.blur.html @@ -0,0 +1,20 @@ + + + +Canvas test: 2d.layer.css-filters.blur +

2d.layer.css-filters.blur

+

Checks that beginLayer works with a CSS filter string as input.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.css-filters.shadow-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.css-filters.shadow-expected.html new file mode 100644 index 0000000000..60f78d8096 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.css-filters.shadow-expected.html @@ -0,0 +1,16 @@ + + +Canvas test: 2d.layer.css-filters.shadow +

2d.layer.css-filters.shadow

+

Checks that beginLayer works with a CSS filter string as input.

+ + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.css-filters.shadow.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.css-filters.shadow.html new file mode 100644 index 0000000000..e6df8a3ac2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.css-filters.shadow.html @@ -0,0 +1,20 @@ + + + +Canvas test: 2d.layer.css-filters.shadow +

2d.layer.css-filters.shadow

+

Checks that beginLayer works with a CSS filter string as input.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.exceptions-are-no-op.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.exceptions-are-no-op.html new file mode 100644 index 0000000000..7ab2080fca --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.exceptions-are-no-op.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.layer.exceptions-are-no-op + + + + + + +

2d.layer.exceptions-are-no-op

+

Checks that the context state is left unchanged if beginLayer throws.

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.flush-on-frame-presentation-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.flush-on-frame-presentation-expected.html new file mode 100644 index 0000000000..532c29576c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.flush-on-frame-presentation-expected.html @@ -0,0 +1,33 @@ + + + +Canvas test: 2d.layer.flush-on-frame-presentation +

2d.layer.flush-on-frame-presentation

+

Check that layers state stack is flushed and rebuilt on frame renders.

+ +

FAIL (fallback content)

+
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.flush-on-frame-presentation.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.flush-on-frame-presentation.html new file mode 100644 index 0000000000..c8a118f8a2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.flush-on-frame-presentation.html @@ -0,0 +1,35 @@ + + + + +Canvas test: 2d.layer.flush-on-frame-presentation +

2d.layer.flush-on-frame-presentation

+

Check that layers state stack is flushed and rebuilt on frame renders.

+ +

FAIL (fallback content)

+
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-filter-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-filter-expected.html new file mode 100644 index 0000000000..88057fc354 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-filter-expected.html @@ -0,0 +1,17 @@ + + +Canvas test: 2d.layer.global-filter +

2d.layer.global-filter

+

Tests that layers ignore the global context filter.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-filter.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-filter.html new file mode 100644 index 0000000000..cf46f41b97 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-filter.html @@ -0,0 +1,26 @@ + + + +Canvas test: 2d.layer.global-filter +

2d.layer.global-filter

+

Tests that layers ignore the global context filter.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha-expected.html new file mode 100644 index 0000000000..0666e3098a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha-expected.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.layer.global-states.alpha +

2d.layer.global-states.alpha

+

Checks that layers correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending-expected.html new file mode 100644 index 0000000000..8a45027588 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending-expected.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.layer.global-states.alpha.blending +

2d.layer.global-states.alpha.blending

+

Checks that layers correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending.html new file mode 100644 index 0000000000..8e15a2b936 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending.html @@ -0,0 +1,35 @@ + + + +Canvas test: 2d.layer.global-states.alpha.blending +

2d.layer.global-states.alpha.blending

+

Checks that layers correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending.shadow-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending.shadow-expected.html new file mode 100644 index 0000000000..f7b633b35f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending.shadow-expected.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.layer.global-states.alpha.blending.shadow +

2d.layer.global-states.alpha.blending.shadow

+

Checks that layers correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending.shadow.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending.shadow.html new file mode 100644 index 0000000000..c8c6d433bc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending.shadow.html @@ -0,0 +1,39 @@ + + + +Canvas test: 2d.layer.global-states.alpha.blending.shadow +

2d.layer.global-states.alpha.blending.shadow

+

Checks that layers correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite-expected.html new file mode 100644 index 0000000000..951049e638 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite-expected.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.layer.global-states.alpha.composite +

2d.layer.global-states.alpha.composite

+

Checks that layers correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite.html new file mode 100644 index 0000000000..1ac6a2cbfe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite.html @@ -0,0 +1,35 @@ + + + +Canvas test: 2d.layer.global-states.alpha.composite +

2d.layer.global-states.alpha.composite

+

Checks that layers correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite.shadow-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite.shadow-expected.html new file mode 100644 index 0000000000..0ae93871f5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite.shadow-expected.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.layer.global-states.alpha.composite.shadow +

2d.layer.global-states.alpha.composite.shadow

+

Checks that layers correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite.shadow.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite.shadow.html new file mode 100644 index 0000000000..92b8a0d7a7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite.shadow.html @@ -0,0 +1,39 @@ + + + +Canvas test: 2d.layer.global-states.alpha.composite.shadow +

2d.layer.global-states.alpha.composite.shadow

+

Checks that layers correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.html new file mode 100644 index 0000000000..829796acbf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.html @@ -0,0 +1,34 @@ + + + +Canvas test: 2d.layer.global-states.alpha +

2d.layer.global-states.alpha

+

Checks that layers correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.shadow-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.shadow-expected.html new file mode 100644 index 0000000000..6f764c5001 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.shadow-expected.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.layer.global-states.alpha.shadow +

2d.layer.global-states.alpha.shadow

+

Checks that layers correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.shadow.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.shadow.html new file mode 100644 index 0000000000..a325302b3b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.alpha.shadow.html @@ -0,0 +1,38 @@ + + + +Canvas test: 2d.layer.global-states.alpha.shadow +

2d.layer.global-states.alpha.shadow

+

Checks that layers correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.blending-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.blending-expected.html new file mode 100644 index 0000000000..33fdf46a28 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.blending-expected.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.layer.global-states.blending +

2d.layer.global-states.blending

+

Checks that layers correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.blending.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.blending.html new file mode 100644 index 0000000000..7d4d9ae4b5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.blending.html @@ -0,0 +1,34 @@ + + + +Canvas test: 2d.layer.global-states.blending +

2d.layer.global-states.blending

+

Checks that layers correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.blending.shadow-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.blending.shadow-expected.html new file mode 100644 index 0000000000..6f969074f9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.blending.shadow-expected.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.layer.global-states.blending.shadow +

2d.layer.global-states.blending.shadow

+

Checks that layers correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.blending.shadow.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.blending.shadow.html new file mode 100644 index 0000000000..51926d76d8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.blending.shadow.html @@ -0,0 +1,38 @@ + + + +Canvas test: 2d.layer.global-states.blending.shadow +

2d.layer.global-states.blending.shadow

+

Checks that layers correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.composite-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.composite-expected.html new file mode 100644 index 0000000000..ed7669c4cf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.composite-expected.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.layer.global-states.composite +

2d.layer.global-states.composite

+

Checks that layers correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.composite.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.composite.html new file mode 100644 index 0000000000..898d149924 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.composite.html @@ -0,0 +1,34 @@ + + + +Canvas test: 2d.layer.global-states.composite +

2d.layer.global-states.composite

+

Checks that layers correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.composite.shadow-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.composite.shadow-expected.html new file mode 100644 index 0000000000..b687c27f47 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.composite.shadow-expected.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.layer.global-states.composite.shadow +

2d.layer.global-states.composite.shadow

+

Checks that layers correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.composite.shadow.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.composite.shadow.html new file mode 100644 index 0000000000..c563a57b76 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.composite.shadow.html @@ -0,0 +1,38 @@ + + + +Canvas test: 2d.layer.global-states.composite.shadow +

2d.layer.global-states.composite.shadow

+

Checks that layers correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha-expected.html new file mode 100644 index 0000000000..f304700feb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha-expected.html @@ -0,0 +1,50 @@ + + +Canvas test: 2d.layer.global-states.filter.alpha +

2d.layer.global-states.filter.alpha

+

Checks that layers with filters correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending-expected.html new file mode 100644 index 0000000000..7c91ce4229 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending-expected.html @@ -0,0 +1,51 @@ + + +Canvas test: 2d.layer.global-states.filter.alpha.blending +

2d.layer.global-states.filter.alpha.blending

+

Checks that layers with filters correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending.html new file mode 100644 index 0000000000..17e0f0c8c5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending.html @@ -0,0 +1,38 @@ + + + +Canvas test: 2d.layer.global-states.filter.alpha.blending +

2d.layer.global-states.filter.alpha.blending

+

Checks that layers with filters correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending.shadow-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending.shadow-expected.html new file mode 100644 index 0000000000..62942ffeae --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending.shadow-expected.html @@ -0,0 +1,55 @@ + + +Canvas test: 2d.layer.global-states.filter.alpha.blending.shadow +

2d.layer.global-states.filter.alpha.blending.shadow

+

Checks that layers with filters correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending.shadow.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending.shadow.html new file mode 100644 index 0000000000..ccadfb624b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending.shadow.html @@ -0,0 +1,42 @@ + + + +Canvas test: 2d.layer.global-states.filter.alpha.blending.shadow +

2d.layer.global-states.filter.alpha.blending.shadow

+

Checks that layers with filters correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite-expected.html new file mode 100644 index 0000000000..8e0d98648e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite-expected.html @@ -0,0 +1,51 @@ + + +Canvas test: 2d.layer.global-states.filter.alpha.composite +

2d.layer.global-states.filter.alpha.composite

+

Checks that layers with filters correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite.html new file mode 100644 index 0000000000..71a27cf710 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite.html @@ -0,0 +1,38 @@ + + + +Canvas test: 2d.layer.global-states.filter.alpha.composite +

2d.layer.global-states.filter.alpha.composite

+

Checks that layers with filters correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite.shadow-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite.shadow-expected.html new file mode 100644 index 0000000000..a649972546 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite.shadow-expected.html @@ -0,0 +1,55 @@ + + +Canvas test: 2d.layer.global-states.filter.alpha.composite.shadow +

2d.layer.global-states.filter.alpha.composite.shadow

+

Checks that layers with filters correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite.shadow.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite.shadow.html new file mode 100644 index 0000000000..b2907f02aa --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite.shadow.html @@ -0,0 +1,42 @@ + + + +Canvas test: 2d.layer.global-states.filter.alpha.composite.shadow +

2d.layer.global-states.filter.alpha.composite.shadow

+

Checks that layers with filters correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.html new file mode 100644 index 0000000000..5133aa170e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.html @@ -0,0 +1,37 @@ + + + +Canvas test: 2d.layer.global-states.filter.alpha +

2d.layer.global-states.filter.alpha

+

Checks that layers with filters correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.shadow-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.shadow-expected.html new file mode 100644 index 0000000000..169baee29b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.shadow-expected.html @@ -0,0 +1,54 @@ + + +Canvas test: 2d.layer.global-states.filter.alpha.shadow +

2d.layer.global-states.filter.alpha.shadow

+

Checks that layers with filters correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.shadow.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.shadow.html new file mode 100644 index 0000000000..6aa8e75a95 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.shadow.html @@ -0,0 +1,41 @@ + + + +Canvas test: 2d.layer.global-states.filter.alpha.shadow +

2d.layer.global-states.filter.alpha.shadow

+

Checks that layers with filters correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.blending-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.blending-expected.html new file mode 100644 index 0000000000..f81dcf72dc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.blending-expected.html @@ -0,0 +1,50 @@ + + +Canvas test: 2d.layer.global-states.filter.blending +

2d.layer.global-states.filter.blending

+

Checks that layers with filters correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.blending.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.blending.html new file mode 100644 index 0000000000..31628812c2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.blending.html @@ -0,0 +1,37 @@ + + + +Canvas test: 2d.layer.global-states.filter.blending +

2d.layer.global-states.filter.blending

+

Checks that layers with filters correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.blending.shadow-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.blending.shadow-expected.html new file mode 100644 index 0000000000..91f3725f8e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.blending.shadow-expected.html @@ -0,0 +1,54 @@ + + +Canvas test: 2d.layer.global-states.filter.blending.shadow +

2d.layer.global-states.filter.blending.shadow

+

Checks that layers with filters correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.blending.shadow.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.blending.shadow.html new file mode 100644 index 0000000000..e54cf06d0d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.blending.shadow.html @@ -0,0 +1,41 @@ + + + +Canvas test: 2d.layer.global-states.filter.blending.shadow +

2d.layer.global-states.filter.blending.shadow

+

Checks that layers with filters correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.composite-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.composite-expected.html new file mode 100644 index 0000000000..97e85a1593 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.composite-expected.html @@ -0,0 +1,50 @@ + + +Canvas test: 2d.layer.global-states.filter.composite +

2d.layer.global-states.filter.composite

+

Checks that layers with filters correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.composite.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.composite.html new file mode 100644 index 0000000000..d7e365422f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.composite.html @@ -0,0 +1,37 @@ + + + +Canvas test: 2d.layer.global-states.filter.composite +

2d.layer.global-states.filter.composite

+

Checks that layers with filters correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.composite.shadow-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.composite.shadow-expected.html new file mode 100644 index 0000000000..4716bb2760 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.composite.shadow-expected.html @@ -0,0 +1,54 @@ + + +Canvas test: 2d.layer.global-states.filter.composite.shadow +

2d.layer.global-states.filter.composite.shadow

+

Checks that layers with filters correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.composite.shadow.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.composite.shadow.html new file mode 100644 index 0000000000..e5c7698634 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.composite.shadow.html @@ -0,0 +1,41 @@ + + + +Canvas test: 2d.layer.global-states.filter.composite.shadow +

2d.layer.global-states.filter.composite.shadow

+

Checks that layers with filters correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.no-global-states-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.no-global-states-expected.html new file mode 100644 index 0000000000..e56fe0b360 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.no-global-states-expected.html @@ -0,0 +1,50 @@ + + +Canvas test: 2d.layer.global-states.filter.no-global-states +

2d.layer.global-states.filter.no-global-states

+

Checks that layers with filters correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.no-global-states.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.no-global-states.html new file mode 100644 index 0000000000..68f4d5004a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.no-global-states.html @@ -0,0 +1,37 @@ + + + +Canvas test: 2d.layer.global-states.filter.no-global-states +

2d.layer.global-states.filter.no-global-states

+

Checks that layers with filters correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.shadow-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.shadow-expected.html new file mode 100644 index 0000000000..13ba2dd4cd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.shadow-expected.html @@ -0,0 +1,53 @@ + + +Canvas test: 2d.layer.global-states.filter.shadow +

2d.layer.global-states.filter.shadow

+

Checks that layers with filters correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.shadow.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.shadow.html new file mode 100644 index 0000000000..9efcd9d4f7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.filter.shadow.html @@ -0,0 +1,40 @@ + + + +Canvas test: 2d.layer.global-states.filter.shadow +

2d.layer.global-states.filter.shadow

+

Checks that layers with filters correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.no-global-states-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.no-global-states-expected.html new file mode 100644 index 0000000000..b91a2ae8b5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.no-global-states-expected.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.layer.global-states.no-global-states +

2d.layer.global-states.no-global-states

+

Checks that layers correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.no-global-states.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.no-global-states.html new file mode 100644 index 0000000000..d561be2341 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.no-global-states.html @@ -0,0 +1,34 @@ + + + +Canvas test: 2d.layer.global-states.no-global-states +

2d.layer.global-states.no-global-states

+

Checks that layers correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.shadow-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.shadow-expected.html new file mode 100644 index 0000000000..835e9d420a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.shadow-expected.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.layer.global-states.shadow +

2d.layer.global-states.shadow

+

Checks that layers correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.shadow.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.shadow.html new file mode 100644 index 0000000000..209316164c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.global-states.shadow.html @@ -0,0 +1,37 @@ + + + +Canvas test: 2d.layer.global-states.shadow +

2d.layer.global-states.shadow

+

Checks that layers correctly use global render states.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.invalid-calls.beginLayer-reset-endLayer.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.invalid-calls.beginLayer-reset-endLayer.html new file mode 100644 index 0000000000..74e05e1e48 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.invalid-calls.beginLayer-reset-endLayer.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.layer.invalid-calls.beginLayer-reset-endLayer + + + + + + +

2d.layer.invalid-calls.beginLayer-reset-endLayer

+

Raises exception on beginLayer() + reset() + endLayer().

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.invalid-calls.beginLayer-restore.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.invalid-calls.beginLayer-restore.html new file mode 100644 index 0000000000..1979cb6c73 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.invalid-calls.beginLayer-restore.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.layer.invalid-calls.beginLayer-restore + + + + + + +

2d.layer.invalid-calls.beginLayer-restore

+

Raises exception on beginLayer() + restore().

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.invalid-calls.beginLayer-save-endLayer.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.invalid-calls.beginLayer-save-endLayer.html new file mode 100644 index 0000000000..c635ac75b9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.invalid-calls.beginLayer-save-endLayer.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.layer.invalid-calls.beginLayer-save-endLayer + + + + + + +

2d.layer.invalid-calls.beginLayer-save-endLayer

+

Raises exception on beginLayer() + save() + endLayer().

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.invalid-calls.endLayer.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.invalid-calls.endLayer.html new file mode 100644 index 0000000000..c39a352d65 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.invalid-calls.endLayer.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.layer.invalid-calls.endLayer + + + + + + +

2d.layer.invalid-calls.endLayer

+

Raises exception on lone endLayer calls.

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.invalid-calls.save-beginLayer-restore.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.invalid-calls.save-beginLayer-restore.html new file mode 100644 index 0000000000..e2d4d56589 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.invalid-calls.save-beginLayer-restore.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.layer.invalid-calls.save-beginLayer-restore + + + + + + +

2d.layer.invalid-calls.save-beginLayer-restore

+

Raises exception on save() + beginLayer() + restore().

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.invalid-calls.save-endLayer.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.invalid-calls.save-endLayer.html new file mode 100644 index 0000000000..f4308e1191 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.invalid-calls.save-endLayer.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.layer.invalid-calls.save-endLayer + + + + + + +

2d.layer.invalid-calls.save-endLayer

+

Raises exception on save() + endLayer().

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.layer-rendering-state-reset-in-layer.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.layer-rendering-state-reset-in-layer.html new file mode 100644 index 0000000000..9283fd39b7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.layer-rendering-state-reset-in-layer.html @@ -0,0 +1,56 @@ + + +Canvas test: 2d.layer.layer-rendering-state-reset-in-layer + + + + + + +

2d.layer.layer-rendering-state-reset-in-layer

+

Tests that layers ignore the global context filter.

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.malformed-operations-with-promises.createImageBitmap.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.malformed-operations-with-promises.createImageBitmap.html new file mode 100644 index 0000000000..f1204aa61b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.malformed-operations-with-promises.createImageBitmap.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.layer.malformed-operations-with-promises.createImageBitmap + + + + + + +

2d.layer.malformed-operations-with-promises.createImageBitmap

+

Check that exceptions are thrown for operations that are malformed while layers are open.

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.malformed-operations-with-promises.toBlob.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.malformed-operations-with-promises.toBlob.html new file mode 100644 index 0000000000..6c69bb3784 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.malformed-operations-with-promises.toBlob.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.layer.malformed-operations-with-promises.toBlob + + + + + + +

2d.layer.malformed-operations-with-promises.toBlob

+

Check that exceptions are thrown for operations that are malformed while layers are open.

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.malformed-operations.createPattern.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.malformed-operations.createPattern.html new file mode 100644 index 0000000000..f927b96524 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.malformed-operations.createPattern.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.layer.malformed-operations.createPattern + + + + + + +

2d.layer.malformed-operations.createPattern

+

Check that exceptions are thrown for operations that are malformed while layers are open.

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.malformed-operations.drawImage.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.malformed-operations.drawImage.html new file mode 100644 index 0000000000..8bcc89d38e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.malformed-operations.drawImage.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.layer.malformed-operations.drawImage + + + + + + +

2d.layer.malformed-operations.drawImage

+

Check that exceptions are thrown for operations that are malformed while layers are open.

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.malformed-operations.getImageData.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.malformed-operations.getImageData.html new file mode 100644 index 0000000000..5dc3fcc017 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.malformed-operations.getImageData.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.layer.malformed-operations.getImageData + + + + + + +

2d.layer.malformed-operations.getImageData

+

Check that exceptions are thrown for operations that are malformed while layers are open.

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.malformed-operations.putImageData.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.malformed-operations.putImageData.html new file mode 100644 index 0000000000..fd4fc262c2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.malformed-operations.putImageData.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.layer.malformed-operations.putImageData + + + + + + +

2d.layer.malformed-operations.putImageData

+

Check that exceptions are thrown for operations that are malformed while layers are open.

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.malformed-operations.toDataURL.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.malformed-operations.toDataURL.html new file mode 100644 index 0000000000..c9bb4f3875 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.malformed-operations.toDataURL.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.layer.malformed-operations.toDataURL + + + + + + +

2d.layer.malformed-operations.toDataURL

+

Check that exceptions are thrown for operations that are malformed while layers are open.

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.nested-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.nested-expected.html new file mode 100644 index 0000000000..65525d4d6a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.nested-expected.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.layer.nested +

2d.layer.nested

+

Tests nested canvas layers.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.nested-filters-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.nested-filters-expected.html new file mode 100644 index 0000000000..8b53e2dc76 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.nested-filters-expected.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.layer.nested-filters +

2d.layer.nested-filters

+

Checks that nested layers work properly when both apply filters.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.nested-filters.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.nested-filters.html new file mode 100644 index 0000000000..333de67ac9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.nested-filters.html @@ -0,0 +1,33 @@ + + + +Canvas test: 2d.layer.nested-filters +

2d.layer.nested-filters

+

Checks that nested layers work properly when both apply filters.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.nested.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.nested.html new file mode 100644 index 0000000000..a508d8e5c8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.nested.html @@ -0,0 +1,36 @@ + + + +Canvas test: 2d.layer.nested +

2d.layer.nested

+

Tests nested canvas layers.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.opaque-canvas-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.opaque-canvas-expected.html new file mode 100644 index 0000000000..89c85de1e5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.opaque-canvas-expected.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.layer.opaque-canvas +

2d.layer.opaque-canvas

+

Checks that layer blending works inside opaque canvas

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.opaque-canvas.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.opaque-canvas.html new file mode 100644 index 0000000000..be8b088fbb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.opaque-canvas.html @@ -0,0 +1,35 @@ + + + +Canvas test: 2d.layer.opaque-canvas +

2d.layer.opaque-canvas

+

Checks that layer blending works inside opaque canvas

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.reset-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.reset-expected.html new file mode 100644 index 0000000000..93131dca9c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.reset-expected.html @@ -0,0 +1,14 @@ + + +Canvas test: 2d.layer.reset +

2d.layer.reset

+

Checks that reset discards any pending layers.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.reset.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.reset.html new file mode 100644 index 0000000000..9ad779abfd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.reset.html @@ -0,0 +1,35 @@ + + + +Canvas test: 2d.layer.reset +

2d.layer.reset

+

Checks that reset discards any pending layers.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.restore-style-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.restore-style-expected.html new file mode 100644 index 0000000000..1d0ac3558d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.restore-style-expected.html @@ -0,0 +1,24 @@ + + +Canvas test: 2d.layer.restore-style +

2d.layer.restore-style

+

Test that ensure layers restores style values upon endLayer.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.restore-style.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.restore-style.html new file mode 100644 index 0000000000..2537f409d6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.restore-style.html @@ -0,0 +1,25 @@ + + + + +Canvas test: 2d.layer.restore-style +

2d.layer.restore-style

+

Test that ensure layers restores style values upon endLayer.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.several-complex-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.several-complex-expected.html new file mode 100644 index 0000000000..ef46f69e2a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.several-complex-expected.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.layer.several-complex +

2d.layer.several-complex

+

Test to ensure beginlayer works for filter, alpha and shadow, even with consecutive layers.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.several-complex.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.several-complex.html new file mode 100644 index 0000000000..cff0c123ef --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.several-complex.html @@ -0,0 +1,34 @@ + + + + +Canvas test: 2d.layer.several-complex +

2d.layer.several-complex

+

Test to ensure beginlayer works for filter, alpha and shadow, even with consecutive layers.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.long-distance-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.long-distance-expected.html new file mode 100644 index 0000000000..cc10684a9b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.long-distance-expected.html @@ -0,0 +1,19 @@ + + +Canvas test: 2d.layer.shadow-from-outside-canvas.long-distance +

2d.layer.shadow-from-outside-canvas.long-distance

+

Checks shadow produced by object drawn outside the canvas

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.long-distance-with-clipping-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.long-distance-with-clipping-expected.html new file mode 100644 index 0000000000..377dd55ef6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.long-distance-with-clipping-expected.html @@ -0,0 +1,21 @@ + + +Canvas test: 2d.layer.shadow-from-outside-canvas.long-distance-with-clipping +

2d.layer.shadow-from-outside-canvas.long-distance-with-clipping

+

Checks shadow produced by object drawn outside the canvas

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.long-distance-with-clipping.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.long-distance-with-clipping.html new file mode 100644 index 0000000000..88a3a67c7b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.long-distance-with-clipping.html @@ -0,0 +1,30 @@ + + + +Canvas test: 2d.layer.shadow-from-outside-canvas.long-distance-with-clipping +

2d.layer.shadow-from-outside-canvas.long-distance-with-clipping

+

Checks shadow produced by object drawn outside the canvas

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.long-distance.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.long-distance.html new file mode 100644 index 0000000000..8ade08bec5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.long-distance.html @@ -0,0 +1,28 @@ + + + +Canvas test: 2d.layer.shadow-from-outside-canvas.long-distance +

2d.layer.shadow-from-outside-canvas.long-distance

+

Checks shadow produced by object drawn outside the canvas

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.short-distance-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.short-distance-expected.html new file mode 100644 index 0000000000..8980708dd1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.short-distance-expected.html @@ -0,0 +1,19 @@ + + +Canvas test: 2d.layer.shadow-from-outside-canvas.short-distance +

2d.layer.shadow-from-outside-canvas.short-distance

+

Checks shadow produced by object drawn outside the canvas

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.short-distance-with-clipping-expected.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.short-distance-with-clipping-expected.html new file mode 100644 index 0000000000..024fc8c9a4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.short-distance-with-clipping-expected.html @@ -0,0 +1,21 @@ + + +Canvas test: 2d.layer.shadow-from-outside-canvas.short-distance-with-clipping +

2d.layer.shadow-from-outside-canvas.short-distance-with-clipping

+

Checks shadow produced by object drawn outside the canvas

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.short-distance-with-clipping.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.short-distance-with-clipping.html new file mode 100644 index 0000000000..7ced448144 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.short-distance-with-clipping.html @@ -0,0 +1,30 @@ + + + +Canvas test: 2d.layer.shadow-from-outside-canvas.short-distance-with-clipping +

2d.layer.shadow-from-outside-canvas.short-distance-with-clipping

+

Checks shadow produced by object drawn outside the canvas

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.short-distance.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.short-distance.html new file mode 100644 index 0000000000..37398400d1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.shadow-from-outside-canvas.short-distance.html @@ -0,0 +1,28 @@ + + + +Canvas test: 2d.layer.shadow-from-outside-canvas.short-distance +

2d.layer.shadow-from-outside-canvas.short-distance

+

Checks shadow produced by object drawn outside the canvas

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.beginLayer-endLayer.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.beginLayer-endLayer.html new file mode 100644 index 0000000000..609cb19a7d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.beginLayer-endLayer.html @@ -0,0 +1,27 @@ + + +Canvas test: 2d.layer.valid-calls.beginLayer-endLayer + + + + + + +

2d.layer.valid-calls.beginLayer-endLayer

+

No exception raised on beginLayer() + endLayer().

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.beginLayer-save.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.beginLayer-save.html new file mode 100644 index 0000000000..9658040296 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.beginLayer-save.html @@ -0,0 +1,27 @@ + + +Canvas test: 2d.layer.valid-calls.beginLayer-save + + + + + + +

2d.layer.valid-calls.beginLayer-save

+

No exception raised on beginLayer() + save().

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.beginLayer.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.beginLayer.html new file mode 100644 index 0000000000..0556683331 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.beginLayer.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.layer.valid-calls.beginLayer + + + + + + +

2d.layer.valid-calls.beginLayer

+

No exception raised on lone beginLayer() calls.

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.restore.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.restore.html new file mode 100644 index 0000000000..b7a370306f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.restore.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.layer.valid-calls.restore + + + + + + +

2d.layer.valid-calls.restore

+

No exception raised on lone restore() calls.

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.save-beginLayer.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.save-beginLayer.html new file mode 100644 index 0000000000..816398c7fc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.save-beginLayer.html @@ -0,0 +1,27 @@ + + +Canvas test: 2d.layer.valid-calls.save-beginLayer + + + + + + +

2d.layer.valid-calls.save-beginLayer

+

No exception raised on save() + beginLayer().

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.save.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.save.html new file mode 100644 index 0000000000..d8df8cedce --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.save.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.layer.valid-calls.save + + + + + + +

2d.layer.valid-calls.save

+

No exception raised on lone save() calls.

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.save_reset_restore.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.save_reset_restore.html new file mode 100644 index 0000000000..4c733263a6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.save_reset_restore.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.layer.valid-calls.save_reset_restore + + + + + + +

2d.layer.valid-calls.save_reset_restore

+

No exception raised on save() + reset() + restore().

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.save_restore.html b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.save_restore.html new file mode 100644 index 0000000000..27ae70278e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/layers/2d.layer.valid-calls.save_restore.html @@ -0,0 +1,27 @@ + + +Canvas test: 2d.layer.valid-calls.save_restore + + + + + + +

2d.layer.valid-calls.save_restore

+

No exception raised on save() + restore().

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cap.butt.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cap.butt.html new file mode 100644 index 0000000000..f8c7cab1f2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cap.butt.html @@ -0,0 +1,60 @@ + + +Canvas test: 2d.line.cap.butt + + + + + + +

2d.line.cap.butt

+

lineCap 'butt' is rendered correctly

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cap.closed.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cap.closed.html new file mode 100644 index 0000000000..263c6c6c76 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cap.closed.html @@ -0,0 +1,45 @@ + + +Canvas test: 2d.line.cap.closed + + + + + + +

2d.line.cap.closed

+

Line caps are not drawn at the corners of an unclosed rectangle

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cap.invalid.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cap.invalid.html new file mode 100644 index 0000000000..22e98ee326 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cap.invalid.html @@ -0,0 +1,51 @@ + + +Canvas test: 2d.line.cap.invalid + + + + + + +

2d.line.cap.invalid

+

Setting lineCap to invalid values is ignored

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cap.open.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cap.open.html new file mode 100644 index 0000000000..6f7918a1c9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cap.open.html @@ -0,0 +1,45 @@ + + +Canvas test: 2d.line.cap.open + + + + + + +

2d.line.cap.open

+

Line caps are drawn at the corners of an unclosed rectangle

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cap.round.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cap.round.html new file mode 100644 index 0000000000..3990ad384e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cap.round.html @@ -0,0 +1,76 @@ + + +Canvas test: 2d.line.cap.round + + + + + + +

2d.line.cap.round

+

lineCap 'round' is rendered correctly

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cap.square.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cap.square.html new file mode 100644 index 0000000000..8d6af320fe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cap.square.html @@ -0,0 +1,60 @@ + + +Canvas test: 2d.line.cap.square + + + + + + +

2d.line.cap.square

+

lineCap 'square' is rendered correctly

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cap.valid.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cap.valid.html new file mode 100644 index 0000000000..a11d32030e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cap.valid.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.line.cap.valid + + + + + + +

2d.line.cap.valid

+

Setting lineCap to valid values works

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cross.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cross.html new file mode 100644 index 0000000000..e6866e3e40 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.cross.html @@ -0,0 +1,42 @@ + + +Canvas test: 2d.line.cross + + + + + + +

2d.line.cross

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.defaults.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.defaults.html new file mode 100644 index 0000000000..daa4634387 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.defaults.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.line.defaults + + + + + + +

2d.line.defaults

+

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.fill.noop.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.fill.noop.html new file mode 100644 index 0000000000..6dd8804ab0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.fill.noop.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.line.fill.noop + + + + + + +

2d.line.fill.noop

+

Filling a line draws nothing

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.invalid.strokestyle.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.invalid.strokestyle.html new file mode 100644 index 0000000000..89a234ecc3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.invalid.strokestyle.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.line.invalid.strokestyle + + + + + + +

2d.line.invalid.strokestyle

+

Verify correct behavior of canvas on an invalid strokeStyle()

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.bevel.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.bevel.html new file mode 100644 index 0000000000..041e9a1605 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.bevel.html @@ -0,0 +1,79 @@ + + +Canvas test: 2d.line.join.bevel + + + + + + +

2d.line.join.bevel

+

lineJoin 'bevel' is rendered correctly

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.closed.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.closed.html new file mode 100644 index 0000000000..a52219ccce --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.closed.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.line.join.closed + + + + + + +

2d.line.join.closed

+

Line joins are drawn at the corner of a closed rectangle

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.invalid.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.invalid.html new file mode 100644 index 0000000000..3c34ef3475 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.invalid.html @@ -0,0 +1,51 @@ + + +Canvas test: 2d.line.join.invalid + + + + + + +

2d.line.join.invalid

+

Setting lineJoin to invalid values is ignored

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.miter.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.miter.html new file mode 100644 index 0000000000..5a3472e92d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.miter.html @@ -0,0 +1,70 @@ + + +Canvas test: 2d.line.join.miter + + + + + + +

2d.line.join.miter

+

lineJoin 'miter' is rendered correctly

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.open.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.open.html new file mode 100644 index 0000000000..55b7a8b49e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.open.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.line.join.open + + + + + + +

2d.line.join.open

+

Line joins are not drawn at the corner of an unclosed rectangle

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.parallel.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.parallel.html new file mode 100644 index 0000000000..cd736b503d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.parallel.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.line.join.parallel + + + + + + +

2d.line.join.parallel

+

Line joins are drawn at 180-degree joins

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.round.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.round.html new file mode 100644 index 0000000000..fb968b9966 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.round.html @@ -0,0 +1,77 @@ + + +Canvas test: 2d.line.join.round + + + + + + +

2d.line.join.round

+

lineJoin 'round' is rendered correctly

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.valid.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.valid.html new file mode 100644 index 0000000000..3e5e200cb5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.join.valid.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.line.join.valid + + + + + + +

2d.line.join.valid

+

Setting lineJoin to valid values works

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.acute.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.acute.html new file mode 100644 index 0000000000..6acba4f3d2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.acute.html @@ -0,0 +1,51 @@ + + +Canvas test: 2d.line.miter.acute + + + + + + +

2d.line.miter.acute

+

Miter joins are drawn correctly with acute angles

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.exceeded.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.exceeded.html new file mode 100644 index 0000000000..542851d580 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.exceeded.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.line.miter.exceeded + + + + + + +

2d.line.miter.exceeded

+

Miter joins are not drawn when the miter limit is exceeded

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.invalid.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.invalid.html new file mode 100644 index 0000000000..826a6e24a7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.invalid.html @@ -0,0 +1,59 @@ + + +Canvas test: 2d.line.miter.invalid + + + + + + +

2d.line.miter.invalid

+

Setting miterLimit to invalid values is ignored

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.lineedge.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.lineedge.html new file mode 100644 index 0000000000..68eeb06162 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.lineedge.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.line.miter.lineedge + + + + + + +

2d.line.miter.lineedge

+

Miter joins are not drawn when the miter limit is exceeded at the corners of a zero-height rectangle

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.obtuse.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.obtuse.html new file mode 100644 index 0000000000..2dd08f6afc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.obtuse.html @@ -0,0 +1,51 @@ + + +Canvas test: 2d.line.miter.obtuse + + + + + + +

2d.line.miter.obtuse

+

Miter joins are drawn correctly with obtuse angles

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.rightangle.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.rightangle.html new file mode 100644 index 0000000000..7ae9f5e232 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.rightangle.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.line.miter.rightangle + + + + + + +

2d.line.miter.rightangle

+

Miter joins are not drawn when the miter limit is exceeded, on exact right angles

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.valid.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.valid.html new file mode 100644 index 0000000000..51b00c292d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.valid.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.line.miter.valid + + + + + + +

2d.line.miter.valid

+

Setting miterLimit to valid values works

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.within.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.within.html new file mode 100644 index 0000000000..f438866009 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.within.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.line.miter.within + + + + + + +

2d.line.miter.within

+

Miter joins are drawn when the miter limit is not quite exceeded

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.union.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.union.html new file mode 100644 index 0000000000..9d43cebee7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.union.html @@ -0,0 +1,45 @@ + + +Canvas test: 2d.line.union + + + + + + +

2d.line.union

+

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.width.basic.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.width.basic.html new file mode 100644 index 0000000000..f2e9a9f86d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.width.basic.html @@ -0,0 +1,62 @@ + + +Canvas test: 2d.line.width.basic + + + + + + +

2d.line.width.basic

+

lineWidth determines the width of line strokes

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.width.invalid.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.width.invalid.html new file mode 100644 index 0000000000..363060cf6d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.width.invalid.html @@ -0,0 +1,59 @@ + + +Canvas test: 2d.line.width.invalid + + + + + + +

2d.line.width.invalid

+

Setting lineWidth to invalid values is ignored

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.width.scaledefault.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.width.scaledefault.html new file mode 100644 index 0000000000..6c4ec52b5d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.width.scaledefault.html @@ -0,0 +1,39 @@ + + +Canvas test: 2d.line.width.scaledefault + + + + + + +

2d.line.width.scaledefault

+

Default lineWidth strokes are affected by scale transformations

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.width.transformed.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.width.transformed.html new file mode 100644 index 0000000000..600ce93fb7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.width.transformed.html @@ -0,0 +1,68 @@ + + +Canvas test: 2d.line.width.transformed + + + + + + +

2d.line.width.transformed

+

Line stroke widths are affected by scale transformations

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ + diff --git a/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.width.valid.html b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.width.valid.html new file mode 100644 index 0000000000..1a76b0ed4c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/line-styles/2d.line.width.valid.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.line.width.valid + + + + + + +

2d.line.width.valid

+

Setting lineWidth to valid values works

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/README.md b/testing/web-platform/tests/html/canvas/element/manual/README.md new file mode 100644 index 0000000000..68d877200b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/README.md @@ -0,0 +1 @@ +This folder contains tests that were manually added to the repository. All other tests have been autogenerated by html/canvas/tools/build.sh \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/manual/building-paths/canvas_complexshapes_arcto_001-ref.htm b/testing/web-platform/tests/html/canvas/element/manual/building-paths/canvas_complexshapes_arcto_001-ref.htm new file mode 100644 index 0000000000..31ddfcafd9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/building-paths/canvas_complexshapes_arcto_001-ref.htm @@ -0,0 +1,22 @@ + + + + HTML5 Canvas Test: arcTo() adds to subpath if same point + + + + +

Description: If x1,y1 and x2,y2 are the same point, then arcTo must add x1,y1 to the subpath, and connect that point to x0,y0 with a straight line.

+ Browser does not support HTML5 Canvas (test ref). + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/building-paths/canvas_complexshapes_arcto_001.htm b/testing/web-platform/tests/html/canvas/element/manual/building-paths/canvas_complexshapes_arcto_001.htm new file mode 100644 index 0000000000..c3f2fb6f43 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/building-paths/canvas_complexshapes_arcto_001.htm @@ -0,0 +1,26 @@ + + + + HTML5 Canvas Test: arcTo() adds to subpath if same point + + + + + + + +

Description: If x1,y1 and x2,y2 are the same point, then arcTo must add x1,y1 to the subpath, and connect that point to x0,y0 with a straight line.

+ Browser does not support HTML5 Canvas. + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/building-paths/canvas_complexshapes_beziercurveto_001-ref.htm b/testing/web-platform/tests/html/canvas/element/manual/building-paths/canvas_complexshapes_beziercurveto_001-ref.htm new file mode 100644 index 0000000000..6be08c0b3c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/building-paths/canvas_complexshapes_beziercurveto_001-ref.htm @@ -0,0 +1,32 @@ + + + + HTML5 Canvas Test: bezierCurveTo() must ensure subpaths + + + + +

Description: bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) must ensure there is a subpath for the point (cp1x,cp1y) if the context has no subpaths, then it must connect the last point in the subpath to the point (x,y).

+ Browser does not support HTML5 Canvas (ref test). + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/building-paths/canvas_complexshapes_beziercurveto_001.htm b/testing/web-platform/tests/html/canvas/element/manual/building-paths/canvas_complexshapes_beziercurveto_001.htm new file mode 100644 index 0000000000..d04926ebac --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/building-paths/canvas_complexshapes_beziercurveto_001.htm @@ -0,0 +1,35 @@ + + + + HTML5 Canvas Test: bezierCurveTo() must ensure subpaths + + + + + + + +

Description: bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) must ensure there is a subpath for the point (cp1x,cp1y) if the context has no subpaths, then it must connect the last point in the subpath to the point (x,y).

+ Browser does not support HTML5 Canvas. + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/compositing/alpha_filter_shadow-ref.html b/testing/web-platform/tests/html/canvas/element/manual/compositing/alpha_filter_shadow-ref.html new file mode 100644 index 0000000000..3ff0ed291d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/compositing/alpha_filter_shadow-ref.html @@ -0,0 +1,15 @@ + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/compositing/alpha_filter_shadow.html b/testing/web-platform/tests/html/canvas/element/manual/compositing/alpha_filter_shadow.html new file mode 100644 index 0000000000..1df227ce0b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/compositing/alpha_filter_shadow.html @@ -0,0 +1,16 @@ + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/compositing/canvas_compositing_globalcompositeoperation_001-ref.htm b/testing/web-platform/tests/html/canvas/element/manual/compositing/canvas_compositing_globalcompositeoperation_001-ref.htm new file mode 100644 index 0000000000..70196fb36a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/compositing/canvas_compositing_globalcompositeoperation_001-ref.htm @@ -0,0 +1,11 @@ + + + + HTML5 Canvas Test: globalCompositeOperation "destination-over" + + + +

Description: If the globalCompositeOperation is set to "destination-over", display the destination image wherever the destination image is opaque.

+
black rectangle
+ + diff --git a/testing/web-platform/tests/html/canvas/element/manual/compositing/canvas_compositing_globalcompositeoperation_001.htm b/testing/web-platform/tests/html/canvas/element/manual/compositing/canvas_compositing_globalcompositeoperation_001.htm new file mode 100644 index 0000000000..8d6208eb32 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/compositing/canvas_compositing_globalcompositeoperation_001.htm @@ -0,0 +1,32 @@ + + + + HTML5 Canvas Test: globalCompositeOperation "destination-over" + + + + + + + +

Description: If the globalCompositeOperation is set to "destination-over", display the destination image wherever the destination image is opaque.

+ Browser does not support HTML5 Canvas. + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/context-attributes/canvas-with-padding.html b/testing/web-platform/tests/html/canvas/element/manual/context-attributes/canvas-with-padding.html new file mode 100644 index 0000000000..5a93ef680a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/context-attributes/canvas-with-padding.html @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/manual/context-attributes/clearRect_alpha_false-ref.html b/testing/web-platform/tests/html/canvas/element/manual/context-attributes/clearRect_alpha_false-ref.html new file mode 100644 index 0000000000..eccfc4e2cc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/context-attributes/clearRect_alpha_false-ref.html @@ -0,0 +1,10 @@ + + +CanvasRenderingContext 2D with alpha=flase, fillRect with semi-transparent color. +

Test passes if a 100x100 black square is displayed below.

+ + diff --git a/testing/web-platform/tests/html/canvas/element/manual/context-attributes/clearRect_alpha_false.html b/testing/web-platform/tests/html/canvas/element/manual/context-attributes/clearRect_alpha_false.html new file mode 100644 index 0000000000..a328fbf97a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/context-attributes/clearRect_alpha_false.html @@ -0,0 +1,15 @@ + + +CanvasRenderingContext 2D with alpha=flase, clearRect + + + + +

Test passes if a 100x100 black square is displayed below.

+ + diff --git a/testing/web-platform/tests/html/canvas/element/manual/context-attributes/drawImage_alpha_false-ref.html b/testing/web-platform/tests/html/canvas/element/manual/context-attributes/drawImage_alpha_false-ref.html new file mode 100644 index 0000000000..2c9e5620b2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/context-attributes/drawImage_alpha_false-ref.html @@ -0,0 +1,10 @@ + + +CanvasRenderingContext 2D with alpha=flase, drawing a transparent image. +

Test passes if a 100x100 black square is displayed below.

+ + diff --git a/testing/web-platform/tests/html/canvas/element/manual/context-attributes/drawImage_alpha_false.html b/testing/web-platform/tests/html/canvas/element/manual/context-attributes/drawImage_alpha_false.html new file mode 100644 index 0000000000..64f38bceb1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/context-attributes/drawImage_alpha_false.html @@ -0,0 +1,20 @@ + + +CanvasRenderingContext 2D with alpha=flase, drawing a transparent image + + + + +

Test passes if a 100x100 black square is displayed below.

+ + diff --git a/testing/web-platform/tests/html/canvas/element/manual/context-attributes/fillRect_alpha_false-ref.html b/testing/web-platform/tests/html/canvas/element/manual/context-attributes/fillRect_alpha_false-ref.html new file mode 100644 index 0000000000..eccfc4e2cc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/context-attributes/fillRect_alpha_false-ref.html @@ -0,0 +1,10 @@ + + +CanvasRenderingContext 2D with alpha=flase, fillRect with semi-transparent color. +

Test passes if a 100x100 black square is displayed below.

+ + diff --git a/testing/web-platform/tests/html/canvas/element/manual/context-attributes/fillRect_alpha_false.html b/testing/web-platform/tests/html/canvas/element/manual/context-attributes/fillRect_alpha_false.html new file mode 100644 index 0000000000..143756eb0c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/context-attributes/fillRect_alpha_false.html @@ -0,0 +1,14 @@ + + +CanvasRenderingContext 2D with alpha=flase, fillRect with semi-transparent color. + + + + +

Test passes if a 100x100 black square is displayed below.

+ + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/manual/context-attributes/fill_alpha_false-ref.html b/testing/web-platform/tests/html/canvas/element/manual/context-attributes/fill_alpha_false-ref.html new file mode 100644 index 0000000000..03265a656e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/context-attributes/fill_alpha_false-ref.html @@ -0,0 +1,10 @@ + + +CanvasRenderingContext 2D with alpha=flase, path fill with transparent color and 'copy' composite operation. +

Test passes if a 100x100 black square is displayed below.

+ + diff --git a/testing/web-platform/tests/html/canvas/element/manual/context-attributes/fill_alpha_false.html b/testing/web-platform/tests/html/canvas/element/manual/context-attributes/fill_alpha_false.html new file mode 100644 index 0000000000..7872a79380 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/context-attributes/fill_alpha_false.html @@ -0,0 +1,18 @@ + + +CanvasRenderingContext 2D with alpha=flase, path fill with transparent color and 'copy' composite operation. + + + + +

Test passes if a 100x100 black square is displayed below.

+ + diff --git a/testing/web-platform/tests/html/canvas/element/manual/context-attributes/getContextAttributes.html b/testing/web-platform/tests/html/canvas/element/manual/context-attributes/getContextAttributes.html new file mode 100644 index 0000000000..47b3d96233 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/context-attributes/getContextAttributes.html @@ -0,0 +1,46 @@ + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/context-attributes/initial_color_alpha_false-ref.html b/testing/web-platform/tests/html/canvas/element/manual/context-attributes/initial_color_alpha_false-ref.html new file mode 100644 index 0000000000..b67513c464 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/context-attributes/initial_color_alpha_false-ref.html @@ -0,0 +1,10 @@ + + +CanvasRenderingContext 2D with alpha=flase context creation parameter is initialized with solid black. +

Test passes if a 100x100 black square is displayed below.

+ + diff --git a/testing/web-platform/tests/html/canvas/element/manual/context-attributes/initial_color_alpha_false.html b/testing/web-platform/tests/html/canvas/element/manual/context-attributes/initial_color_alpha_false.html new file mode 100644 index 0000000000..9e86e5ce2c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/context-attributes/initial_color_alpha_false.html @@ -0,0 +1,13 @@ + + +CanvasRenderingContext 2D with alpha=flase context creation parameter is initialized with solid black. + + + + +

Test passes if a 100x100 black square is displayed below.

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/context-attributes/reset_color_alpha_false-ref.html b/testing/web-platform/tests/html/canvas/element/manual/context-attributes/reset_color_alpha_false-ref.html new file mode 100644 index 0000000000..d663131148 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/context-attributes/reset_color_alpha_false-ref.html @@ -0,0 +1,10 @@ + + +CanvasRenderingContext 2D with alpha=flase context creation parameter is re-initialized with solid black. +

Test passes if a 100x100 black square is displayed below.

+ + diff --git a/testing/web-platform/tests/html/canvas/element/manual/context-attributes/reset_color_alpha_false.html b/testing/web-platform/tests/html/canvas/element/manual/context-attributes/reset_color_alpha_false.html new file mode 100644 index 0000000000..191975e0f4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/context-attributes/reset_color_alpha_false.html @@ -0,0 +1,17 @@ + + +CanvasRenderingContext 2D with alpha=flase context creation parameter is re-initialized with solid black. + + + + +

Test passes if a 100x100 black square is displayed below.

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_canvas.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_canvas.html new file mode 100644 index 0000000000..36bd085136 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_canvas.html @@ -0,0 +1,203 @@ + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_canvas_self.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_canvas_self.html new file mode 100644 index 0000000000..83cf53583c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_canvas_self.html @@ -0,0 +1,17 @@ + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_canvas_self_ref.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_canvas_self_ref.html new file mode 100644 index 0000000000..9f297cacdc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_canvas_self_ref.html @@ -0,0 +1,11 @@ + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_crossorigin.sub.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_crossorigin.sub.html new file mode 100644 index 0000000000..3d57d9f064 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_crossorigin.sub.html @@ -0,0 +1,61 @@ + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_html_image.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_html_image.html new file mode 100644 index 0000000000..59a7d64465 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_html_image.html @@ -0,0 +1,268 @@ + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_svg_image_1.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_svg_image_1.html new file mode 100644 index 0000000000..ea3300bef2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_svg_image_1.html @@ -0,0 +1,31 @@ + + +Load a 100x100 image to a SVG image and draw it to a 100x100 canvas. + + + +
+ + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_svg_image_with_foreign_object_does_not_taint.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_svg_image_with_foreign_object_does_not_taint.html new file mode 100644 index 0000000000..f29b2bf5a8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_svg_image_with_foreign_object_does_not_taint.html @@ -0,0 +1,32 @@ + + +Draw an SVG image with a foreignObject to a canvas + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-orientation-none-ref.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-orientation-none-ref.html new file mode 100644 index 0000000000..320a9b8108 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-orientation-none-ref.html @@ -0,0 +1,12 @@ + + + + +reference for drawImage from a createImageBitmap source with image orientation: none + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-orientation-none.tentative.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-orientation-none.tentative.html new file mode 100644 index 0000000000..39ed4a25dc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-orientation-none.tentative.html @@ -0,0 +1,31 @@ + + + + +createImageBitmap and drawImage from an element source with image orientation: none + + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-ref.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-ref.html new file mode 100644 index 0000000000..261d6a0b7c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-ref.html @@ -0,0 +1,12 @@ + + + + +reference for drawImage from a createImageBitmap source with image orientation: from-image + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-swap-width-height-orientation-none-ref.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-swap-width-height-orientation-none-ref.html new file mode 100644 index 0000000000..3a78aad068 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-swap-width-height-orientation-none-ref.html @@ -0,0 +1,12 @@ + + + + +reference for drawImage from a createImageBitmap source with image orientation: none + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-swap-width-height-orientation-none.tentative.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-swap-width-height-orientation-none.tentative.html new file mode 100644 index 0000000000..3b16241c97 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-swap-width-height-orientation-none.tentative.html @@ -0,0 +1,32 @@ + + + + +createImageBitmap and drawImage from an element source with image orientation: none + + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-swap-width-height-ref.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-swap-width-height-ref.html new file mode 100644 index 0000000000..247d7f4049 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-swap-width-height-ref.html @@ -0,0 +1,12 @@ + + + + +reference for drawImage from a createImageBitmap source with image orientation: from-image + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-swap-width-height.tentative.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-swap-width-height.tentative.html new file mode 100644 index 0000000000..744ca54f47 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-swap-width-height.tentative.html @@ -0,0 +1,32 @@ + + + + +createImageBitmap and drawImage from an element source with image orientation: from-image + + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap.tentative.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap.tentative.html new file mode 100644 index 0000000000..632a170b88 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap.tentative.html @@ -0,0 +1,31 @@ + + + + +createImageBitmap and drawImage from an element source with image orientation: from-image + + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-blob-ref.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-blob-ref.html new file mode 100644 index 0000000000..2bd6037835 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-blob-ref.html @@ -0,0 +1,10 @@ + + + + +createImageBitmap and drawImage from a blob with image orientation: from-image, reference + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-blob.tentative.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-blob.tentative.html new file mode 100644 index 0000000000..330b3cbfe5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-blob.tentative.html @@ -0,0 +1,37 @@ + + + + +createImageBitmap and drawImage from a blob with image orientation: from-image + + + + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-orientation-none-ref.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-orientation-none-ref.html new file mode 100644 index 0000000000..b847b9eb73 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-orientation-none-ref.html @@ -0,0 +1,12 @@ + + + + +reference for drawImage from an element source with image orientation: none + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-orientation-none.tentative.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-orientation-none.tentative.html new file mode 100644 index 0000000000..61563da738 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-orientation-none.tentative.html @@ -0,0 +1,24 @@ + + + + +createImageBitmap and drawImage from an element source with image orientation: none + + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-ref.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-ref.html new file mode 100644 index 0000000000..3f4d1e5ff4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-ref.html @@ -0,0 +1,12 @@ + + + + +reference for drawImage from an element source with image orientation: from-image + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-swap-width-height-orientation-none-ref.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-swap-width-height-orientation-none-ref.html new file mode 100644 index 0000000000..b26154b40a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-swap-width-height-orientation-none-ref.html @@ -0,0 +1,12 @@ + + + + +reference drawImage from an element source with image orientation: none + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-swap-width-height-orientation-none.tentative.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-swap-width-height-orientation-none.tentative.html new file mode 100644 index 0000000000..290d7acf3a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-swap-width-height-orientation-none.tentative.html @@ -0,0 +1,24 @@ + + + + +createImageBitmap and drawImage from an element source with image orientation: none + + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-swap-width-height-ref.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-swap-width-height-ref.html new file mode 100644 index 0000000000..21f0f88b88 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-swap-width-height-ref.html @@ -0,0 +1,12 @@ + + + + +reference drawImage from an element source with image orientation: from-image + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-swap-width-height.tentative.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-swap-width-height.tentative.html new file mode 100644 index 0000000000..20d59358b4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-swap-width-height.tentative.html @@ -0,0 +1,24 @@ + + + + +createImageBitmap and drawImage from an element source with image orientation: from-image + + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element.tentative.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element.tentative.html new file mode 100644 index 0000000000..62cdf20c79 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-element.tentative.html @@ -0,0 +1,24 @@ + + + + +createImageBitmap and drawImage from an element source with image orientation: from-image + + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-with-src-rect-ref.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-with-src-rect-ref.html new file mode 100644 index 0000000000..19ffcc39c9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-with-src-rect-ref.html @@ -0,0 +1,22 @@ + + + + +reference for drawImage with image orientation: from-image and a sub-image source rect + + + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-with-src-rect.tentative.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-with-src-rect.tentative.html new file mode 100644 index 0000000000..d889e39302 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-with-src-rect.tentative.html @@ -0,0 +1,25 @@ + + + + +drawImage with image orientation: from-image and a sub-image source rect + + + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-paths-to-the-canvas/canvas_complexshapes_ispointInpath_001.htm b/testing/web-platform/tests/html/canvas/element/manual/drawing-paths-to-the-canvas/canvas_complexshapes_ispointInpath_001.htm new file mode 100644 index 0000000000..18c3c9afb9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-paths-to-the-canvas/canvas_complexshapes_ispointInpath_001.htm @@ -0,0 +1,31 @@ + + + + HTML5 Canvas Test: isPointInPath() unaffected by the current transformation matrix + + + + + + + + +

Description: isPointInPath must check the point (x, y) as coordinates unaffected by the current transformation matrix.

+ Browser does not support HTML5 Canvas. + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-paths-to-the-canvas/canvas_focus_drawFocusIfNeeded_AAPI_001-manual.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-paths-to-the-canvas/canvas_focus_drawFocusIfNeeded_AAPI_001-manual.html new file mode 100644 index 0000000000..bf38fa68b7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-paths-to-the-canvas/canvas_focus_drawFocusIfNeeded_AAPI_001-manual.html @@ -0,0 +1,50 @@ + + + + drawFocusIfNeeded() - AAPI test + + + + + +

Description

+

This manual test can be used to verify that drawFocusIfNeeded actually updates the accessible location information (i.e. UIAutomation's CurrentBoundingRectangle) in the Accessibility API. To perform this test, you will need an accessibility API inspector. To perform this test, use the tab key to move from the first focusable element to through to the fourth. This test passes if the first parameter of the bounding rectangle increases by 100 when focus is moved from the gray square to the orange square.

+

First focusable element

+ + Second focusable element + Third focusable element + +

Fourth focusable element

+ + + + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-paths-to-the-canvas/drawFocusIfNeeded_001.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-paths-to-the-canvas/drawFocusIfNeeded_001.html new file mode 100644 index 0000000000..6daf32a2af --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-paths-to-the-canvas/drawFocusIfNeeded_001.html @@ -0,0 +1,66 @@ + + + + drawFocusIfNeeded() + + + + + + +

Description

+

This test uses drawFocusIfNeeded to draw a focus ring in the canvas, then compare the ImageData before and after the invocation of the method to check that the focus ring was actually drawn.

+
+

Before:

+ + +

After:

+ + + +
+ +
+ + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-paths-to-the-canvas/drawFocusIfNeeded_002.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-paths-to-the-canvas/drawFocusIfNeeded_002.html new file mode 100644 index 0000000000..ec0a4ef427 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-paths-to-the-canvas/drawFocusIfNeeded_002.html @@ -0,0 +1,68 @@ + + + + drawFocusIfNeeded() + + + + + + +

Description

+

This test uses drawFocusIfNeeded does nothing if the element is not in focus but comparing ImageData from before and after.

+
+

Before:

+ + +

After:

+ + + +
+ +
+ + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-paths-to-the-canvas/drawFocusIfNeeded_003.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-paths-to-the-canvas/drawFocusIfNeeded_003.html new file mode 100644 index 0000000000..b62c0641f5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-paths-to-the-canvas/drawFocusIfNeeded_003.html @@ -0,0 +1,69 @@ + + + + drawFocusIfNeeded() + + + + + + +

Description

+

This test uses drawFocusIfNeeded does nothing if the element is not a descendant but comparing ImageData from before and after.

+
+

Before:

+ + + +

After:

+ + +
+ +
+ + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-paths-to-the-canvas/drawFocusIfNeeded_004.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-paths-to-the-canvas/drawFocusIfNeeded_004.html new file mode 100644 index 0000000000..326db0daa8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-paths-to-the-canvas/drawFocusIfNeeded_004.html @@ -0,0 +1,88 @@ + + + + drawFocusIfNeeded() + + + + + + +

Description

+

This test uses drawFocusIfNeeded to draw a complex path focus then compare ImageData from before and after.

+
+

Before:

+ + +

After:

+ + + +
+ +
+ + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-paths-to-the-canvas/drawFocusIfNeeded_005.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-paths-to-the-canvas/drawFocusIfNeeded_005.html new file mode 100644 index 0000000000..96a4e3fd5d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-paths-to-the-canvas/drawFocusIfNeeded_005.html @@ -0,0 +1,88 @@ + + + + drawFocusIfNeeded() + + + + + + +

Description

+

This test uses drawFocusIfNeeded to draw a complex path focus then compare ImageData from before and after.

+
+

Before:

+ + +

After:

+ +

This is text.

+
+
+ +
+ + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-text-to-the-canvas/canvas.2d.disconnected-font-size-math-ref.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-text-to-the-canvas/canvas.2d.disconnected-font-size-math-ref.html new file mode 100644 index 0000000000..6c5dab9f41 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-text-to-the-canvas/canvas.2d.disconnected-font-size-math-ref.html @@ -0,0 +1,19 @@ + + +font-size: math treated as medium in disconnected canvas (reference) + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/drawing-text-to-the-canvas/canvas.2d.disconnected-font-size-math.html b/testing/web-platform/tests/html/canvas/element/manual/drawing-text-to-the-canvas/canvas.2d.disconnected-font-size-math.html new file mode 100644 index 0000000000..2cecff68f1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/drawing-text-to-the-canvas/canvas.2d.disconnected-font-size-math.html @@ -0,0 +1,20 @@ + + +font-size: math treated as medium in disconnected canvas + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/fill-and-stroke-styles/2d.fillStyle.parse.current.notrendered.html b/testing/web-platform/tests/html/canvas/element/manual/fill-and-stroke-styles/2d.fillStyle.parse.current.notrendered.html new file mode 100644 index 0000000000..37701bacee --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/fill-and-stroke-styles/2d.fillStyle.parse.current.notrendered.html @@ -0,0 +1,31 @@ + +Canvas test: 2d.fillStyle.parse.current.notrendered + + + + + + +

2d.fillStyle.parse.current.basic

+

currentColor is computed from the canvas element

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

+ diff --git a/testing/web-platform/tests/html/canvas/element/manual/fill-and-stroke-styles/canvas_colorsandstyles_createlineargradient_001.htm b/testing/web-platform/tests/html/canvas/element/manual/fill-and-stroke-styles/canvas_colorsandstyles_createlineargradient_001.htm new file mode 100644 index 0000000000..5b77c98de7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/fill-and-stroke-styles/canvas_colorsandstyles_createlineargradient_001.htm @@ -0,0 +1,59 @@ + + + + HTML5 Canvas Test: createlinearGradient() with two points same + + + + + + + + +

Description: If the two points in a linear gradient have identical x,y coordinates, the canvas must paint nothing.

+

Test passes if there is one left-to-right, green-to-blue linear gradient seen on the page and no red is seen on the page.

+ Browser does not support HTML5 Canvas. + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/fill-and-stroke-styles/conic-gradient-expected.html b/testing/web-platform/tests/html/canvas/element/manual/fill-and-stroke-styles/conic-gradient-expected.html new file mode 100644 index 0000000000..f347abc9d3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/fill-and-stroke-styles/conic-gradient-expected.html @@ -0,0 +1,22 @@ + + + + + + + +
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/manual/fill-and-stroke-styles/conic-gradient-rotation-expected.html b/testing/web-platform/tests/html/canvas/element/manual/fill-and-stroke-styles/conic-gradient-rotation-expected.html new file mode 100644 index 0000000000..68d750f462 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/fill-and-stroke-styles/conic-gradient-rotation-expected.html @@ -0,0 +1,22 @@ + + + + + + + +
+ + diff --git a/testing/web-platform/tests/html/canvas/element/manual/fill-and-stroke-styles/conic-gradient-rotation.html b/testing/web-platform/tests/html/canvas/element/manual/fill-and-stroke-styles/conic-gradient-rotation.html new file mode 100644 index 0000000000..e8b213b3d8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/fill-and-stroke-styles/conic-gradient-rotation.html @@ -0,0 +1,30 @@ + + + + Conic gradient + + + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/manual/fill-and-stroke-styles/conic-gradient.html b/testing/web-platform/tests/html/canvas/element/manual/fill-and-stroke-styles/conic-gradient.html new file mode 100644 index 0000000000..73fcf6c23e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/fill-and-stroke-styles/conic-gradient.html @@ -0,0 +1,30 @@ + + + + Conic gradient + + + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-fillStyle-opacity.html b/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-fillStyle-opacity.html new file mode 100644 index 0000000000..b5f9d98b89 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-fillStyle-opacity.html @@ -0,0 +1,27 @@ + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-opacity-alpha-and-fillStyle-expected.html b/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-opacity-alpha-and-fillStyle-expected.html new file mode 100644 index 0000000000..f87794f0b7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-opacity-alpha-and-fillStyle-expected.html @@ -0,0 +1,41 @@ + + +
+
+
+
+ + diff --git a/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-opacity-alpha-and-fillStyle.html b/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-opacity-alpha-and-fillStyle.html new file mode 100644 index 0000000000..24c97d62ec --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-opacity-alpha-and-fillStyle.html @@ -0,0 +1,35 @@ + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-opacity.html b/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-opacity.html new file mode 100644 index 0000000000..cb2fc018af --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-opacity.html @@ -0,0 +1,35 @@ + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-shadow-and-properties-blur-expected.html b/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-shadow-and-properties-blur-expected.html new file mode 100644 index 0000000000..1f218b4bd2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-shadow-and-properties-blur-expected.html @@ -0,0 +1,33 @@ + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-shadow-and-properties-blur.html b/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-shadow-and-properties-blur.html new file mode 100644 index 0000000000..ab3699906d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-shadow-and-properties-blur.html @@ -0,0 +1,29 @@ + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-shadow-and-properties-expected.html b/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-shadow-and-properties-expected.html new file mode 100644 index 0000000000..294a219b70 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-shadow-and-properties-expected.html @@ -0,0 +1,21 @@ + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-shadow-and-properties.html b/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-shadow-and-properties.html new file mode 100644 index 0000000000..2057b95c3e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-shadow-and-properties.html @@ -0,0 +1,20 @@ + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-shadow-expected.html b/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-shadow-expected.html new file mode 100644 index 0000000000..04bc6392cc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-shadow-expected.html @@ -0,0 +1,16 @@ + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-shadow.html b/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-shadow.html new file mode 100644 index 0000000000..ddc6c89ee5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-shadow.html @@ -0,0 +1,15 @@ + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-globalAlpha.html b/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-globalAlpha.html new file mode 100644 index 0000000000..6d7bbcd03d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-globalAlpha.html @@ -0,0 +1,35 @@ + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-opacity-blend-modes-expected.html b/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-opacity-blend-modes-expected.html new file mode 100644 index 0000000000..3eb7581981 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-opacity-blend-modes-expected.html @@ -0,0 +1,48 @@ + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-opacity-blend-modes.html b/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-opacity-blend-modes.html new file mode 100644 index 0000000000..a2d513eb62 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-opacity-blend-modes.html @@ -0,0 +1,50 @@ + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-opacity-expected.html b/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-opacity-expected.html new file mode 100644 index 0000000000..caf6b53ce3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-opacity-expected.html @@ -0,0 +1,66 @@ + + +
+
+
+
+
+
+
+
+ + diff --git a/testing/web-platform/tests/html/canvas/element/manual/filters/svg-filter-crash.html b/testing/web-platform/tests/html/canvas/element/manual/filters/svg-filter-crash.html new file mode 100644 index 0000000000..f64379c792 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/filters/svg-filter-crash.html @@ -0,0 +1,14 @@ + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-blur-expected.html b/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-blur-expected.html new file mode 100644 index 0000000000..ae8911b2de --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-blur-expected.html @@ -0,0 +1,19 @@ + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-blur.html b/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-blur.html new file mode 100644 index 0000000000..9fe7ef120c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-blur.html @@ -0,0 +1,24 @@ + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-component-transfer-expected.html b/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-component-transfer-expected.html new file mode 100644 index 0000000000..a2351cbcf2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-component-transfer-expected.html @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-component-transfer.html b/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-component-transfer.html new file mode 100644 index 0000000000..47889c0db2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-component-transfer.html @@ -0,0 +1,62 @@ + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-convolve-matrix-expected.html b/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-convolve-matrix-expected.html new file mode 100644 index 0000000000..896a93542e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-convolve-matrix-expected.html @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-convolve-matrix.html b/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-convolve-matrix.html new file mode 100644 index 0000000000..1dfd602d13 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-convolve-matrix.html @@ -0,0 +1,60 @@ + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-turbulence-expected.html b/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-turbulence-expected.html new file mode 100644 index 0000000000..ff0eebe2e0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-turbulence-expected.html @@ -0,0 +1,37 @@ + + > + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-turbulence.html b/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-turbulence.html new file mode 100644 index 0000000000..b5b494825e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-turbulence.html @@ -0,0 +1,26 @@ + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/idl-conversions/canvas-filter-boolean-conversion-expected.html b/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/idl-conversions/canvas-filter-boolean-conversion-expected.html new file mode 100644 index 0000000000..f043b0e762 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/idl-conversions/canvas-filter-boolean-conversion-expected.html @@ -0,0 +1,30 @@ + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/idl-conversions/canvas-filter-boolean-conversion.html b/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/idl-conversions/canvas-filter-boolean-conversion.html new file mode 100644 index 0000000000..97ade79f37 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/idl-conversions/canvas-filter-boolean-conversion.html @@ -0,0 +1,58 @@ + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/idl-conversions/canvas-filter-long-conversion-expected.html b/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/idl-conversions/canvas-filter-long-conversion-expected.html new file mode 100644 index 0000000000..8b4262ed04 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/idl-conversions/canvas-filter-long-conversion-expected.html @@ -0,0 +1,26 @@ + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/idl-conversions/canvas-filter-long-conversion.html b/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/idl-conversions/canvas-filter-long-conversion.html new file mode 100644 index 0000000000..c742633224 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/idl-conversions/canvas-filter-long-conversion.html @@ -0,0 +1,35 @@ + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/idl-conversions/canvas-filter-sequence-conversion.html b/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/idl-conversions/canvas-filter-sequence-conversion.html new file mode 100644 index 0000000000..d48627867e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/filters/tentative/idl-conversions/canvas-filter-sequence-conversion.html @@ -0,0 +1,55 @@ + +Canvas test: canvas-filter-sequence-conversion + + + + + + +

canvas-filter-sequence-conversion

+

Test converting types into sequences

+ + +

Actual output:

+

FAIL (fallback content)

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/image-smoothing/imagesmoothing.html b/testing/web-platform/tests/html/canvas/element/manual/image-smoothing/imagesmoothing.html new file mode 100644 index 0000000000..1a86a8f201 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/image-smoothing/imagesmoothing.html @@ -0,0 +1,119 @@ + + +CanvasRenderingContext2D imageSmoothingEnabled test + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/canvas-ImageBitmap-close.html b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/canvas-ImageBitmap-close.html new file mode 100644 index 0000000000..fca8274528 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/canvas-ImageBitmap-close.html @@ -0,0 +1,89 @@ + + +

Tests that the close method of ImageBitmap does dispose the image data.

+ + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/canvas-createImageBitmap-resize.html b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/canvas-createImageBitmap-resize.html new file mode 100644 index 0000000000..782c7e130c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/canvas-createImageBitmap-resize.html @@ -0,0 +1,170 @@ + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/canvas-createImageBitmap-video-resize.html b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/canvas-createImageBitmap-video-resize.html new file mode 100644 index 0000000000..d48d9e80ca --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/canvas-createImageBitmap-video-resize.html @@ -0,0 +1,62 @@ + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/common.sub.js b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/common.sub.js new file mode 100644 index 0000000000..1889035202 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/common.sub.js @@ -0,0 +1,168 @@ +function makeCanvas() { + return new Promise(resolve => { + var testCanvas = document.createElement("canvas"); + testCanvas.width = 20; + testCanvas.height = 20; + var testCtx = testCanvas.getContext("2d"); + testCtx.fillStyle = "rgb(255, 0, 0)"; + testCtx.fillRect(0, 0, 10, 10); + testCtx.fillStyle = "rgb(0, 255, 0)"; + testCtx.fillRect(10, 0, 10, 10); + testCtx.fillStyle = "rgb(0, 0, 255)"; + testCtx.fillRect(0, 10, 10, 10); + testCtx.fillStyle = "rgb(0, 0, 0)"; + testCtx.fillRect(10, 10, 10, 10); + resolve(testCanvas); + }); +} + +function makeOffscreenCanvas() { + return new Promise(resolve => { + let canvas = new OffscreenCanvas(20, 20); + var testCtx = canvas.getContext("2d"); + testCtx.fillStyle = "rgb(255, 0, 0)"; + testCtx.fillRect(0, 0, 10, 10); + testCtx.fillStyle = "rgb(0, 255, 0)"; + testCtx.fillRect(10, 0, 10, 10); + testCtx.fillStyle = "rgb(0, 0, 255)"; + testCtx.fillRect(0, 10, 10, 10); + testCtx.fillStyle = "rgb(0, 0, 0)"; + testCtx.fillRect(10, 10, 10, 10); + resolve(canvas); + }); +} + +var imageBitmapVideoPromise = new Promise(function(resolve, reject) { + var video = document.createElement("video"); + video.oncanplaythrough = function() { + resolve(video); + }; + video.onerror = reject; + + // preload=auto is required to ensure a frame is available once + // canplaythrough is fired. The default of preload=metadata does not + // gaurantee this. + video.preload = "auto"; + video.src = getVideoURI("/images/pattern"); + + // Prevent WebKit from garbage collecting event handlers. + window._video = video; +}); + +function makeVideo() { + return imageBitmapVideoPromise; +} + +var imageBitmapDataUrlVideoPromise = fetch(getVideoURI("/images/pattern")) + .then(response => Promise.all([response.headers.get("Content-Type"), response.arrayBuffer()])) + .then(([type, data]) => { + return new Promise(function(resolve, reject) { + var video = document.createElement("video"); + video.oncanplaythrough = function() { + resolve(video); + }; + video.onerror = reject; + + var encoded = btoa(String.fromCodePoint(...new Uint8Array(data))); + var dataUrl = `data:${type};base64,${encoded}`; + + // preload=auto is required to ensure a frame is available once + // canplaythrough is fired. The default of preload=metadata does not + // gaurantee this. + video.preload = "auto"; + video.src = dataUrl; + + // Prevent WebKit from garbage collecting event handlers. + window._dataVideo = video; + }); + }); + +function makeDataUrlVideo() { + return imageBitmapDataUrlVideoPromise; +} + +function makeMakeHTMLImage(src) { + return function() { + return new Promise((resolve, reject) => { + var img = new Image(); + img.onload = function() { + resolve(img); + }; + img.onerror = reject; + img.src = src; + }); + } +} + +function makeMakeSVGImage(src) { + return function() { + return new Promise((resolve, reject) => { + var image = document.createElementNS("http://www.w3.org/2000/svg", "image"); + image.onload = () => resolve(image); + image.onerror = reject; + image.setAttribute("externalResourcesRequired", "true"); + image.setAttributeNS("http://www.w3.org/1999/xlink", 'xlink:href', src); + document.body.appendChild(image); + }); + } +} + +function makeImageData() { + return new Promise(function(resolve, reject) { + var width = 20, height = 20; + var imgData = new ImageData(width, height); + for (var i = 0; i < width * height * 4; i += 4) { + imgData.data[i] = 0; + imgData.data[i + 1] = 0; + imgData.data[i + 2] = 0; + imgData.data[i + 3] = 255; //alpha channel: 255 + } + var halfWidth = width / 2; + var halfHeight = height / 2; + // initialize to R, G, B, Black, with each one 10*10 pixels + for (var i = 0; i < halfHeight; i++) + for (var j = 0; j < halfWidth; j++) + imgData.data[i * width * 4 + j * 4] = 255; + for (var i = 0; i < halfHeight; i++) + for (var j = halfWidth; j < width; j++) + imgData.data[i * width * 4 + j * 4 + 1] = 255; + for (var i = halfHeight; i < height; i++) + for (var j = 0; j < halfWidth; j++) + imgData.data[i * width * 4 + j * 4 + 2] = 255; + resolve(imgData); + }); +} + +function makeImageBitmap() { + return makeCanvas().then(canvas => { + return createImageBitmap(canvas); + }); +} + +function makeBlob(src) { + return function () { + return new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", src); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + } +} + +var imageSourceTypes = [ + { name: 'an HTMLCanvasElement', factory: makeCanvas }, + { name: 'an HTMLVideoElement', factory: makeVideo }, + { name: 'an HTMLVideoElement from a data URL', factory: makeDataUrlVideo }, + { name: 'a bitmap HTMLImageElement', factory: makeMakeHTMLImage("/images/pattern.png") }, + { name: 'a vector HTMLImageElement', factory: makeMakeHTMLImage("/images/pattern.svg") }, + { name: 'a bitmap SVGImageElement', factory: makeMakeSVGImage("/images/pattern.png") }, + { name: 'a vector SVGImageElement', factory: makeMakeSVGImage("/images/pattern.svg") }, + { name: 'an OffscreenCanvas', factory: makeOffscreenCanvas }, + { name: 'an ImageData', factory: makeImageData }, + { name: 'an ImageBitmap', factory: makeImageBitmap }, + { name: 'a Blob', factory: makeBlob("/images/pattern.png") }, +]; diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-blob-invalidtype.html b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-blob-invalidtype.html new file mode 100644 index 0000000000..23af96408a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-blob-invalidtype.html @@ -0,0 +1,27 @@ + + +createImageBitmap: blob with wrong mime type + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-bounds.html b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-bounds.html new file mode 100644 index 0000000000..a2dcf0cc0b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-bounds.html @@ -0,0 +1,67 @@ + + +createImageBitmap: clipping to the bitmap + + + +
+ diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-colorSpaceConversion.html b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-colorSpaceConversion.html new file mode 100644 index 0000000000..2ddf3648f5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-colorSpaceConversion.html @@ -0,0 +1,50 @@ + + +Test colorSpaceConversion option for createImageBitmap + + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-drawImage-closed.html b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-drawImage-closed.html new file mode 100644 index 0000000000..3b8644cff5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-drawImage-closed.html @@ -0,0 +1,27 @@ + + +attempt to draw a closed ImageBitmap to a 2d canvas throws INVALID_STATE_ERR + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-drawImage.html b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-drawImage.html new file mode 100644 index 0000000000..5b5698813a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-drawImage.html @@ -0,0 +1,87 @@ + + +createImageBitmap + drawImage test + + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-exif-orientation.html b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-exif-orientation.html new file mode 100644 index 0000000000..8b2a33e85b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-exif-orientation.html @@ -0,0 +1,121 @@ + +Test that createImageBitmap honors EXIF orientation + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-exif-orientation_none.html b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-exif-orientation_none.html new file mode 100644 index 0000000000..807925b88a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-exif-orientation_none.html @@ -0,0 +1,61 @@ + +Test that createImageBitmap honors EXIF orientation + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-flipY.html b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-flipY.html new file mode 100644 index 0000000000..9b0d2dfb79 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-flipY.html @@ -0,0 +1,73 @@ + + +createImageBitmap + drawImage test + + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-in-worker-transfer.html b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-in-worker-transfer.html new file mode 100644 index 0000000000..727a8a4978 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-in-worker-transfer.html @@ -0,0 +1,20 @@ + + +createImageBitmap in worker and transfer + + +
+ diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-invalid-args.html b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-invalid-args.html new file mode 100644 index 0000000000..3cae3523ef --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-invalid-args.html @@ -0,0 +1,239 @@ + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-origin.sub.html b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-origin.sub.html new file mode 100644 index 0000000000..ae3d23cfbc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-origin.sub.html @@ -0,0 +1,47 @@ + + +createImageBitmap: origin-clean flag + + + + + +
+ diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-serializable.html b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-serializable.html new file mode 100644 index 0000000000..c185cd9cbd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-serializable.html @@ -0,0 +1,52 @@ + + +createImageBitmap serialize test + + + + + + +
+ diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-sizeOverflow.html b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-sizeOverflow.html new file mode 100644 index 0000000000..25c1fb6885 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-sizeOverflow.html @@ -0,0 +1,52 @@ + + +createImageBitmap with size overflow + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-transfer.html b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-transfer.html new file mode 100644 index 0000000000..3ec02fcbf4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-transfer.html @@ -0,0 +1,53 @@ + + +createImageBitmap transferring test + + + + + +
+ diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-worker.js b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-worker.js new file mode 100644 index 0000000000..67a0904e47 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-worker.js @@ -0,0 +1,17 @@ +function makeBlob() { + return new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/pattern.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); +} + +addEventListener("message", () => { + makeBlob().then(createImageBitmap).then(bitmap => { + postMessage(bitmap, [bitmap]); + }); +}); diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmap-from-imageData-no-image-rotation-expected.html b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmap-from-imageData-no-image-rotation-expected.html new file mode 100644 index 0000000000..64b1791afe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmap-from-imageData-no-image-rotation-expected.html @@ -0,0 +1,18 @@ + + + +> + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmap-from-imageData-no-image-rotation.html b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmap-from-imageData-no-image-rotation.html new file mode 100644 index 0000000000..e93c17c8e8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmap-from-imageData-no-image-rotation.html @@ -0,0 +1,26 @@ + + + + + +> + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmapRendering-transferFromImageBitmap-expected.html b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmapRendering-transferFromImageBitmap-expected.html new file mode 100644 index 0000000000..bababda44c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmapRendering-transferFromImageBitmap-expected.html @@ -0,0 +1,27 @@ + + +

Test whether the imageOrientation "from-image" works when creating an ImageBitmap from the ImageData of a canvas, and then transfered to an ImageBitmapRenderingContext.

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmapRendering-transferFromImageBitmap-flipped-expected.html b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmapRendering-transferFromImageBitmap-flipped-expected.html new file mode 100644 index 0000000000..5e21671973 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmapRendering-transferFromImageBitmap-flipped-expected.html @@ -0,0 +1,27 @@ + + +

Test whether the imageOrientation "flipY" works when creating an ImageBitmap from the ImageData of a canvas, and then transfered to an ImageBitmapRenderingContext.

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmapRendering-transferFromImageBitmap-flipped.html b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmapRendering-transferFromImageBitmap-flipped.html new file mode 100644 index 0000000000..02e0690876 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmapRendering-transferFromImageBitmap-flipped.html @@ -0,0 +1,34 @@ + + + +

Test whether the imageOrientation "flipY" works when creating an ImageBitmap from the ImageData of a canvas, and then transfered to an ImageBitmapRenderingContext.

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmapRendering-transferFromImageBitmap-webgl-expected.html b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmapRendering-transferFromImageBitmap-webgl-expected.html new file mode 100644 index 0000000000..4f155316f0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmapRendering-transferFromImageBitmap-webgl-expected.html @@ -0,0 +1,35 @@ + + + +

+ Test creating an ImageBitmap from the transferToImageBitmap of a webgl OffscreenCanvas, and then + transferred to an ImageBitmapRenderingContext. +

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmapRendering-transferFromImageBitmap-webgl.html b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmapRendering-transferFromImageBitmap-webgl.html new file mode 100644 index 0000000000..049a3822cd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmapRendering-transferFromImageBitmap-webgl.html @@ -0,0 +1,38 @@ + + + + +

+ Test creating an ImageBitmap from the transferToImageBitmap of a webgl OffscreenCanvas, and then + transferred to an ImageBitmapRenderingContext. +

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmapRendering-transferFromImageBitmap.html b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmapRendering-transferFromImageBitmap.html new file mode 100644 index 0000000000..6d3d886759 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmapRendering-transferFromImageBitmap.html @@ -0,0 +1,34 @@ + + + +

Test whether the imageOrientation "from-image" works when creating an ImageBitmap from the ImageData of a canvas, and then transfered to an ImageBitmapRenderingContext.

+ + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imagebitmap-replication-exif-orientation.html b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imagebitmap-replication-exif-orientation.html new file mode 100644 index 0000000000..ab4331adef --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imagebitmap-replication-exif-orientation.html @@ -0,0 +1,146 @@ + + + + +Verify that image orientation is propagated when ImageBitmap objects are replicated. + + + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_1.jpg b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_1.jpg new file mode 100644 index 0000000000..0f0e8866b4 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_1.jpg differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_2.jpg b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_2.jpg new file mode 100644 index 0000000000..526f7a6c82 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_2.jpg differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_3.jpg b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_3.jpg new file mode 100644 index 0000000000..a21e521c2d Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_3.jpg differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_4.jpg b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_4.jpg new file mode 100644 index 0000000000..c4380b1e67 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_4.jpg differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_5.jpg b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_5.jpg new file mode 100644 index 0000000000..0bdd89aa1b Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_5.jpg differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_6.jpg b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_6.jpg new file mode 100644 index 0000000000..f197760a11 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_6.jpg differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_7.jpg b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_7.jpg new file mode 100644 index 0000000000..9b1a346888 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_7.jpg differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_8.jpg b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_8.jpg new file mode 100644 index 0000000000..41d2fbe7f0 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/resources/squares_8.jpg differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/serialize-worker.js b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/serialize-worker.js new file mode 100644 index 0000000000..a76537cc9e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/serialize-worker.js @@ -0,0 +1,3 @@ +addEventListener('message', evt => { + postMessage(evt.data); +}); diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/transfer-worker.js b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/transfer-worker.js new file mode 100644 index 0000000000..55465a899c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/transfer-worker.js @@ -0,0 +1,3 @@ +addEventListener('message', evt => { + postMessage(evt.data, [evt.data.bitmap]); +}); diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/worker-onmessage-noop.js b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/worker-onmessage-noop.js new file mode 100644 index 0000000000..c0a352b4d9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/worker-onmessage-noop.js @@ -0,0 +1,3 @@ +self.onmessage = function(e) { +}; + diff --git a/testing/web-platform/tests/html/canvas/element/manual/layers/unclosed-layers-expected.html b/testing/web-platform/tests/html/canvas/element/manual/layers/unclosed-layers-expected.html new file mode 100644 index 0000000000..873869ea72 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/layers/unclosed-layers-expected.html @@ -0,0 +1,14 @@ + +Canvas test: unclosed-layers +

unclosed-layers

+

Check that unclosed layers aren't rendered.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/manual/layers/unclosed-layers.html b/testing/web-platform/tests/html/canvas/element/manual/layers/unclosed-layers.html new file mode 100644 index 0000000000..afb53cfbeb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/layers/unclosed-layers.html @@ -0,0 +1,20 @@ + + +Canvas test: unclosed-layers +

unclosed-layers

+

Check that unclosed layers aren't rendered.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/manual/layers/unclosed-nested-layers-expected.html b/testing/web-platform/tests/html/canvas/element/manual/layers/unclosed-nested-layers-expected.html new file mode 100644 index 0000000000..8557441f7e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/layers/unclosed-nested-layers-expected.html @@ -0,0 +1,14 @@ + +Canvas test: unclosed-nested-layers +

unclosed-nested-layers

+

Check that unclosed nested layers aren't rendered.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/manual/layers/unclosed-nested-layers.html b/testing/web-platform/tests/html/canvas/element/manual/layers/unclosed-nested-layers.html new file mode 100644 index 0000000000..ada874a51a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/layers/unclosed-nested-layers.html @@ -0,0 +1,26 @@ + + +Canvas test: unclosed-nested-layers +

unclosed-nested-layers

+

Check that unclosed nested layers aren't rendered.

+ +

FAIL (fallback content)

+
+ diff --git a/testing/web-platform/tests/html/canvas/element/manual/line-styles/canvas_linestyles_linecap_001-ref.htm b/testing/web-platform/tests/html/canvas/element/manual/line-styles/canvas_linestyles_linecap_001-ref.htm new file mode 100644 index 0000000000..f85af9aab2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/line-styles/canvas_linestyles_linecap_001-ref.htm @@ -0,0 +1,11 @@ + + + + HTML5 Canvas Test: "square" lineCap + + + +

Description: The square value of lineCap means that a rectangle with the length of the line width and the width of half the line width, placed flat against the edge perpendicular to the direction of the line, must be added at the end of each line.

+
black rect
+ + diff --git a/testing/web-platform/tests/html/canvas/element/manual/line-styles/canvas_linestyles_linecap_001.htm b/testing/web-platform/tests/html/canvas/element/manual/line-styles/canvas_linestyles_linecap_001.htm new file mode 100644 index 0000000000..583dbc9d13 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/line-styles/canvas_linestyles_linecap_001.htm @@ -0,0 +1,37 @@ + + + + HTML5 Canvas Test: "square" lineCap + + + + + + + +

Description: The square value of lineCap means that a rectangle with the length of the line width and the width of half the line width, placed flat against the edge perpendicular to the direction of the line, must be added at the end of each line.

+ Browser does not support HTML5 Canvas. + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/line-styles/lineto_a.html b/testing/web-platform/tests/html/canvas/element/manual/line-styles/lineto_a.html new file mode 100644 index 0000000000..7e692f937d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/line-styles/lineto_a.html @@ -0,0 +1,26 @@ + + + + + +Your browser does not support the HTML5 canvas tag. + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/line-styles/lineto_ref.html b/testing/web-platform/tests/html/canvas/element/manual/line-styles/lineto_ref.html new file mode 100644 index 0000000000..3dc78ff804 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/line-styles/lineto_ref.html @@ -0,0 +1,15 @@ + + + +
diff --git a/testing/web-platform/tests/html/canvas/element/manual/line-styles/setLineDash.html b/testing/web-platform/tests/html/canvas/element/manual/line-styles/setLineDash.html new file mode 100644 index 0000000000..6b8d131da4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/line-styles/setLineDash.html @@ -0,0 +1,104 @@ + + +setLineDash + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/shadows/canvas_shadows_001.htm b/testing/web-platform/tests/html/canvas/element/manual/shadows/canvas_shadows_001.htm new file mode 100644 index 0000000000..1763950d61 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/shadows/canvas_shadows_001.htm @@ -0,0 +1,60 @@ + + + + HTML5 Canvas Test: Shadows for linear gradients + + + + + + + + +

Description: Shadows must be drawn for linear gradients.

+

Test passes if there is one gradient filled rectangle and one black rectangle, and no red seen on the page.

+ Browser does not support HTML5 Canvas. + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/shadows/canvas_shadows_002-ref.htm b/testing/web-platform/tests/html/canvas/element/manual/shadows/canvas_shadows_002-ref.htm new file mode 100644 index 0000000000..0658be808e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/shadows/canvas_shadows_002-ref.htm @@ -0,0 +1,27 @@ + + + + HTML5 Canvas Test: Shadows for images + + + + + + + +

Description: Shadows must be drawn for images.

+

Test passes if two black rectangles are shown and there is no red visible on the page.

+ Browser does not support HTML5 Canvas. + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/shadows/canvas_shadows_002.htm b/testing/web-platform/tests/html/canvas/element/manual/shadows/canvas_shadows_002.htm new file mode 100644 index 0000000000..908fffea13 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/shadows/canvas_shadows_002.htm @@ -0,0 +1,34 @@ + + + + HTML5 Canvas Test: Shadows for images + + + + + + + +

Description: Shadows must be drawn for images.

+

Test passes if two black rectangles are shown and there is no red visible on the page.

+ Browser does not support HTML5 Canvas. + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/shadows/canvas_shadows_system_colors-expected.html b/testing/web-platform/tests/html/canvas/element/manual/shadows/canvas_shadows_system_colors-expected.html new file mode 100644 index 0000000000..e568aa9a5c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/shadows/canvas_shadows_system_colors-expected.html @@ -0,0 +1,11 @@ + + + + + System Colors work for Canvas Drop-Shadow Filters + + +
+
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/manual/shadows/canvas_shadows_system_colors.html b/testing/web-platform/tests/html/canvas/element/manual/shadows/canvas_shadows_system_colors.html new file mode 100644 index 0000000000..42978fb18f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/shadows/canvas_shadows_system_colors.html @@ -0,0 +1,19 @@ + + + + + System Colors work for Canvas Drop-Shadow Filters + + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/manual/shadows/shadowBlur_gaussian_tolerance.1.html b/testing/web-platform/tests/html/canvas/element/manual/shadows/shadowBlur_gaussian_tolerance.1.html new file mode 100644 index 0000000000..eec27bf108 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/shadows/shadowBlur_gaussian_tolerance.1.html @@ -0,0 +1,191 @@ + +Test of canvas shadowBlur Gaussian blur pixel values + + + + +

Test of canvas shadowBlur Gaussian blur pixel values

+ diff --git a/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.disconnected-ref.html b/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.disconnected-ref.html new file mode 100644 index 0000000000..b36d29b97f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.disconnected-ref.html @@ -0,0 +1,16 @@ + + +HTML Canvas reference + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.disconnected.html b/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.disconnected.html new file mode 100644 index 0000000000..a1715f6663 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.disconnected.html @@ -0,0 +1,24 @@ + + +HTML Canvas testcase: canvas element not in document + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch-ref.html b/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch-ref.html new file mode 100644 index 0000000000..00ecdccad3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch-ref.html @@ -0,0 +1,19 @@ + +Canvas test: 2d.text.fontStretch +

FAIL (fallback content)

+ \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.condensed.html b/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.condensed.html new file mode 100644 index 0000000000..72db41f007 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.condensed.html @@ -0,0 +1,27 @@ + +Canvas test: 2d.text.fontStretch + +

FAIL (fallback content)

+ \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.expanded.html b/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.expanded.html new file mode 100644 index 0000000000..8a13ba13fc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.expanded.html @@ -0,0 +1,27 @@ + +Canvas test: 2d.text.fontStretch + +

FAIL (fallback content)

+ \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.extra-condensed.html b/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.extra-condensed.html new file mode 100644 index 0000000000..afa910f62c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.extra-condensed.html @@ -0,0 +1,27 @@ + +Canvas test: 2d.text.fontStretch + +

FAIL (fallback content)

+ \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.extra-expanded.html b/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.extra-expanded.html new file mode 100644 index 0000000000..d10d4d9312 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.extra-expanded.html @@ -0,0 +1,27 @@ + +Canvas test: 2d.text.fontStretch + +

FAIL (fallback content)

+ \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.normal.html b/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.normal.html new file mode 100644 index 0000000000..e8fd66acad --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.normal.html @@ -0,0 +1,30 @@ + +Canvas test: 2d.text.fontStretch + +

FAIL (fallback content)

+ \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.semi-condensed.html b/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.semi-condensed.html new file mode 100644 index 0000000000..2ac9719595 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.semi-condensed.html @@ -0,0 +1,27 @@ + +Canvas test: 2d.text.fontStretch + +

FAIL (fallback content)

+ \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.semi-expanded.html b/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.semi-expanded.html new file mode 100644 index 0000000000..3c9fa27894 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.semi-expanded.html @@ -0,0 +1,27 @@ + +Canvas test: 2d.text.fontStretch + +

FAIL (fallback content)

+ \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.ultra-condensed.html b/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.ultra-condensed.html new file mode 100644 index 0000000000..2b0426e976 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.ultra-condensed.html @@ -0,0 +1,27 @@ + +Canvas test: 2d.text.fontStretch + +

FAIL (fallback content)

+ \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.ultra-expanded.html b/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.ultra-expanded.html new file mode 100644 index 0000000000..5b4979de86 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/text/canvas.2d.fontStretch.ultra-expanded.html @@ -0,0 +1,27 @@ + +Canvas test: 2d.text.fontStretch + +

FAIL (fallback content)

+ \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/manual/text/canvas_text_font_001-ref.htm b/testing/web-platform/tests/html/canvas/element/manual/text/canvas_text_font_001-ref.htm new file mode 100644 index 0000000000..1a19757e00 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/text/canvas_text_font_001-ref.htm @@ -0,0 +1,22 @@ + + + + HTML5 Canvas Test: Ignore property-independent style sheet syntax "inherit" in Text (reference) + + + +

Description: Ignore "inherit" property-independent style sheet syntax without assigning a new font value.

+

Test passes if there are two identical black boxes below.

+ Browser does not support HTML5 Canvas. + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/text/canvas_text_font_001.htm b/testing/web-platform/tests/html/canvas/element/manual/text/canvas_text_font_001.htm new file mode 100644 index 0000000000..923ce71c07 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/text/canvas_text_font_001.htm @@ -0,0 +1,33 @@ + + + + HTML5 Canvas Test: Ignore property-independent style sheet syntax "inherit" in Text + + + + + + + +

Description: Ignore "inherit" property-independent style sheet syntax without assigning a new font value.

+

Test passes if there are two identical black boxes below.

+ Browser does not support HTML5 Canvas. + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/the-canvas-state/2d.state.saverestore.imageSmoothingEnabled.html b/testing/web-platform/tests/html/canvas/element/manual/the-canvas-state/2d.state.saverestore.imageSmoothingEnabled.html new file mode 100644 index 0000000000..e99be83d5f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/the-canvas-state/2d.state.saverestore.imageSmoothingEnabled.html @@ -0,0 +1,47 @@ + + +CanvasRenderingContext2D imageSmoothingEnabled save/restore test + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/the-canvas-state/2d.zero.size.canvas.html b/testing/web-platform/tests/html/canvas/element/manual/the-canvas-state/2d.zero.size.canvas.html new file mode 100644 index 0000000000..273e5c7484 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/the-canvas-state/2d.zero.size.canvas.html @@ -0,0 +1,16 @@ + + + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/the-canvas-state/canvas_state_restore_001-ref.htm b/testing/web-platform/tests/html/canvas/element/manual/the-canvas-state/canvas_state_restore_001-ref.htm new file mode 100644 index 0000000000..aee610d2ec --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/the-canvas-state/canvas_state_restore_001-ref.htm @@ -0,0 +1,11 @@ + + + + HTML5 Canvas Test: restore() pops top entry in drawing state stack + + + +

Description: restore() pops the top entry in the drawing state stack.

+
3 colors
+ + diff --git a/testing/web-platform/tests/html/canvas/element/manual/the-canvas-state/canvas_state_restore_001.htm b/testing/web-platform/tests/html/canvas/element/manual/the-canvas-state/canvas_state_restore_001.htm new file mode 100644 index 0000000000..6d5a3cb20f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/the-canvas-state/canvas_state_restore_001.htm @@ -0,0 +1,42 @@ + + + + HTML5 Canvas Test: restore() pops top entry in drawing state stack + + + + + + + +

Description: restore() pops the top entry in the drawing state stack.

+ Browser does not support HTML5 Canvas. + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/transformations/2d.transformation.getTransform.html b/testing/web-platform/tests/html/canvas/element/manual/transformations/2d.transformation.getTransform.html new file mode 100644 index 0000000000..664efd50e6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/transformations/2d.transformation.getTransform.html @@ -0,0 +1,39 @@ + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/transformations/canvas_transformations_reset_001-ref.html b/testing/web-platform/tests/html/canvas/element/manual/transformations/canvas_transformations_reset_001-ref.html new file mode 100644 index 0000000000..caeea04cef --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/transformations/canvas_transformations_reset_001-ref.html @@ -0,0 +1,21 @@ + + + + + +
+
+
+ + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/transformations/canvas_transformations_reset_001.html b/testing/web-platform/tests/html/canvas/element/manual/transformations/canvas_transformations_reset_001.html new file mode 100644 index 0000000000..c12acbf6f3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/transformations/canvas_transformations_reset_001.html @@ -0,0 +1,22 @@ + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/transformations/canvas_transformations_scale_001-ref.htm b/testing/web-platform/tests/html/canvas/element/manual/transformations/canvas_transformations_scale_001-ref.htm new file mode 100644 index 0000000000..1201bcca9f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/transformations/canvas_transformations_scale_001-ref.htm @@ -0,0 +1,11 @@ + + + + HTML5 Canvas Test: scale() transformation + + + +

Description: The scale(x, y) method must add the scaling transformation described by the arguments to the transformation matrix.

+
black rectangle
+ + diff --git a/testing/web-platform/tests/html/canvas/element/manual/transformations/canvas_transformations_scale_001.htm b/testing/web-platform/tests/html/canvas/element/manual/transformations/canvas_transformations_scale_001.htm new file mode 100644 index 0000000000..73f71351ea --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/transformations/canvas_transformations_scale_001.htm @@ -0,0 +1,31 @@ + + + + + HTML5 Canvas Test: scale() transformation + + + + + + + +

Description: The scale(x, y) method must add the scaling transformation described by the arguments to the transformation matrix.

+ Browser does not support HTML5 Canvas. + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/transformations/transform_a.html b/testing/web-platform/tests/html/canvas/element/manual/transformations/transform_a.html new file mode 100644 index 0000000000..8c1f59efda --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/transformations/transform_a.html @@ -0,0 +1,22 @@ + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/transformations/transform_ref.html b/testing/web-platform/tests/html/canvas/element/manual/transformations/transform_ref.html new file mode 100644 index 0000000000..2a166c36ce --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/transformations/transform_ref.html @@ -0,0 +1,16 @@ + + + +
diff --git a/testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-1-expected.htm b/testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-1-expected.htm new file mode 100644 index 0000000000..3272f32fb8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-1-expected.htm @@ -0,0 +1,10 @@ + + + + unclosed canvas tag in body + + +

There should be no text below this, because the text is inside a canvas element. + The canvas is never closed, and the rest of the body ends up inside it.

+ + diff --git a/testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-1.htm b/testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-1.htm new file mode 100644 index 0000000000..5e0c914755 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-1.htm @@ -0,0 +1,14 @@ + + + + unclosed canvas tag in body + + + + + +

There should be no text below this, because the text is inside a canvas element. + The canvas is never closed, and the rest of the body ends up inside it.

+ This text should NOT be visible if JavaScript is enabled. + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-2-expected.htm b/testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-2-expected.htm new file mode 100644 index 0000000000..fd48cd0db1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-2-expected.htm @@ -0,0 +1,14 @@ + + + + unclosed canvas tag in body + + +
+

This text should be visible, even though it's preceded by an unclosed canvas tag, + because of the </div> that closes an element opened before the canvas. + There's nothing special about div; we get the same results with other types of + elements. +

+ + diff --git a/testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-2.htm b/testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-2.htm new file mode 100644 index 0000000000..fb329e73d6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-2.htm @@ -0,0 +1,15 @@ + + + + unclosed canvas tag in body + + + + + +
+

This text should be visible, even though it's preceded by an unclosed canvas tag, + because of the </div> that closes an element opened before the canvas. + There's nothing special about div; we get the same results with other types of elements.

+ + diff --git a/testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-3-expected.htm b/testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-3-expected.htm new file mode 100644 index 0000000000..efd239b4fb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-3-expected.htm @@ -0,0 +1,13 @@ + + + + unclosed canvas tag in body + + +

There should be no text below this, because the text is inside a canvas element + and the </div> that's also inside the canvas element does not close an open + element. The canvas is never closed, and the rest of the body ends up inside it. + There's nothing special about div; we get the same results with other types of + elements.

+ + diff --git a/testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-3.htm b/testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-3.htm new file mode 100644 index 0000000000..8ffaa0f9eb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-3.htm @@ -0,0 +1,16 @@ + + + + unclosed canvas tag in body + + + + + +

There should be no text below this, because the text is inside a canvas element + and the </div> that's also inside the canvas element does not close an open element. + The canvas is never closed, and the rest of the body ends up inside it. + There's nothing special about div; we get the same results with other types of elements.

+ This text should NOT be visible if JavaScript is enabled. + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-4-expected.htm b/testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-4-expected.htm new file mode 100644 index 0000000000..492449261e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-4-expected.htm @@ -0,0 +1,14 @@ + + + + unclosed canvas tag in body + + +

There should be no text below this, because the text is inside a canvas element + and the </div> that's also inside the canvas element does not close an open + element. The canvas is never closed, and the rest of the body ends up inside it. + There's nothing special about div; we get the same results with other types of + elements. The fact that the canvas tag uses XML self-closing syntax has no effect. +

+ + diff --git a/testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-4.htm b/testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-4.htm new file mode 100644 index 0000000000..aa5fd14438 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/unclosed-canvas-4.htm @@ -0,0 +1,17 @@ + + + + unclosed canvas tag in body + + + + + +

There should be no text below this, because the text is inside a canvas element + and the </div> that's also inside the canvas element does not close an open element. + The canvas is never closed, and the rest of the body ends up inside it. + There's nothing special about div; we get the same results with other types of elements. + The fact that the canvas tag uses XML self-closing syntax has no effect.

+ This text should NOT be visible if JavaScript is enabled. + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/ImageData-fidelity.html b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/ImageData-fidelity.html new file mode 100644 index 0000000000..c2d158f893 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/ImageData-fidelity.html @@ -0,0 +1,126 @@ + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-Blob.html b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-Blob.html new file mode 100644 index 0000000000..9b96b1a6d2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-Blob.html @@ -0,0 +1,35 @@ + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-ImageBitmap.html b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-ImageBitmap.html new file mode 100644 index 0000000000..0bd18e9beb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-ImageBitmap.html @@ -0,0 +1,47 @@ + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-ImageData.html b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-ImageData.html new file mode 100644 index 0000000000..2216b46dd8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-ImageData.html @@ -0,0 +1,46 @@ + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-canvas.html b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-canvas.html new file mode 100644 index 0000000000..f3156349ed --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-canvas.html @@ -0,0 +1,53 @@ + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-cloned.html b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-cloned.html new file mode 100644 index 0000000000..cf4f38f8db --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-cloned.html @@ -0,0 +1,70 @@ + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-image.html b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-image.html new file mode 100644 index 0000000000..e7e85c915d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-image.html @@ -0,0 +1,44 @@ + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-video.html b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-video.html new file mode 100644 index 0000000000..3e86bb5596 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-video.html @@ -0,0 +1,57 @@ + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-video.html b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-video.html new file mode 100644 index 0000000000..1b04cde779 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-video.html @@ -0,0 +1,52 @@ + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage.https.html b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage.https.html new file mode 100644 index 0000000000..35ee91343d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage.https.html @@ -0,0 +1,41 @@ + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-canvas.html b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-canvas.html new file mode 100644 index 0000000000..2b9fb9b8f4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-canvas.html @@ -0,0 +1,44 @@ + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-image.html b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-image.html new file mode 100644 index 0000000000..75a8392c02 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-image.html @@ -0,0 +1,37 @@ + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-settings.html b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-settings.html new file mode 100644 index 0000000000..2b1447437d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-settings.html @@ -0,0 +1,36 @@ + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3.js b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3.js new file mode 100644 index 0000000000..c6ee97b788 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3.js @@ -0,0 +1,283 @@ +// Each PNG: +// * is 2x2 and has a single color +// * has a filename that indicates its contents: +// -<8-or-16-bit-color-value>.png +// * was generated using ImageMagick commands like: +// convert -size 2x2 xc:'#BB0000FF' -profile Display-P3.icc Display-P3-BB0000FF.png +// convert -size 2x2 xc:'#BBBC00000000FFFF' -profile Adobe-RGB.icc Adobe-RGB-BBBC00000000FFFF.png + +// Top level key is the image filename. Second level key is the pair of +// CanvasRenderingContext2DSettings.colorSpace and ImageDataSettings.colorSpace. +const imageTests = { + // 8 bit source images + + "sRGB-FF0000FF.png": { + "srgb srgb": [255, 0, 0, 255], + "srgb display-p3": [234, 51, 35, 255], + "display-p3 srgb": [255, 0, 0, 255], + "display-p3 display-p3": [234, 51, 35, 255], + }, + "sRGB-FF0000CC.png": { + "srgb srgb": [255, 0, 0, 204], + "srgb display-p3": [234, 51, 35, 204], + "display-p3 srgb": [255, 0, 0, 204], + "display-p3 display-p3": [234, 51, 35, 204], + }, + "sRGB-BB0000FF.png": { + "srgb srgb": [187, 0, 0, 255], + "srgb display-p3": [171, 35, 23, 255], + "display-p3 srgb": [187, 1, 0, 255], + "display-p3 display-p3": [171, 35, 23, 255], + }, + "sRGB-BB0000CC.png": { + "srgb srgb": [187, 0, 0, 204], + "srgb display-p3": [171, 35, 23, 204], + "display-p3 srgb": [187, 1, 0, 204], + "display-p3 display-p3": [171, 35, 23, 204], + }, + + "Display-P3-FF0000FF.png": { + "srgb srgb": [255, 0, 0, 255], + "srgb display-p3": [234, 51, 35, 255], + "display-p3 srgb": [255, 0, 0, 255], + "display-p3 display-p3": [255, 0, 0, 255], + }, + "Display-P3-FF0000CC.png": { + "srgb srgb": [255, 0, 0, 204], + "srgb display-p3": [234, 51, 35, 204], + "display-p3 srgb": [255, 0, 0, 204], + "display-p3 display-p3": [255, 0, 0, 204], + }, + "Display-P3-BB0000FF.png": { + "srgb srgb": [205, 0, 0, 255], + "srgb display-p3": [188, 39, 26, 255], + "display-p3 srgb": [205, 0, 0, 255], + "display-p3 display-p3": [187, 0, 0, 255], + }, + "Display-P3-BB0000CC.png": { + "srgb srgb": [205, 0, 0, 204], + "srgb display-p3": [188, 39, 26, 204], + "display-p3 srgb": [205, 0, 0, 204], + "display-p3 display-p3": [187, 0, 0, 204], + }, + + "Adobe-RGB-FF0000FF.png": { + "srgb srgb": [255, 0, 0, 255], + "srgb display-p3": [234, 51, 35, 255], + "display-p3 srgb": [255, 19, 11, 255], + "display-p3 display-p3": [255, 61, 43, 255], + }, + "Adobe-RGB-FF0000CC.png": { + "srgb srgb": [255, 0, 0, 204], + "srgb display-p3": [234, 51, 35, 204], + "display-p3 srgb": [255, 19, 11, 204], + "display-p3 display-p3": [255, 61, 43, 204], + }, + "Adobe-RGB-BB0000FF.png": { + "srgb srgb": [219, 0, 0, 255], + "srgb display-p3": [201, 42, 29, 255], + "display-p3 srgb": [219, 0, 1, 255], + "display-p3 display-p3": [201, 42, 29, 255], + }, + "Adobe-RGB-BB0000CC.png": { + "srgb srgb": [219, 0, 0, 204], + "srgb display-p3": [201, 42, 29, 204], + "display-p3 srgb": [219, 0, 1, 204], + "display-p3 display-p3": [201, 42, 29, 204], + }, + + "Generic-CMYK-FF000000.jpg": { + "srgb srgb": [0, 163, 218, 255], + "srgb display-p3": [72, 161, 213, 255], + "display-p3 srgb": [0, 163, 218, 255], + "display-p3 display-p3": [0, 160, 213, 255], + }, + "Generic-CMYK-BE000000.jpg": { + "srgb srgb": [0, 180, 223, 255], + "srgb display-p3": [80, 177, 219, 255], + "display-p3 srgb": [0, 180, 223, 255], + "display-p3 display-p3": [65, 177, 219, 255], + }, + + // 16 bit source images + + "sRGB-FFFF00000000FFFF.png": { + "srgb srgb": [255, 0, 0, 255], + "srgb display-p3": [234, 51, 35, 255], + "display-p3 srgb": [255, 0, 0, 255], + "display-p3 display-p3": [234, 51, 35, 255], + }, + "sRGB-FFFF00000000CCCC.png": { + "srgb srgb": [255, 0, 0, 204], + "srgb display-p3": [234, 51, 35, 204], + "display-p3 srgb": [255, 0, 0, 204], + "display-p3 display-p3": [234, 51, 35, 204], + }, + "sRGB-BBBC00000000FFFF.png": { + "srgb srgb": [187, 0, 0, 255], + "srgb display-p3": [171, 35, 23, 255], + "display-p3 srgb": [187, 1, 0, 255], + "display-p3 display-p3": [171, 35, 23, 255], + }, + "sRGB-BBBC00000000CCCC.png": { + "srgb srgb": [187, 0, 0, 204], + "srgb display-p3": [171, 35, 23, 204], + "display-p3 srgb": [187, 1, 0, 204], + "display-p3 display-p3": [171, 35, 23, 204], + }, + + "Display-P3-FFFF00000000FFFF.png": { + "srgb srgb": [255, 0, 0, 255], + "srgb display-p3": [234, 51, 35, 255], + "display-p3 srgb": [255, 0, 0, 255], + "display-p3 display-p3": [255, 0, 0, 255], + }, + "Display-P3-FFFF00000000CCCC.png": { + "srgb srgb": [255, 0, 0, 204], + "srgb display-p3": [234, 51, 35, 204], + "display-p3 srgb": [255, 0, 0, 204], + "display-p3 display-p3": [255, 0, 0, 204], + }, + "Display-P3-BBBC00000000FFFF.png": { + "srgb srgb": [205, 0, 0, 255], + "srgb display-p3": [188, 39, 26, 255], + "display-p3 srgb": [205, 0, 0, 255], + "display-p3 display-p3": [187, 0, 0, 255], + }, + "Display-P3-BBBC00000000CCCC.png": { + "srgb srgb": [205, 0, 0, 204], + "srgb display-p3": [188, 39, 26, 204], + "display-p3 srgb": [205, 0, 0, 204], + "display-p3 display-p3": [187, 0, 0, 204], + }, + + "Adobe-RGB-FFFF00000000FFFF.png": { + "srgb srgb": [255, 0, 0, 255], + "srgb display-p3": [234, 51, 35, 255], + "display-p3 srgb": [255, 19, 11, 255], + "display-p3 display-p3": [255, 61, 43, 255], + }, + "Adobe-RGB-FFFF00000000CCCC.png": { + "srgb srgb": [255, 0, 0, 204], + "srgb display-p3": [234, 51, 35, 204], + "display-p3 srgb": [255, 19, 11, 204], + "display-p3 display-p3": [255, 61, 43, 204], + }, + "Adobe-RGB-BBBC00000000FFFF.png": { + "srgb srgb": [219, 0, 0, 255], + "srgb display-p3": [201, 42, 29, 255], + "display-p3 srgb": [219, 0, 1, 255], + "display-p3 display-p3": [201, 42, 29, 255], + }, + "Adobe-RGB-BBBC00000000CCCC.png": { + "srgb srgb": [219, 0, 0, 204], + "srgb display-p3": [201, 42, 29, 204], + "display-p3 srgb": [219, 0, 1, 204], + "display-p3 display-p3": [201, 42, 29, 204], + }, +}; + +const svgImageTests = { + // SVG source images + + "sRGB-FF0000.svg": { + "srgb srgb": [255, 0, 0, 255], + "srgb display-p3": [234, 51, 35, 255], + "display-p3 srgb": [255, 0, 0, 255], + "display-p3 display-p3": [234, 51, 35, 255], + }, + "sRGB-BB0000.svg": { + "srgb srgb": [187, 0, 0, 255], + "srgb display-p3": [171, 35, 23, 255], + "display-p3 srgb": [187, 1, 0, 255], + "display-p3 display-p3": [171, 35, 23, 255], + }, + + "Display-P3-1-0-0.svg": { + "srgb srgb": [255, 0, 0, 255], + "srgb display-p3": [234, 51, 35, 255], + "display-p3 srgb": [255, 0, 0, 255], + "display-p3 display-p3": [255, 0, 0, 255], + }, + "Display-P3-0.7333-0-0.svg": { + "srgb srgb": [205, 0, 0, 255], + "srgb display-p3": [188, 39, 26, 255], + "display-p3 srgb": [205, 0, 0, 255], + "display-p3 display-p3": [187, 0, 0, 255], + }, +}; + +// Each video: +// * is 300x200 and has a single color +// * has a filename base that indicates its contents: +// +// -<8-or-10-bit-color-value> +// +// * was generated using commands like: +// +// W=300 H=200 Y=3F Cb=66 Cr=F0 ; \ +// perl -e "print pack('c', 0x$Y) x ($W * $H), pack('c', 0x$Cb) x ($W * $H / 4), pack('c', 0x$Cr) x ($W * $H / 4)" | \ +// ffmpeg -f rawvideo -pix_fmt yuv420p -s:v ${W}x$H -r 25 -i - -pix_fmt yuv420p -colorspace bt709 -color_primaries bt709 -color_trc iec61966_2_1 sRGB-FF0100.webm +// +// W=300 H=200 Y=0BB Cb=1BD Cr=2EF ; \ +// perl -e "print pack('s', 0x$Y) x ($W * $H), pack('s', 0x$Cb) x ($W * $H / 4), pack('s', 0x$Cr) x ($W * $H / 4)" | \ +// ffmpeg -f rawvideo -pix_fmt yuv420p10le -s:v ${W}x$H -r 25 -i - -c:v libx265 -vtag hvc1 -pix_fmt yuv420p10le -colorspace bt2020nc -color_primaries bt2020 -color_trc bt2020-10 Rec2020-222000000.mp4 +// +// W=300 H=200 Y=0BB Cb=1BD Cr=2EF ; \ +// perl -e "print pack('s', 0x$Y) x ($W * $H), pack('s', 0x$Cb) x ($W * $H / 4), pack('s', 0x$Cr) x ($W * $H / 4)" | \ +// ffmpeg -f rawvideo -pix_fmt yuv420p10le -s:v ${W}x$H -r 25 -i - -vcodec libvpx-vp9 -profile:v 2 -pix_fmt yuv420p10le -colorspace bt2020nc -color_primaries bt2020 -color_trc bt2020-10 Rec2020-222000000.webm +// +// where the Y'CbCr values were computed using https://jdashg.github.io/misc/colors/from-coeffs.html. +const videoTests = { + // Rec.709 Y'CbCr (0x3F, 0x66, 0xF0) = sRGB (0xFF, 0x01, 0x00) + "sRGB-FF0100": { + "srgb srgb": [255, 1, 0, 255], + "srgb display-p3": [234, 51, 35, 255], + "display-p3 srgb": [255, 0, 0, 255], + "display-p3 display-p3": [234, 51, 35, 255], + }, + // Rec.709 Y'CbCr (0x32, 0x6D, 0xD2) = sRGB (0xBB, 0x00, 0x00) + "sRGB-BB0000": { + "srgb srgb": [187, 0, 0, 255], + "srgb display-p3": [171, 35, 23, 255], + "display-p3 srgb": [187, 1, 0, 255], + "display-p3 display-p3": [171, 35, 23, 255], + }, + + // 10 bit Rec.2020 Y'CbCr (0x126, 0x183, 0x3C0) = Rec.2020 (0x3FF, 0x000, 0x000) + "Rec2020-3FF000000": { + "srgb srgb": [255, 0, 0, 255], + "srgb display-p3": [234, 51, 35, 255], + "display-p3 srgb": [255, 0, 0, 255], + "display-p3 display-p3": [255, 0, 9, 255], + }, + // 10 bit Rec.2020 Y'CbCr (0x0BB, 0x1BD, 0x2EF) = Rec.2020 (0x222, 0x000, 0x000) + "Rec2020-222000000": { + "srgb srgb": [186, 0, 0, 255], + "srgb display-p3": [170, 34, 23, 255], + "display-p3 srgb": [186, 0, 0, 255], + "display-p3 display-p3": [169, 0, 3, 255], + }, +}; + +const fromSRGBToDisplayP3 = { + "255,0,0,255": [234, 51, 35, 255], + "255,0,0,204": [234, 51, 35, 204], + "187,0,0,255": [171, 35, 23, 255], + "187,0,0,204": [171, 35, 23, 204], +}; + +const fromDisplayP3ToSRGB = { + "255,0,0,255": [255, 0, 0, 255], + "255,0,0,204": [255, 0, 0, 204], + "187,0,0,255": [205, 0, 0, 255], + "187,0,0,204": [205, 0, 0, 204], +}; + +function pixelsApproximatelyEqual(p1, p2) { + for (let i = 0; i < 4; ++i) { + if (Math.abs(p1[i] - p2[i]) > 3) + return false; + } + return true; +} diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/imagedata-no-color-settings-crash.html b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/imagedata-no-color-settings-crash.html new file mode 100644 index 0000000000..b21eaf72ab --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/imagedata-no-color-settings-crash.html @@ -0,0 +1,26 @@ + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-BB0000CC.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-BB0000CC.png new file mode 100644 index 0000000000..9b3db7e22e Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-BB0000CC.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-BB0000FF.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-BB0000FF.png new file mode 100644 index 0000000000..78237d5a9d Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-BB0000FF.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-BBBC00000000CCCC.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-BBBC00000000CCCC.png new file mode 100644 index 0000000000..3fbe7cadc0 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-BBBC00000000CCCC.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-BBBC00000000FFFF.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-BBBC00000000FFFF.png new file mode 100644 index 0000000000..ab9b1bf5b7 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-BBBC00000000FFFF.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-FF0000CC.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-FF0000CC.png new file mode 100644 index 0000000000..a83344933d Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-FF0000CC.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-FF0000FF.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-FF0000FF.png new file mode 100644 index 0000000000..3222c5e26f Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-FF0000FF.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-FFFF00000000CCCC.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-FFFF00000000CCCC.png new file mode 100644 index 0000000000..60f1239943 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-FFFF00000000CCCC.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-FFFF00000000FFFF.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-FFFF00000000FFFF.png new file mode 100644 index 0000000000..c558eb10b3 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-FFFF00000000FFFF.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-0.7333-0-0.svg b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-0.7333-0-0.svg new file mode 100644 index 0000000000..2737814877 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-0.7333-0-0.svg @@ -0,0 +1,3 @@ + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-1-0-0.svg b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-1-0-0.svg new file mode 100644 index 0000000000..5c1b07362a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-1-0-0.svg @@ -0,0 +1,3 @@ + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-BB0000CC.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-BB0000CC.png new file mode 100644 index 0000000000..2036aeae25 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-BB0000CC.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-BB0000FF.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-BB0000FF.png new file mode 100644 index 0000000000..35347a3055 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-BB0000FF.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-BBBC00000000CCCC.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-BBBC00000000CCCC.png new file mode 100644 index 0000000000..87f11b5d97 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-BBBC00000000CCCC.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-BBBC00000000FFFF.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-BBBC00000000FFFF.png new file mode 100644 index 0000000000..ea2f84caa1 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-BBBC00000000FFFF.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-FF0000CC.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-FF0000CC.png new file mode 100644 index 0000000000..8a0abc74dd Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-FF0000CC.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-FF0000FF.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-FF0000FF.png new file mode 100644 index 0000000000..7b6d4a6150 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-FF0000FF.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-FFFF00000000CCCC.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-FFFF00000000CCCC.png new file mode 100644 index 0000000000..8a0abc74dd Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-FFFF00000000CCCC.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-FFFF00000000FFFF.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-FFFF00000000FFFF.png new file mode 100644 index 0000000000..7b6d4a6150 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-FFFF00000000FFFF.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Generic-CMYK-BE000000.jpg b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Generic-CMYK-BE000000.jpg new file mode 100644 index 0000000000..21eecaa25e Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Generic-CMYK-BE000000.jpg differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Generic-CMYK-FF000000.jpg b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Generic-CMYK-FF000000.jpg new file mode 100644 index 0000000000..32f3b691e2 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Generic-CMYK-FF000000.jpg differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-222000000.mp4 b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-222000000.mp4 new file mode 100644 index 0000000000..71ad32c5f0 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-222000000.mp4 differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-222000000.webm b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-222000000.webm new file mode 100644 index 0000000000..5e4eae49dc Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-222000000.webm differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-3FF000000.mp4 b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-3FF000000.mp4 new file mode 100644 index 0000000000..0e2880a93a Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-3FF000000.mp4 differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-3FF000000.webm b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-3FF000000.webm new file mode 100644 index 0000000000..4f28de8cea Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-3FF000000.webm differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-semitransparent-p3d65.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-semitransparent-p3d65.png new file mode 100644 index 0000000000..5eb3f6a15f Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-semitransparent-p3d65.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-semitransparent-rec2020.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-semitransparent-rec2020.png new file mode 100644 index 0000000000..b64db07379 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-semitransparent-rec2020.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-semitransparent-srgb.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-semitransparent-srgb.png new file mode 100644 index 0000000000..bfbba8b8e2 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-semitransparent-srgb.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb-transparent.avif b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb-transparent.avif new file mode 100644 index 0000000000..c3890c5cf6 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb-transparent.avif differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb-transparent.bmp b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb-transparent.bmp new file mode 100644 index 0000000000..9c9561c704 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb-transparent.bmp differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb-transparent.ico b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb-transparent.ico new file mode 100644 index 0000000000..87e8ff45de Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb-transparent.ico differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb-transparent.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb-transparent.png new file mode 100644 index 0000000000..bfbba8b8e2 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb-transparent.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb-transparent.webp b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb-transparent.webp new file mode 100644 index 0000000000..925646067a Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb-transparent.webp differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.avif b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.avif new file mode 100644 index 0000000000..c13b320ea8 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.avif differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.bmp b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.bmp new file mode 100644 index 0000000000..465d203d98 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.bmp differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.gif b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.gif new file mode 100644 index 0000000000..25bcefb2bf Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.gif differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.ico b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.ico new file mode 100644 index 0000000000..e5375826ab Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.ico differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.jpg b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.jpg new file mode 100644 index 0000000000..c4579e8f06 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.jpg differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.png new file mode 100644 index 0000000000..1b5876b5f3 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.svg b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.svg new file mode 100644 index 0000000000..0517130849 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.webp b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.webp new file mode 100644 index 0000000000..b7c0a421dc Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/pattern-srgb.webp differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_AdobeRGB_opaque.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_AdobeRGB_opaque.png new file mode 100644 index 0000000000..c4496db19b Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_AdobeRGB_opaque.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_AdobeRGB_transparent.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_AdobeRGB_transparent.png new file mode 100644 index 0000000000..3b4cfda52c Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_AdobeRGB_transparent.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_DisplayP3_opaque.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_DisplayP3_opaque.png new file mode 100644 index 0000000000..e7a142cd2e Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_DisplayP3_opaque.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_DisplayP3_transparent.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_DisplayP3_transparent.png new file mode 100644 index 0000000000..0b035317c8 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_DisplayP3_transparent.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_ProPhoto_opaque.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_ProPhoto_opaque.png new file mode 100644 index 0000000000..a1dc7ddb0d Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_ProPhoto_opaque.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_ProPhoto_transparent.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_ProPhoto_transparent.png new file mode 100644 index 0000000000..be2eb1208e Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_ProPhoto_transparent.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_Rec2020_opaque.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_Rec2020_opaque.png new file mode 100644 index 0000000000..e2a2d14451 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_Rec2020_opaque.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_Rec2020_transparent.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_Rec2020_transparent.png new file mode 100644 index 0000000000..960d7d8e75 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_Rec2020_transparent.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_AdobeRGB_opaque.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_AdobeRGB_opaque.png new file mode 100644 index 0000000000..80cf9785eb Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_AdobeRGB_opaque.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_AdobeRGB_transparent.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_AdobeRGB_transparent.png new file mode 100644 index 0000000000..3ec565f8c2 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_AdobeRGB_transparent.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_DisplayP3_opaque.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_DisplayP3_opaque.png new file mode 100644 index 0000000000..5f3134b79c Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_DisplayP3_opaque.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_DisplayP3_transparent.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_DisplayP3_transparent.png new file mode 100644 index 0000000000..500a70eff8 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_DisplayP3_transparent.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_ProPhoto_opaque.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_ProPhoto_opaque.png new file mode 100644 index 0000000000..b5d0e07a7a Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_ProPhoto_opaque.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_ProPhoto_transparent.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_ProPhoto_transparent.png new file mode 100644 index 0000000000..e4ec3e4454 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_ProPhoto_transparent.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_Rec2020_opaque.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_Rec2020_opaque.png new file mode 100644 index 0000000000..c487d5846f Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_Rec2020_opaque.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_Rec2020_transparent.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_Rec2020_transparent.png new file mode 100644 index 0000000000..78fe202c0e Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_Rec2020_transparent.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_sRGB_opaque.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_sRGB_opaque.png new file mode 100644 index 0000000000..babf232a36 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_sRGB_opaque.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_sRGB_transparent.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_sRGB_transparent.png new file mode 100644 index 0000000000..3016404009 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_sRGB_transparent.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_sRGB_opaque.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_sRGB_opaque.png new file mode 100644 index 0000000000..8a665345e9 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_sRGB_opaque.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_sRGB_transparent.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_sRGB_transparent.png new file mode 100644 index 0000000000..e51cda77c4 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_16bit_sRGB_transparent.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_AdobeRGB_opaque.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_AdobeRGB_opaque.png new file mode 100644 index 0000000000..8b787b5c87 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_AdobeRGB_opaque.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_AdobeRGB_transparent.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_AdobeRGB_transparent.png new file mode 100644 index 0000000000..727028e765 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_AdobeRGB_transparent.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_DisplayP3_opaque.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_DisplayP3_opaque.png new file mode 100644 index 0000000000..fe8bdd4963 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_DisplayP3_opaque.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_DisplayP3_transparent.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_DisplayP3_transparent.png new file mode 100644 index 0000000000..b836afebed Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_DisplayP3_transparent.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_ProPhoto_opaque.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_ProPhoto_opaque.png new file mode 100644 index 0000000000..5ecd868606 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_ProPhoto_opaque.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_ProPhoto_transparent.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_ProPhoto_transparent.png new file mode 100644 index 0000000000..85a349dc1d Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_ProPhoto_transparent.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_Rec2020_opaque.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_Rec2020_opaque.png new file mode 100644 index 0000000000..599cd34040 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_Rec2020_opaque.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_Rec2020_transparent.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_Rec2020_transparent.png new file mode 100644 index 0000000000..ecf65c3d46 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_Rec2020_transparent.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_sRGB_opaque.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_sRGB_opaque.png new file mode 100644 index 0000000000..9cab6d12e6 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_sRGB_opaque.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_sRGB_transparent.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_sRGB_transparent.png new file mode 100644 index 0000000000..5fa01e62c2 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/png-16bit/2x2_8bit_sRGB_transparent.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000.mp4 b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000.mp4 new file mode 100644 index 0000000000..59572f5138 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000.mp4 differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000.svg b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000.svg new file mode 100644 index 0000000000..2b785f8cf4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000.svg @@ -0,0 +1,3 @@ + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000.webm b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000.webm new file mode 100644 index 0000000000..23a6364bdb Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000.webm differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000CC.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000CC.png new file mode 100644 index 0000000000..fe463486ef Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000CC.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000FF.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000FF.png new file mode 100644 index 0000000000..be7009f613 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000FF.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BBBC00000000CCCC.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BBBC00000000CCCC.png new file mode 100644 index 0000000000..5220ccb7a9 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BBBC00000000CCCC.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BBBC00000000FFFF.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BBBC00000000FFFF.png new file mode 100644 index 0000000000..416ef12986 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BBBC00000000FFFF.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0000.svg b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0000.svg new file mode 100644 index 0000000000..8798fdfc3a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0000.svg @@ -0,0 +1,3 @@ + + + diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0000CC.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0000CC.png new file mode 100644 index 0000000000..e86f64b71b Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0000CC.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0000FF.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0000FF.png new file mode 100644 index 0000000000..22f33b14da Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0000FF.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0100.mp4 b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0100.mp4 new file mode 100644 index 0000000000..37a29f9f83 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0100.mp4 differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0100.webm b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0100.webm new file mode 100644 index 0000000000..31b69af924 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0100.webm differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FFFF00000000CCCC.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FFFF00000000CCCC.png new file mode 100644 index 0000000000..e86f64b71b Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FFFF00000000CCCC.png differ diff --git a/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FFFF00000000FFFF.png b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FFFF00000000FFFF.png new file mode 100644 index 0000000000..22f33b14da Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FFFF00000000FFFF.png differ diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.angle.1.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.angle.1.html new file mode 100644 index 0000000000..85ebff4c0a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.angle.1.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.arc.angle.1 + + + + + + +

2d.path.arc.angle.1

+

arc() draws pi/2 .. -pi anticlockwise correctly

+ + +

Actual output:

+

FAIL (fallback content)

+

Expected output:

+

    + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.angle.2.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.angle.2.html new file mode 100644 index 0000000000..7eefabd993 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.angle.2.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.arc.angle.2 + + + + + + +

    2d.path.arc.angle.2

    +

    arc() draws -3pi/2 .. -pi anticlockwise correctly

    + + +

    Actual output:

    +

    FAIL (fallback content)

    +

    Expected output:

    +

      + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.angle.3.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.angle.3.html new file mode 100644 index 0000000000..899c50dc90 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.angle.3.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.arc.angle.3 + + + + + + +

      2d.path.arc.angle.3

      +

      arc() wraps angles mod 2pi when anticlockwise and end > start+2pi

      + + +

      Actual output:

      +

      FAIL (fallback content)

      +

      Expected output:

      +

        + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.angle.4.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.angle.4.html new file mode 100644 index 0000000000..3f1bd84d69 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.angle.4.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.path.arc.angle.4 + + + + + + +

        2d.path.arc.angle.4

        +

        arc() draws a full circle when clockwise and end > start+2pi

        + + +

        Actual output:

        +

        FAIL (fallback content)

        +

        Expected output:

        +

          + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.angle.5.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.angle.5.html new file mode 100644 index 0000000000..2373bd4f0a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.angle.5.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.arc.angle.5 + + + + + + +

          2d.path.arc.angle.5

          +

          arc() wraps angles mod 2pi when clockwise and start > end+2pi

          + + +

          Actual output:

          +

          FAIL (fallback content)

          +

          Expected output:

          +

            + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.angle.6.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.angle.6.html new file mode 100644 index 0000000000..b0b03cff79 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.angle.6.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.path.arc.angle.6 + + + + + + +

            2d.path.arc.angle.6

            +

            arc() draws a full circle when anticlockwise and start > end+2pi

            + + +

            Actual output:

            +

            FAIL (fallback content)

            +

            Expected output:

            +

              + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.default.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.default.html new file mode 100644 index 0000000000..b52941fe3f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.default.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.arc.default + + + + + + +

              2d.path.arc.default

              +

              arc() with missing last argument defaults to clockwise

              + + +

              Actual output:

              +

              FAIL (fallback content)

              +

              Expected output:

              +

                + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.empty.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.empty.html new file mode 100644 index 0000000000..295ee4bbb2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.empty.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.arc.empty + + + + + + +

                2d.path.arc.empty

                +

                arc() with an empty path does not draw a straight line to the start point

                + + +

                Actual output:

                +

                FAIL (fallback content)

                +

                Expected output:

                +

                  + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.end.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.end.html new file mode 100644 index 0000000000..a581a40e8e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.end.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.path.arc.end + + + + + + +

                  2d.path.arc.end

                  +

                  arc() adds the end point of the arc to the subpath

                  + + +

                  Actual output:

                  +

                  FAIL (fallback content)

                  +

                  Expected output:

                  +

                    + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.negative.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.negative.html new file mode 100644 index 0000000000..fd81ebadcd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.negative.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.path.arc.negative + + + + + + +

                    2d.path.arc.negative

                    +

                    arc() with negative radius throws INDEX_SIZE_ERR

                    + + +

                    Actual output:

                    +

                    FAIL (fallback content)

                    + +
                      + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.nonempty.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.nonempty.html new file mode 100644 index 0000000000..982829013d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.nonempty.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.path.arc.nonempty + + + + + + +

                      2d.path.arc.nonempty

                      +

                      arc() with a non-empty path does draw a straight line to the start point

                      + + +

                      Actual output:

                      +

                      FAIL (fallback content)

                      +

                      Expected output:

                      +

                        + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.nonfinite.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.nonfinite.html new file mode 100644 index 0000000000..a1b15e7a88 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.nonfinite.html @@ -0,0 +1,76 @@ + + +Canvas test: 2d.path.arc.nonfinite + + + + + + +

                        2d.path.arc.nonfinite

                        +

                        arc() with Infinity/NaN is ignored

                        + + +

                        Actual output:

                        +

                        FAIL (fallback content)

                        +

                        Expected output:

                        +

                          + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.scale.1.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.scale.1.html new file mode 100644 index 0000000000..951c9ae26c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.scale.1.html @@ -0,0 +1,53 @@ + + +Canvas test: 2d.path.arc.scale.1 + + + + + + +

                          2d.path.arc.scale.1

                          +

                          Non-uniformly scaled arcs are the right shape

                          + + +

                          Actual output:

                          +

                          FAIL (fallback content)

                          +

                          Expected output:

                          +

                            + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.scale.2.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.scale.2.html new file mode 100644 index 0000000000..6b39e16222 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.scale.2.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.path.arc.scale.2 + + + + + + +

                            2d.path.arc.scale.2

                            +

                            Highly scaled arcs are the right shape

                            + + +

                            Actual output:

                            +

                            FAIL (fallback content)

                            +

                            Expected output:

                            +

                              + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.selfintersect.1.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.selfintersect.1.html new file mode 100644 index 0000000000..3bc81bd77a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.selfintersect.1.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.path.arc.selfintersect.1 + + + + + + +

                              2d.path.arc.selfintersect.1

                              +

                              arc() with lineWidth > 2*radius is drawn sensibly

                              + + +

                              Actual output:

                              +

                              FAIL (fallback content)

                              +

                              Expected output:

                              +

                                + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.selfintersect.2.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.selfintersect.2.html new file mode 100644 index 0000000000..e3b14a782f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.selfintersect.2.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.path.arc.selfintersect.2 + + + + + + +

                                2d.path.arc.selfintersect.2

                                +

                                arc() with lineWidth > 2*radius is drawn sensibly

                                + + +

                                Actual output:

                                +

                                FAIL (fallback content)

                                +

                                Expected output:

                                +

                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.shape.1.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.shape.1.html new file mode 100644 index 0000000000..8a456841ad --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.shape.1.html @@ -0,0 +1,38 @@ + + +Canvas test: 2d.path.arc.shape.1 + + + + + + +

                                  2d.path.arc.shape.1

                                  +

                                  arc() from 0 to pi does not draw anything in the wrong half

                                  + + +

                                  Actual output:

                                  +

                                  FAIL (fallback content)

                                  +

                                  Expected output:

                                  +

                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.shape.2.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.shape.2.html new file mode 100644 index 0000000000..f820eed761 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.shape.2.html @@ -0,0 +1,38 @@ + + +Canvas test: 2d.path.arc.shape.2 + + + + + + +

                                    2d.path.arc.shape.2

                                    +

                                    arc() from 0 to pi draws stuff in the right half

                                    + + +

                                    Actual output:

                                    +

                                    FAIL (fallback content)

                                    +

                                    Expected output:

                                    +

                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.shape.3.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.shape.3.html new file mode 100644 index 0000000000..aa08d44194 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.shape.3.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.path.arc.shape.3 + + + + + + +

                                      2d.path.arc.shape.3

                                      +

                                      arc() from 0 to -pi/2 does not draw anything in the wrong quadrant

                                      + + +

                                      Actual output:

                                      +

                                      FAIL (fallback content)

                                      +

                                      Expected output:

                                      +

                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.shape.4.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.shape.4.html new file mode 100644 index 0000000000..b00d4468f2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.shape.4.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.path.arc.shape.4 + + + + + + +

                                        2d.path.arc.shape.4

                                        +

                                        arc() from 0 to -pi/2 draws stuff in the right quadrant

                                        + + +

                                        Actual output:

                                        +

                                        FAIL (fallback content)

                                        +

                                        Expected output:

                                        +

                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.shape.5.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.shape.5.html new file mode 100644 index 0000000000..f5574d2773 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.shape.5.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.path.arc.shape.5 + + + + + + +

                                          2d.path.arc.shape.5

                                          +

                                          arc() from 0 to 5pi does not draw crazy things

                                          + + +

                                          Actual output:

                                          +

                                          FAIL (fallback content)

                                          +

                                          Expected output:

                                          +

                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.twopie.1.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.twopie.1.html new file mode 100644 index 0000000000..6312efb3e8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.twopie.1.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.arc.twopie.1 + + + + + + +

                                            2d.path.arc.twopie.1

                                            +

                                            arc() draws nothing when end = start + 2pi-e and anticlockwise

                                            + + +

                                            Actual output:

                                            +

                                            FAIL (fallback content)

                                            +

                                            Expected output:

                                            +

                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.twopie.2.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.twopie.2.html new file mode 100644 index 0000000000..132c2d38dd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.twopie.2.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.arc.twopie.2 + + + + + + +

                                              2d.path.arc.twopie.2

                                              +

                                              arc() draws a full circle when end = start + 2pi-e and clockwise

                                              + + +

                                              Actual output:

                                              +

                                              FAIL (fallback content)

                                              +

                                              Expected output:

                                              +

                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.twopie.3.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.twopie.3.html new file mode 100644 index 0000000000..204ed54a1e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.twopie.3.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.arc.twopie.3 + + + + + + +

                                                2d.path.arc.twopie.3

                                                +

                                                arc() draws a full circle when end = start + 2pi+e and anticlockwise

                                                + + +

                                                Actual output:

                                                +

                                                FAIL (fallback content)

                                                +

                                                Expected output:

                                                +

                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.twopie.4.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.twopie.4.html new file mode 100644 index 0000000000..d5535a7949 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.twopie.4.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.arc.twopie.4 + + + + + + +

                                                  2d.path.arc.twopie.4

                                                  +

                                                  arc() draws nothing when end = start + 2pi+e and clockwise

                                                  + + +

                                                  Actual output:

                                                  +

                                                  FAIL (fallback content)

                                                  +

                                                  Expected output:

                                                  +

                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.twopie.5.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.twopie.5.html new file mode 100644 index 0000000000..955a6c8743 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.twopie.5.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.path.arc.twopie.5 + + + + + + +

                                                    2d.path.arc.twopie.5

                                                    +

                                                    arc() draws correctly when start = 2 and end = start + 2pi+e and clockwise

                                                    + + +

                                                    Actual output:

                                                    +

                                                    FAIL (fallback content)

                                                    + +
                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.twopie.6.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.twopie.6.html new file mode 100644 index 0000000000..9420ecdc93 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.twopie.6.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.path.arc.twopie.6 + + + + + + +

                                                      2d.path.arc.twopie.6

                                                      +

                                                      arc() draws correctly when start = 5 and end = start + 2pi+e and clockwise

                                                      + + +

                                                      Actual output:

                                                      +

                                                      FAIL (fallback content)

                                                      + +
                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.zero.1.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.zero.1.html new file mode 100644 index 0000000000..2c93425b1e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.zero.1.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.arc.zero.1 + + + + + + +

                                                        2d.path.arc.zero.1

                                                        +

                                                        arc() draws nothing when startAngle = endAngle and anticlockwise

                                                        + + +

                                                        Actual output:

                                                        +

                                                        FAIL (fallback content)

                                                        +

                                                        Expected output:

                                                        +

                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.zero.2.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.zero.2.html new file mode 100644 index 0000000000..c290c2f32f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.zero.2.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.arc.zero.2 + + + + + + +

                                                          2d.path.arc.zero.2

                                                          +

                                                          arc() draws nothing when startAngle = endAngle and clockwise

                                                          + + +

                                                          Actual output:

                                                          +

                                                          FAIL (fallback content)

                                                          +

                                                          Expected output:

                                                          +

                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.zeroradius.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.zeroradius.html new file mode 100644 index 0000000000..f75403b2f3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arc.zeroradius.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.path.arc.zeroradius + + + + + + +

                                                            2d.path.arc.zeroradius

                                                            +

                                                            arc() with zero radius draws a line to the start point

                                                            + + +

                                                            Actual output:

                                                            +

                                                            FAIL (fallback content)

                                                            +

                                                            Expected output:

                                                            +

                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.coincide.1.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.coincide.1.html new file mode 100644 index 0000000000..01c8091c46 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.coincide.1.html @@ -0,0 +1,45 @@ + + +Canvas test: 2d.path.arcTo.coincide.1 + + + + + + +

                                                              2d.path.arcTo.coincide.1

                                                              +

                                                              arcTo() has no effect if P0 = P1

                                                              + + +

                                                              Actual output:

                                                              +

                                                              FAIL (fallback content)

                                                              +

                                                              Expected output:

                                                              +

                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.coincide.2.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.coincide.2.html new file mode 100644 index 0000000000..d216949aae --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.coincide.2.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.path.arcTo.coincide.2 + + + + + + +

                                                                2d.path.arcTo.coincide.2

                                                                +

                                                                arcTo() draws a straight line to P1 if P1 = P2

                                                                + + +

                                                                Actual output:

                                                                +

                                                                FAIL (fallback content)

                                                                +

                                                                Expected output:

                                                                +

                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.collinear.1.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.collinear.1.html new file mode 100644 index 0000000000..e91e2e4b1b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.collinear.1.html @@ -0,0 +1,42 @@ + + +Canvas test: 2d.path.arcTo.collinear.1 + + + + + + +

                                                                  2d.path.arcTo.collinear.1

                                                                  +

                                                                  arcTo() with all points on a line, and P1 between P0/P2, draws a straight line to P1

                                                                  + + +

                                                                  Actual output:

                                                                  +

                                                                  FAIL (fallback content)

                                                                  +

                                                                  Expected output:

                                                                  +

                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.collinear.2.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.collinear.2.html new file mode 100644 index 0000000000..97b1339295 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.collinear.2.html @@ -0,0 +1,42 @@ + + +Canvas test: 2d.path.arcTo.collinear.2 + + + + + + +

                                                                    2d.path.arcTo.collinear.2

                                                                    +

                                                                    arcTo() with all points on a line, and P2 between P0/P1, draws a straight line to P1

                                                                    + + +

                                                                    Actual output:

                                                                    +

                                                                    FAIL (fallback content)

                                                                    +

                                                                    Expected output:

                                                                    +

                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.collinear.3.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.collinear.3.html new file mode 100644 index 0000000000..2f4394f038 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.collinear.3.html @@ -0,0 +1,47 @@ + + +Canvas test: 2d.path.arcTo.collinear.3 + + + + + + +

                                                                      2d.path.arcTo.collinear.3

                                                                      +

                                                                      arcTo() with all points on a line, and P0 between P1/P2, draws a straight line to P1

                                                                      + + +

                                                                      Actual output:

                                                                      +

                                                                      FAIL (fallback content)

                                                                      +

                                                                      Expected output:

                                                                      +

                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.ensuresubpath.1.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.ensuresubpath.1.html new file mode 100644 index 0000000000..2781bcbba3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.ensuresubpath.1.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.arcTo.ensuresubpath.1 + + + + + + +

                                                                        2d.path.arcTo.ensuresubpath.1

                                                                        +

                                                                        If there is no subpath, the first control point is added (and nothing is drawn up to it)

                                                                        + + +

                                                                        Actual output:

                                                                        +

                                                                        FAIL (fallback content)

                                                                        +

                                                                        Expected output:

                                                                        +

                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.ensuresubpath.2.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.ensuresubpath.2.html new file mode 100644 index 0000000000..f5da07c1c6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.ensuresubpath.2.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.path.arcTo.ensuresubpath.2 + + + + + + +

                                                                          2d.path.arcTo.ensuresubpath.2

                                                                          +

                                                                          If there is no subpath, the first control point is added

                                                                          + + +

                                                                          Actual output:

                                                                          +

                                                                          FAIL (fallback content)

                                                                          +

                                                                          Expected output:

                                                                          +

                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.negative.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.negative.html new file mode 100644 index 0000000000..0091ca2a67 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.negative.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.path.arcTo.negative + + + + + + +

                                                                            2d.path.arcTo.negative

                                                                            +

                                                                            arcTo() with negative radius throws an exception

                                                                            + + +

                                                                            Actual output:

                                                                            +

                                                                            FAIL (fallback content)

                                                                            + +
                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.nonfinite.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.nonfinite.html new file mode 100644 index 0000000000..0d7be1d360 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.nonfinite.html @@ -0,0 +1,74 @@ + + +Canvas test: 2d.path.arcTo.nonfinite + + + + + + +

                                                                              2d.path.arcTo.nonfinite

                                                                              +

                                                                              arcTo() with Infinity/NaN is ignored

                                                                              + + +

                                                                              Actual output:

                                                                              +

                                                                              FAIL (fallback content)

                                                                              +

                                                                              Expected output:

                                                                              +

                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.scale.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.scale.html new file mode 100644 index 0000000000..6645f05260 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.scale.html @@ -0,0 +1,46 @@ + + +Canvas test: 2d.path.arcTo.scale + + + + + + +

                                                                                2d.path.arcTo.scale

                                                                                +

                                                                                arcTo scales the curve, not just the control points

                                                                                + + +

                                                                                Actual output:

                                                                                +

                                                                                FAIL (fallback content)

                                                                                +

                                                                                Expected output:

                                                                                +

                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.shape.curve1.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.shape.curve1.html new file mode 100644 index 0000000000..4617b2cbbb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.shape.curve1.html @@ -0,0 +1,59 @@ + + +Canvas test: 2d.path.arcTo.shape.curve1 + + + + + + +

                                                                                  2d.path.arcTo.shape.curve1

                                                                                  +

                                                                                  arcTo() curves in the right kind of shape

                                                                                  + + +

                                                                                  Actual output:

                                                                                  +

                                                                                  FAIL (fallback content)

                                                                                  +

                                                                                  Expected output:

                                                                                  +

                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.shape.curve2.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.shape.curve2.html new file mode 100644 index 0000000000..bcc4326eea --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.shape.curve2.html @@ -0,0 +1,58 @@ + + +Canvas test: 2d.path.arcTo.shape.curve2 + + + + + + +

                                                                                    2d.path.arcTo.shape.curve2

                                                                                    +

                                                                                    arcTo() curves in the right kind of shape

                                                                                    + + +

                                                                                    Actual output:

                                                                                    +

                                                                                    FAIL (fallback content)

                                                                                    +

                                                                                    Expected output:

                                                                                    +

                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.shape.end.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.shape.end.html new file mode 100644 index 0000000000..829c70f5f4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.shape.end.html @@ -0,0 +1,39 @@ + + +Canvas test: 2d.path.arcTo.shape.end + + + + + + +

                                                                                      2d.path.arcTo.shape.end

                                                                                      +

                                                                                      arcTo() does not draw anything from P1 to P2

                                                                                      + + +

                                                                                      Actual output:

                                                                                      +

                                                                                      FAIL (fallback content)

                                                                                      +

                                                                                      Expected output:

                                                                                      +

                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.shape.start.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.shape.start.html new file mode 100644 index 0000000000..0abeedf433 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.shape.start.html @@ -0,0 +1,39 @@ + + +Canvas test: 2d.path.arcTo.shape.start + + + + + + +

                                                                                        2d.path.arcTo.shape.start

                                                                                        +

                                                                                        arcTo() draws a straight line from P0 to P1

                                                                                        + + +

                                                                                        Actual output:

                                                                                        +

                                                                                        FAIL (fallback content)

                                                                                        +

                                                                                        Expected output:

                                                                                        +

                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.transformation.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.transformation.html new file mode 100644 index 0000000000..5aa8562b1d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.transformation.html @@ -0,0 +1,45 @@ + + +Canvas test: 2d.path.arcTo.transformation + + + + + + +

                                                                                          2d.path.arcTo.transformation

                                                                                          +

                                                                                          arcTo joins up to the last subpath point correctly

                                                                                          + + +

                                                                                          Actual output:

                                                                                          +

                                                                                          FAIL (fallback content)

                                                                                          +

                                                                                          Expected output:

                                                                                          +

                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.zero.1.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.zero.1.html new file mode 100644 index 0000000000..bb2cc1d3e3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.zero.1.html @@ -0,0 +1,42 @@ + + +Canvas test: 2d.path.arcTo.zero.1 + + + + + + +

                                                                                            2d.path.arcTo.zero.1

                                                                                            +

                                                                                            arcTo() with zero radius draws a straight line from P0 to P1

                                                                                            + + +

                                                                                            Actual output:

                                                                                            +

                                                                                            FAIL (fallback content)

                                                                                            +

                                                                                            Expected output:

                                                                                            +

                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.zero.2.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.zero.2.html new file mode 100644 index 0000000000..d2eeee535d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.arcTo.zero.2.html @@ -0,0 +1,42 @@ + + +Canvas test: 2d.path.arcTo.zero.2 + + + + + + +

                                                                                              2d.path.arcTo.zero.2

                                                                                              +

                                                                                              arcTo() with zero radius draws a straight line from P0 to P1, even when all points are collinear

                                                                                              + + +

                                                                                              Actual output:

                                                                                              +

                                                                                              FAIL (fallback content)

                                                                                              +

                                                                                              Expected output:

                                                                                              +

                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.beginPath.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.beginPath.html new file mode 100644 index 0000000000..316f6af942 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.beginPath.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.path.beginPath + + + + + + +

                                                                                                2d.path.beginPath

                                                                                                +

                                                                                                + + +

                                                                                                Actual output:

                                                                                                +

                                                                                                FAIL (fallback content)

                                                                                                +

                                                                                                Expected output:

                                                                                                +

                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.basic.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.basic.html new file mode 100644 index 0000000000..0c3d7f948b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.basic.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.path.bezierCurveTo.basic + + + + + + +

                                                                                                  2d.path.bezierCurveTo.basic

                                                                                                  +

                                                                                                  + + +

                                                                                                  Actual output:

                                                                                                  +

                                                                                                  FAIL (fallback content)

                                                                                                  +

                                                                                                  Expected output:

                                                                                                  +

                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.ensuresubpath.1.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.ensuresubpath.1.html new file mode 100644 index 0000000000..ebcce3f48c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.ensuresubpath.1.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.path.bezierCurveTo.ensuresubpath.1 + + + + + + +

                                                                                                    2d.path.bezierCurveTo.ensuresubpath.1

                                                                                                    +

                                                                                                    If there is no subpath, the first control point is added (and nothing is drawn up to it)

                                                                                                    + + +

                                                                                                    Actual output:

                                                                                                    +

                                                                                                    FAIL (fallback content)

                                                                                                    +

                                                                                                    Expected output:

                                                                                                    +

                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.html new file mode 100644 index 0000000000..c269b72d33 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.path.bezierCurveTo.ensuresubpath.2 + + + + + + +

                                                                                                      2d.path.bezierCurveTo.ensuresubpath.2

                                                                                                      +

                                                                                                      If there is no subpath, the first control point is added

                                                                                                      + + +

                                                                                                      Actual output:

                                                                                                      +

                                                                                                      FAIL (fallback content)

                                                                                                      +

                                                                                                      Expected output:

                                                                                                      +

                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.nonfinite.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.nonfinite.html new file mode 100644 index 0000000000..6278a67283 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.nonfinite.html @@ -0,0 +1,108 @@ + + +Canvas test: 2d.path.bezierCurveTo.nonfinite + + + + + + +

                                                                                                        2d.path.bezierCurveTo.nonfinite

                                                                                                        +

                                                                                                        bezierCurveTo() with Infinity/NaN is ignored

                                                                                                        + + +

                                                                                                        Actual output:

                                                                                                        +

                                                                                                        FAIL (fallback content)

                                                                                                        +

                                                                                                        Expected output:

                                                                                                        +

                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.scaled.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.scaled.html new file mode 100644 index 0000000000..e7a5d8b524 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.scaled.html @@ -0,0 +1,39 @@ + + +Canvas test: 2d.path.bezierCurveTo.scaled + + + + + + +

                                                                                                          2d.path.bezierCurveTo.scaled

                                                                                                          +

                                                                                                          + + +

                                                                                                          Actual output:

                                                                                                          +

                                                                                                          FAIL (fallback content)

                                                                                                          +

                                                                                                          Expected output:

                                                                                                          +

                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.shape.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.shape.html new file mode 100644 index 0000000000..cbc2824425 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.shape.html @@ -0,0 +1,38 @@ + + +Canvas test: 2d.path.bezierCurveTo.shape + + + + + + +

                                                                                                            2d.path.bezierCurveTo.shape

                                                                                                            +

                                                                                                            + + +

                                                                                                            Actual output:

                                                                                                            +

                                                                                                            FAIL (fallback content)

                                                                                                            +

                                                                                                            Expected output:

                                                                                                            +

                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.clip.basic.1.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.clip.basic.1.html new file mode 100644 index 0000000000..a5515e4f7e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.clip.basic.1.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.path.clip.basic.1 + + + + + + +

                                                                                                              2d.path.clip.basic.1

                                                                                                              +

                                                                                                              + + +

                                                                                                              Actual output:

                                                                                                              +

                                                                                                              FAIL (fallback content)

                                                                                                              +

                                                                                                              Expected output:

                                                                                                              +

                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.clip.basic.2.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.clip.basic.2.html new file mode 100644 index 0000000000..27e1ad0b0c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.clip.basic.2.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.path.clip.basic.2 + + + + + + +

                                                                                                                2d.path.clip.basic.2

                                                                                                                +

                                                                                                                + + +

                                                                                                                Actual output:

                                                                                                                +

                                                                                                                FAIL (fallback content)

                                                                                                                +

                                                                                                                Expected output:

                                                                                                                +

                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.clip.empty.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.clip.empty.html new file mode 100644 index 0000000000..17208ad797 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.clip.empty.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.path.clip.empty + + + + + + +

                                                                                                                  2d.path.clip.empty

                                                                                                                  +

                                                                                                                  + + +

                                                                                                                  Actual output:

                                                                                                                  +

                                                                                                                  FAIL (fallback content)

                                                                                                                  +

                                                                                                                  Expected output:

                                                                                                                  +

                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.clip.intersect.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.clip.intersect.html new file mode 100644 index 0000000000..c1057f2645 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.clip.intersect.html @@ -0,0 +1,39 @@ + + +Canvas test: 2d.path.clip.intersect + + + + + + +

                                                                                                                    2d.path.clip.intersect

                                                                                                                    +

                                                                                                                    + + +

                                                                                                                    Actual output:

                                                                                                                    +

                                                                                                                    FAIL (fallback content)

                                                                                                                    +

                                                                                                                    Expected output:

                                                                                                                    +

                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.clip.unaffected.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.clip.unaffected.html new file mode 100644 index 0000000000..66f0379602 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.clip.unaffected.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.path.clip.unaffected + + + + + + +

                                                                                                                      2d.path.clip.unaffected

                                                                                                                      +

                                                                                                                      + + +

                                                                                                                      Actual output:

                                                                                                                      +

                                                                                                                      FAIL (fallback content)

                                                                                                                      +

                                                                                                                      Expected output:

                                                                                                                      +

                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.clip.winding.1.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.clip.winding.1.html new file mode 100644 index 0000000000..46e4db9b6c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.clip.winding.1.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.path.clip.winding.1 + + + + + + +

                                                                                                                        2d.path.clip.winding.1

                                                                                                                        +

                                                                                                                        + + +

                                                                                                                        Actual output:

                                                                                                                        +

                                                                                                                        FAIL (fallback content)

                                                                                                                        +

                                                                                                                        Expected output:

                                                                                                                        +

                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.clip.winding.2.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.clip.winding.2.html new file mode 100644 index 0000000000..9341353a8d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.clip.winding.2.html @@ -0,0 +1,48 @@ + + +Canvas test: 2d.path.clip.winding.2 + + + + + + +

                                                                                                                          2d.path.clip.winding.2

                                                                                                                          +

                                                                                                                          + + +

                                                                                                                          Actual output:

                                                                                                                          +

                                                                                                                          FAIL (fallback content)

                                                                                                                          +

                                                                                                                          Expected output:

                                                                                                                          +

                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.closePath.empty.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.closePath.empty.html new file mode 100644 index 0000000000..898cdc5fa6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.closePath.empty.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.path.closePath.empty + + + + + + +

                                                                                                                            2d.path.closePath.empty

                                                                                                                            +

                                                                                                                            + + +

                                                                                                                            Actual output:

                                                                                                                            +

                                                                                                                            FAIL (fallback content)

                                                                                                                            +

                                                                                                                            Expected output:

                                                                                                                            +

                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.closePath.newline.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.closePath.newline.html new file mode 100644 index 0000000000..07ec4b2a82 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.closePath.newline.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.path.closePath.newline + + + + + + +

                                                                                                                              2d.path.closePath.newline

                                                                                                                              +

                                                                                                                              + + +

                                                                                                                              Actual output:

                                                                                                                              +

                                                                                                                              FAIL (fallback content)

                                                                                                                              +

                                                                                                                              Expected output:

                                                                                                                              +

                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.closePath.nextpoint.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.closePath.nextpoint.html new file mode 100644 index 0000000000..648d7ad37a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.closePath.nextpoint.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.path.closePath.nextpoint + + + + + + +

                                                                                                                                2d.path.closePath.nextpoint

                                                                                                                                +

                                                                                                                                + + +

                                                                                                                                Actual output:

                                                                                                                                +

                                                                                                                                FAIL (fallback content)

                                                                                                                                +

                                                                                                                                Expected output:

                                                                                                                                +

                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.ellipse.basics.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.ellipse.basics.html new file mode 100644 index 0000000000..d46dc31d26 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.ellipse.basics.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.path.ellipse.basics + + + + + + +

                                                                                                                                  2d.path.ellipse.basics

                                                                                                                                  +

                                                                                                                                  Verify canvas throws error when drawing ellipse with negative radii.

                                                                                                                                  + + +

                                                                                                                                  Actual output:

                                                                                                                                  +

                                                                                                                                  FAIL (fallback content)

                                                                                                                                  + +
                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.closed.basic.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.closed.basic.html new file mode 100644 index 0000000000..010dbf43e1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.closed.basic.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.path.fill.closed.basic + + + + + + +

                                                                                                                                    2d.path.fill.closed.basic

                                                                                                                                    +

                                                                                                                                    + + +

                                                                                                                                    Actual output:

                                                                                                                                    +

                                                                                                                                    FAIL (fallback content)

                                                                                                                                    +

                                                                                                                                    Expected output:

                                                                                                                                    +

                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.closed.unaffected.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.closed.unaffected.html new file mode 100644 index 0000000000..e00a6c8f55 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.closed.unaffected.html @@ -0,0 +1,39 @@ + + +Canvas test: 2d.path.fill.closed.unaffected + + + + + + +

                                                                                                                                      2d.path.fill.closed.unaffected

                                                                                                                                      +

                                                                                                                                      + + +

                                                                                                                                      Actual output:

                                                                                                                                      +

                                                                                                                                      FAIL (fallback content)

                                                                                                                                      +

                                                                                                                                      Expected output:

                                                                                                                                      +

                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.overlap.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.overlap.html new file mode 100644 index 0000000000..08782ed11e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.overlap.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.path.fill.overlap + + + + + + +

                                                                                                                                        2d.path.fill.overlap

                                                                                                                                        +

                                                                                                                                        + + +

                                                                                                                                        Actual output:

                                                                                                                                        +

                                                                                                                                        FAIL (fallback content)

                                                                                                                                        +

                                                                                                                                        Expected output:

                                                                                                                                        +

                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.overlap.png b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.overlap.png new file mode 100644 index 0000000000..e2a35d48d4 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.overlap.png differ diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.winding.add.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.winding.add.html new file mode 100644 index 0000000000..ef9a2a0f93 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.winding.add.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.path.fill.winding.add + + + + + + +

                                                                                                                                          2d.path.fill.winding.add

                                                                                                                                          +

                                                                                                                                          + + +

                                                                                                                                          Actual output:

                                                                                                                                          +

                                                                                                                                          FAIL (fallback content)

                                                                                                                                          +

                                                                                                                                          Expected output:

                                                                                                                                          +

                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.winding.subtract.1.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.winding.subtract.1.html new file mode 100644 index 0000000000..eecf0198e2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.winding.subtract.1.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.path.fill.winding.subtract.1 + + + + + + +

                                                                                                                                            2d.path.fill.winding.subtract.1

                                                                                                                                            +

                                                                                                                                            + + +

                                                                                                                                            Actual output:

                                                                                                                                            +

                                                                                                                                            FAIL (fallback content)

                                                                                                                                            +

                                                                                                                                            Expected output:

                                                                                                                                            +

                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.winding.subtract.2.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.winding.subtract.2.html new file mode 100644 index 0000000000..cf8b6a6ce9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.winding.subtract.2.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.path.fill.winding.subtract.2 + + + + + + +

                                                                                                                                              2d.path.fill.winding.subtract.2

                                                                                                                                              +

                                                                                                                                              + + +

                                                                                                                                              Actual output:

                                                                                                                                              +

                                                                                                                                              FAIL (fallback content)

                                                                                                                                              +

                                                                                                                                              Expected output:

                                                                                                                                              +

                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.winding.subtract.3.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.winding.subtract.3.html new file mode 100644 index 0000000000..e056e33003 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.fill.winding.subtract.3.html @@ -0,0 +1,46 @@ + + +Canvas test: 2d.path.fill.winding.subtract.3 + + + + + + +

                                                                                                                                                2d.path.fill.winding.subtract.3

                                                                                                                                                +

                                                                                                                                                + + +

                                                                                                                                                Actual output:

                                                                                                                                                +

                                                                                                                                                FAIL (fallback content)

                                                                                                                                                +

                                                                                                                                                Expected output:

                                                                                                                                                +

                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.initial.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.initial.html new file mode 100644 index 0000000000..a3de93a799 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.initial.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.path.initial + + + + + + +

                                                                                                                                                  2d.path.initial

                                                                                                                                                  +

                                                                                                                                                  + + +

                                                                                                                                                  Actual output:

                                                                                                                                                  +

                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                  +

                                                                                                                                                  Expected output:

                                                                                                                                                  +

                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.arc.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.arc.html new file mode 100644 index 0000000000..bc4bc560e5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.arc.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.path.isPointInPath.arc + + + + + + +

                                                                                                                                                    2d.path.isPointInPath.arc

                                                                                                                                                    +

                                                                                                                                                    isPointInPath() works on arcs

                                                                                                                                                    + + +

                                                                                                                                                    Actual output:

                                                                                                                                                    +

                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                    + +
                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.basic.1.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.basic.1.html new file mode 100644 index 0000000000..22562c60a2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.basic.1.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.path.isPointInPath.basic.1 + + + + + + +

                                                                                                                                                      2d.path.isPointInPath.basic.1

                                                                                                                                                      +

                                                                                                                                                      isPointInPath() detects whether the point is inside the path

                                                                                                                                                      + + +

                                                                                                                                                      Actual output:

                                                                                                                                                      +

                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                      + +
                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.basic.2.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.basic.2.html new file mode 100644 index 0000000000..9fc1060df8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.basic.2.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.path.isPointInPath.basic.2 + + + + + + +

                                                                                                                                                        2d.path.isPointInPath.basic.2

                                                                                                                                                        +

                                                                                                                                                        isPointInPath() detects whether the point is inside the path

                                                                                                                                                        + + +

                                                                                                                                                        Actual output:

                                                                                                                                                        +

                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                        + +
                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.basic.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.basic.html new file mode 100644 index 0000000000..5e3edfcc80 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.basic.html @@ -0,0 +1,65 @@ + + +Canvas test: 2d.path.isPointInPath.basic + + + + + + +

                                                                                                                                                          2d.path.isPointInPath.basic

                                                                                                                                                          +

                                                                                                                                                          Verify the winding rule in isPointInPath works for for rect path.

                                                                                                                                                          + + +

                                                                                                                                                          Actual output:

                                                                                                                                                          +

                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                          + +
                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.bezier.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.bezier.html new file mode 100644 index 0000000000..b2f2d23724 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.bezier.html @@ -0,0 +1,47 @@ + + +Canvas test: 2d.path.isPointInPath.bezier + + + + + + +

                                                                                                                                                            2d.path.isPointInPath.bezier

                                                                                                                                                            +

                                                                                                                                                            isPointInPath() works on Bezier curves

                                                                                                                                                            + + +

                                                                                                                                                            Actual output:

                                                                                                                                                            +

                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                            + +
                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.bigarc.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.bigarc.html new file mode 100644 index 0000000000..77cb495137 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.bigarc.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.path.isPointInPath.bigarc + + + + + + +

                                                                                                                                                              2d.path.isPointInPath.bigarc

                                                                                                                                                              +

                                                                                                                                                              isPointInPath() works on unclosed arcs larger than 2pi

                                                                                                                                                              + + +

                                                                                                                                                              Actual output:

                                                                                                                                                              +

                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                              + +
                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.edge.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.edge.html new file mode 100644 index 0000000000..b00da5a2a7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.edge.html @@ -0,0 +1,38 @@ + + +Canvas test: 2d.path.isPointInPath.edge + + + + + + +

                                                                                                                                                                2d.path.isPointInPath.edge

                                                                                                                                                                +

                                                                                                                                                                isPointInPath() counts points on the path as being inside

                                                                                                                                                                + + +

                                                                                                                                                                Actual output:

                                                                                                                                                                +

                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                + +
                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.empty.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.empty.html new file mode 100644 index 0000000000..3edfe01a2a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.empty.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.path.isPointInPath.empty + + + + + + +

                                                                                                                                                                  2d.path.isPointInPath.empty

                                                                                                                                                                  +

                                                                                                                                                                  isPointInPath() works when there is no path

                                                                                                                                                                  + + +

                                                                                                                                                                  Actual output:

                                                                                                                                                                  +

                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                  + +
                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.nonfinite.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.nonfinite.html new file mode 100644 index 0000000000..4ef541a431 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.nonfinite.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.isPointInPath.nonfinite + + + + + + +

                                                                                                                                                                    2d.path.isPointInPath.nonfinite

                                                                                                                                                                    +

                                                                                                                                                                    isPointInPath() returns false for non-finite arguments

                                                                                                                                                                    + + +

                                                                                                                                                                    Actual output:

                                                                                                                                                                    +

                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                    + +
                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.outside.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.outside.html new file mode 100644 index 0000000000..6431879eb6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.outside.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.isPointInPath.outside + + + + + + +

                                                                                                                                                                      2d.path.isPointInPath.outside

                                                                                                                                                                      +

                                                                                                                                                                      isPointInPath() works on paths outside the canvas

                                                                                                                                                                      + + +

                                                                                                                                                                      Actual output:

                                                                                                                                                                      +

                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                      + +
                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.subpath.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.subpath.html new file mode 100644 index 0000000000..5d664557d8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.subpath.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.isPointInPath.subpath + + + + + + +

                                                                                                                                                                        2d.path.isPointInPath.subpath

                                                                                                                                                                        +

                                                                                                                                                                        isPointInPath() uses the current path, not just the subpath

                                                                                                                                                                        + + +

                                                                                                                                                                        Actual output:

                                                                                                                                                                        +

                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                        + +
                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.1.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.1.html new file mode 100644 index 0000000000..7268c3255f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.1.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.isPointInPath.transform.1 + + + + + + +

                                                                                                                                                                          2d.path.isPointInPath.transform.1

                                                                                                                                                                          +

                                                                                                                                                                          isPointInPath() handles transformations correctly

                                                                                                                                                                          + + +

                                                                                                                                                                          Actual output:

                                                                                                                                                                          +

                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                          + +
                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.2.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.2.html new file mode 100644 index 0000000000..3adac7a419 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.2.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.isPointInPath.transform.2 + + + + + + +

                                                                                                                                                                            2d.path.isPointInPath.transform.2

                                                                                                                                                                            +

                                                                                                                                                                            isPointInPath() handles transformations correctly

                                                                                                                                                                            + + +

                                                                                                                                                                            Actual output:

                                                                                                                                                                            +

                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                            + +
                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.3.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.3.html new file mode 100644 index 0000000000..8769c8a593 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.3.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.isPointInPath.transform.3 + + + + + + +

                                                                                                                                                                              2d.path.isPointInPath.transform.3

                                                                                                                                                                              +

                                                                                                                                                                              isPointInPath() handles transformations correctly

                                                                                                                                                                              + + +

                                                                                                                                                                              Actual output:

                                                                                                                                                                              +

                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                              + +
                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.4.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.4.html new file mode 100644 index 0000000000..1bcc0bc3a3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.4.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.path.isPointInPath.transform.4 + + + + + + +

                                                                                                                                                                                2d.path.isPointInPath.transform.4

                                                                                                                                                                                +

                                                                                                                                                                                isPointInPath() handles transformations correctly

                                                                                                                                                                                + + +

                                                                                                                                                                                Actual output:

                                                                                                                                                                                +

                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                + +
                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.unclosed.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.unclosed.html new file mode 100644 index 0000000000..2e3b711129 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.unclosed.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.path.isPointInPath.unclosed + + + + + + +

                                                                                                                                                                                  2d.path.isPointInPath.unclosed

                                                                                                                                                                                  +

                                                                                                                                                                                  isPointInPath() works on unclosed subpaths

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Actual output:

                                                                                                                                                                                  +

                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                  + +
                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.winding.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.winding.html new file mode 100644 index 0000000000..ec22570797 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInPath.winding.html @@ -0,0 +1,46 @@ + + +Canvas test: 2d.path.isPointInPath.winding + + + + + + +

                                                                                                                                                                                    2d.path.isPointInPath.winding

                                                                                                                                                                                    +

                                                                                                                                                                                    isPointInPath() uses the non-zero winding number rule

                                                                                                                                                                                    + + +

                                                                                                                                                                                    Actual output:

                                                                                                                                                                                    +

                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                    + +
                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInStroke.scaleddashes.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInStroke.scaleddashes.html new file mode 100644 index 0000000000..e27baa1549 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInStroke.scaleddashes.html @@ -0,0 +1,39 @@ + + +Canvas test: 2d.path.isPointInStroke.scaleddashes + + + + + + +

                                                                                                                                                                                      2d.path.isPointInStroke.scaleddashes

                                                                                                                                                                                      +

                                                                                                                                                                                      isPointInStroke() should return correct results on dashed paths at high scale factors

                                                                                                                                                                                      + + +

                                                                                                                                                                                      Actual output:

                                                                                                                                                                                      +

                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                      + +
                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInpath.invalid.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInpath.invalid.html new file mode 100644 index 0000000000..301c7c447d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInpath.invalid.html @@ -0,0 +1,50 @@ + + +Canvas test: 2d.path.isPointInpath.invalid + + + + + + +

                                                                                                                                                                                        2d.path.isPointInpath.invalid

                                                                                                                                                                                        +

                                                                                                                                                                                        Verify isPointInPath throws exceptions with invalid inputs.

                                                                                                                                                                                        + + +

                                                                                                                                                                                        Actual output:

                                                                                                                                                                                        +

                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                        + +
                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInpath.multi.path.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInpath.multi.path.html new file mode 100644 index 0000000000..d71bd8a4c4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.isPointInpath.multi.path.html @@ -0,0 +1,48 @@ + + +Canvas test: 2d.path.isPointInpath.multi.path + + + + + + +

                                                                                                                                                                                          2d.path.isPointInpath.multi.path

                                                                                                                                                                                          +

                                                                                                                                                                                          Verify the winding rule in isPointInPath works for path object.

                                                                                                                                                                                          + + +

                                                                                                                                                                                          Actual output:

                                                                                                                                                                                          +

                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                          + +
                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.lineTo.basic.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.lineTo.basic.html new file mode 100644 index 0000000000..c6f2caa196 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.lineTo.basic.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.path.lineTo.basic + + + + + + +

                                                                                                                                                                                            2d.path.lineTo.basic

                                                                                                                                                                                            +

                                                                                                                                                                                            + + +

                                                                                                                                                                                            Actual output:

                                                                                                                                                                                            +

                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                            +

                                                                                                                                                                                            Expected output:

                                                                                                                                                                                            +

                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.lineTo.ensuresubpath.1.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.lineTo.ensuresubpath.1.html new file mode 100644 index 0000000000..ada8f0ca29 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.lineTo.ensuresubpath.1.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.lineTo.ensuresubpath.1 + + + + + + +

                                                                                                                                                                                              2d.path.lineTo.ensuresubpath.1

                                                                                                                                                                                              +

                                                                                                                                                                                              If there is no subpath, the point is added and nothing is drawn

                                                                                                                                                                                              + + +

                                                                                                                                                                                              Actual output:

                                                                                                                                                                                              +

                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                              +

                                                                                                                                                                                              Expected output:

                                                                                                                                                                                              +

                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.lineTo.ensuresubpath.2.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.lineTo.ensuresubpath.2.html new file mode 100644 index 0000000000..ac1f9238ff --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.lineTo.ensuresubpath.2.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.path.lineTo.ensuresubpath.2 + + + + + + +

                                                                                                                                                                                                2d.path.lineTo.ensuresubpath.2

                                                                                                                                                                                                +

                                                                                                                                                                                                If there is no subpath, the point is added and used for subsequent drawing

                                                                                                                                                                                                + + +

                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                +

                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                +

                                                                                                                                                                                                Expected output:

                                                                                                                                                                                                +

                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.lineTo.nextpoint.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.lineTo.nextpoint.html new file mode 100644 index 0000000000..f403c6b508 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.lineTo.nextpoint.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.path.lineTo.nextpoint + + + + + + +

                                                                                                                                                                                                  2d.path.lineTo.nextpoint

                                                                                                                                                                                                  +

                                                                                                                                                                                                  + + +

                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                  +

                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Expected output:

                                                                                                                                                                                                  +

                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.lineTo.nonfinite.details.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.lineTo.nonfinite.details.html new file mode 100644 index 0000000000..d7595db7d1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.lineTo.nonfinite.details.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.path.lineTo.nonfinite.details + + + + + + +

                                                                                                                                                                                                    2d.path.lineTo.nonfinite.details

                                                                                                                                                                                                    +

                                                                                                                                                                                                    lineTo() with Infinity/NaN for first arg still converts the second arg

                                                                                                                                                                                                    + + +

                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                    +

                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                    +

                                                                                                                                                                                                    Expected output:

                                                                                                                                                                                                    +

                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.lineTo.nonfinite.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.lineTo.nonfinite.html new file mode 100644 index 0000000000..8246064ea3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.lineTo.nonfinite.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.path.lineTo.nonfinite + + + + + + +

                                                                                                                                                                                                      2d.path.lineTo.nonfinite

                                                                                                                                                                                                      +

                                                                                                                                                                                                      lineTo() with Infinity/NaN is ignored

                                                                                                                                                                                                      + + +

                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                      +

                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                      +

                                                                                                                                                                                                      Expected output:

                                                                                                                                                                                                      +

                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.moveTo.basic.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.moveTo.basic.html new file mode 100644 index 0000000000..d08d67621e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.moveTo.basic.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.path.moveTo.basic + + + + + + +

                                                                                                                                                                                                        2d.path.moveTo.basic

                                                                                                                                                                                                        +

                                                                                                                                                                                                        + + +

                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                        +

                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                        +

                                                                                                                                                                                                        Expected output:

                                                                                                                                                                                                        +

                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.moveTo.multiple.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.moveTo.multiple.html new file mode 100644 index 0000000000..384d9fb437 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.moveTo.multiple.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.path.moveTo.multiple + + + + + + +

                                                                                                                                                                                                          2d.path.moveTo.multiple

                                                                                                                                                                                                          +

                                                                                                                                                                                                          + + +

                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                          +

                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                          +

                                                                                                                                                                                                          Expected output:

                                                                                                                                                                                                          +

                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.moveTo.newsubpath.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.moveTo.newsubpath.html new file mode 100644 index 0000000000..2a3d69b637 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.moveTo.newsubpath.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.path.moveTo.newsubpath + + + + + + +

                                                                                                                                                                                                            2d.path.moveTo.newsubpath

                                                                                                                                                                                                            +

                                                                                                                                                                                                            + + +

                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                            +

                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                            +

                                                                                                                                                                                                            Expected output:

                                                                                                                                                                                                            +

                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.moveTo.nonfinite.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.moveTo.nonfinite.html new file mode 100644 index 0000000000..c6cd6f8178 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.moveTo.nonfinite.html @@ -0,0 +1,39 @@ + + +Canvas test: 2d.path.moveTo.nonfinite + + + + + + +

                                                                                                                                                                                                              2d.path.moveTo.nonfinite

                                                                                                                                                                                                              +

                                                                                                                                                                                                              moveTo() with Infinity/NaN is ignored

                                                                                                                                                                                                              + + +

                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                              +

                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                              +

                                                                                                                                                                                                              Expected output:

                                                                                                                                                                                                              +

                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.basic.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.basic.html new file mode 100644 index 0000000000..ffbf039440 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.basic.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.path.quadraticCurveTo.basic + + + + + + +

                                                                                                                                                                                                                2d.path.quadraticCurveTo.basic

                                                                                                                                                                                                                +

                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                +

                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                +

                                                                                                                                                                                                                Expected output:

                                                                                                                                                                                                                +

                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.ensuresubpath.1.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.ensuresubpath.1.html new file mode 100644 index 0000000000..f8b8b515ba --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.ensuresubpath.1.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.path.quadraticCurveTo.ensuresubpath.1 + + + + + + +

                                                                                                                                                                                                                  2d.path.quadraticCurveTo.ensuresubpath.1

                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  If there is no subpath, the first control point is added (and nothing is drawn up to it)

                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  Expected output:

                                                                                                                                                                                                                  +

                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.ensuresubpath.2.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.ensuresubpath.2.html new file mode 100644 index 0000000000..189c744c65 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.ensuresubpath.2.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.path.quadraticCurveTo.ensuresubpath.2 + + + + + + +

                                                                                                                                                                                                                    2d.path.quadraticCurveTo.ensuresubpath.2

                                                                                                                                                                                                                    +

                                                                                                                                                                                                                    If there is no subpath, the first control point is added

                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                    +

                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                    +

                                                                                                                                                                                                                    Expected output:

                                                                                                                                                                                                                    +

                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.nonfinite.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.nonfinite.html new file mode 100644 index 0000000000..1488e78a00 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.nonfinite.html @@ -0,0 +1,56 @@ + + +Canvas test: 2d.path.quadraticCurveTo.nonfinite + + + + + + +

                                                                                                                                                                                                                      2d.path.quadraticCurveTo.nonfinite

                                                                                                                                                                                                                      +

                                                                                                                                                                                                                      quadraticCurveTo() with Infinity/NaN is ignored

                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                      +

                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                      +

                                                                                                                                                                                                                      Expected output:

                                                                                                                                                                                                                      +

                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.scaled.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.scaled.html new file mode 100644 index 0000000000..90973a8f97 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.scaled.html @@ -0,0 +1,39 @@ + + +Canvas test: 2d.path.quadraticCurveTo.scaled + + + + + + +

                                                                                                                                                                                                                        2d.path.quadraticCurveTo.scaled

                                                                                                                                                                                                                        +

                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                        +

                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                        +

                                                                                                                                                                                                                        Expected output:

                                                                                                                                                                                                                        +

                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.shape.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.shape.html new file mode 100644 index 0000000000..23725c2421 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.shape.html @@ -0,0 +1,38 @@ + + +Canvas test: 2d.path.quadraticCurveTo.shape + + + + + + +

                                                                                                                                                                                                                          2d.path.quadraticCurveTo.shape

                                                                                                                                                                                                                          +

                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                          +

                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                          +

                                                                                                                                                                                                                          Expected output:

                                                                                                                                                                                                                          +

                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.basic.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.basic.html new file mode 100644 index 0000000000..716cd29af7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.basic.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.path.rect.basic + + + + + + +

                                                                                                                                                                                                                            2d.path.rect.basic

                                                                                                                                                                                                                            +

                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                            +

                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                            +

                                                                                                                                                                                                                            Expected output:

                                                                                                                                                                                                                            +

                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.closed.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.closed.html new file mode 100644 index 0000000000..385a88ab7e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.closed.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.rect.closed + + + + + + +

                                                                                                                                                                                                                              2d.path.rect.closed

                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              Expected output:

                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.end.1.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.end.1.html new file mode 100644 index 0000000000..e1fd8052d8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.end.1.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.rect.end.1 + + + + + + +

                                                                                                                                                                                                                                2d.path.rect.end.1

                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                Expected output:

                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.end.2.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.end.2.html new file mode 100644 index 0000000000..d30bb111f1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.end.2.html @@ -0,0 +1,38 @@ + + +Canvas test: 2d.path.rect.end.2 + + + + + + +

                                                                                                                                                                                                                                  2d.path.rect.end.2

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Expected output:

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.negative.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.negative.html new file mode 100644 index 0000000000..b917137bae --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.negative.html @@ -0,0 +1,38 @@ + + +Canvas test: 2d.path.rect.negative + + + + + + +

                                                                                                                                                                                                                                    2d.path.rect.negative

                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.newsubpath.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.newsubpath.html new file mode 100644 index 0000000000..32b70ff2d8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.newsubpath.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.path.rect.newsubpath + + + + + + +

                                                                                                                                                                                                                                      2d.path.rect.newsubpath

                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                      Expected output:

                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.nonfinite.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.nonfinite.html new file mode 100644 index 0000000000..c0d245a49c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.nonfinite.html @@ -0,0 +1,56 @@ + + +Canvas test: 2d.path.rect.nonfinite + + + + + + +

                                                                                                                                                                                                                                        2d.path.rect.nonfinite

                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        rect() with Infinity/NaN is ignored

                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        Expected output:

                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.selfintersect.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.selfintersect.html new file mode 100644 index 0000000000..8ebbf0c1f5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.selfintersect.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.rect.selfintersect + + + + + + +

                                                                                                                                                                                                                                          2d.path.rect.selfintersect

                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                          Expected output:

                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.winding.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.winding.html new file mode 100644 index 0000000000..d7350ef38c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.winding.html @@ -0,0 +1,38 @@ + + +Canvas test: 2d.path.rect.winding + + + + + + +

                                                                                                                                                                                                                                            2d.path.rect.winding

                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.zero.1.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.zero.1.html new file mode 100644 index 0000000000..c773ef61d0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.zero.1.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.rect.zero.1 + + + + + + +

                                                                                                                                                                                                                                              2d.path.rect.zero.1

                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                              Expected output:

                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.zero.2.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.zero.2.html new file mode 100644 index 0000000000..5888231fc6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.zero.2.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.rect.zero.2 + + + + + + +

                                                                                                                                                                                                                                                2d.path.rect.zero.2

                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                Expected output:

                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.zero.3.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.zero.3.html new file mode 100644 index 0000000000..c000b008fb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.zero.3.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.rect.zero.3 + + + + + + +

                                                                                                                                                                                                                                                  2d.path.rect.zero.3

                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  Expected output:

                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.zero.4.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.zero.4.html new file mode 100644 index 0000000000..bb3ecb3aa5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.zero.4.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.rect.zero.4 + + + + + + +

                                                                                                                                                                                                                                                    2d.path.rect.zero.4

                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                    Expected output:

                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.zero.5.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.zero.5.html new file mode 100644 index 0000000000..081c753d91 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.zero.5.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.rect.zero.5 + + + + + + +

                                                                                                                                                                                                                                                      2d.path.rect.zero.5

                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      Expected output:

                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.zero.6.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.zero.6.html new file mode 100644 index 0000000000..dafb273d56 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.rect.zero.6.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.path.rect.zero.6 + + + + + + +

                                                                                                                                                                                                                                                        2d.path.rect.zero.6

                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                        Expected output:

                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompoint.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompoint.html new file mode 100644 index 0000000000..3bb890ae96 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompoint.html @@ -0,0 +1,54 @@ + + +Canvas test: 2d.path.roundrect.1.radius.dompoint + + + + + + +

                                                                                                                                                                                                                                                          2d.path.roundrect.1.radius.dompoint

                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          Verify that when one radius is given to roundRect(), specified as a DOMPoint, it applies to all corners.

                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.html new file mode 100644 index 0000000000..96e933870b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.html @@ -0,0 +1,54 @@ + + +Canvas test: 2d.path.roundrect.1.radius.dompoint.single argument + + + + + + +

                                                                                                                                                                                                                                                            2d.path.roundrect.1.radius.dompoint.single argument

                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            Verify that when one radius is given to roundRect() as a non-array argument, specified as a DOMPoint, it applies to all corners.

                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompointinit.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompointinit.html new file mode 100644 index 0000000000..1315233d79 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompointinit.html @@ -0,0 +1,54 @@ + + +Canvas test: 2d.path.roundrect.1.radius.dompointinit + + + + + + +

                                                                                                                                                                                                                                                              2d.path.roundrect.1.radius.dompointinit

                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                              Verify that when one radius is given to roundRect(), specified as a DOMPointInit, applies to all corners.

                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.html new file mode 100644 index 0000000000..f5c6d00959 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.html @@ -0,0 +1,54 @@ + + +Canvas test: 2d.path.roundrect.1.radius.dompointinit.single.argument + + + + + + +

                                                                                                                                                                                                                                                                2d.path.roundrect.1.radius.dompointinit.single.argument

                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                Verify that when one radius is given to roundRect() as a non-array argument, specified as a DOMPointInit, applies to all corners.

                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.double.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.double.html new file mode 100644 index 0000000000..402631a7a0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.double.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.path.roundrect.1.radius.double + + + + + + +

                                                                                                                                                                                                                                                                  2d.path.roundrect.1.radius.double

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Verify that when one radius is given to roundRect(), specified as a double, it applies to all corners.

                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.double.single.argument.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.double.single.argument.html new file mode 100644 index 0000000000..ed4887c2de --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.double.single.argument.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.path.roundrect.1.radius.double.single.argument + + + + + + +

                                                                                                                                                                                                                                                                    2d.path.roundrect.1.radius.double.single.argument

                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    Verify that when one radius is given to roundRect() as a non-array argument, specified as a double, it applies to all corners.

                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.1.dompoint.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.1.dompoint.html new file mode 100644 index 0000000000..00a9c14582 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.1.dompoint.html @@ -0,0 +1,46 @@ + + +Canvas test: 2d.path.roundrect.2.radii.1.dompoint + + + + + + +

                                                                                                                                                                                                                                                                      2d.path.roundrect.2.radii.1.dompoint

                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left and bottom-right corners.

                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.1.dompointinit.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.1.dompointinit.html new file mode 100644 index 0000000000..e9b3a7bf79 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.1.dompointinit.html @@ -0,0 +1,46 @@ + + +Canvas test: 2d.path.roundrect.2.radii.1.dompointinit + + + + + + +

                                                                                                                                                                                                                                                                        2d.path.roundrect.2.radii.1.dompointinit

                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                        Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left and bottom-right corners.

                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.1.double.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.1.double.html new file mode 100644 index 0000000000..a2f02104e2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.1.double.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.path.roundrect.2.radii.1.double + + + + + + +

                                                                                                                                                                                                                                                                          2d.path.roundrect.2.radii.1.double

                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                          Verify that when two radii are given to roundRect(), the first radius, specified as a double, applies to the top-left and bottom-right corners.

                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.2.dompoint.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.2.dompoint.html new file mode 100644 index 0000000000..57df30d5ae --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.2.dompoint.html @@ -0,0 +1,46 @@ + + +Canvas test: 2d.path.roundrect.2.radii.2.dompoint + + + + + + +

                                                                                                                                                                                                                                                                            2d.path.roundrect.2.radii.2.dompoint

                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                            Verify that when two radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottom-left corners.

                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.2.dompointinit.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.2.dompointinit.html new file mode 100644 index 0000000000..5942ab750f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.2.dompointinit.html @@ -0,0 +1,46 @@ + + +Canvas test: 2d.path.roundrect.2.radii.2.dompointinit + + + + + + +

                                                                                                                                                                                                                                                                              2d.path.roundrect.2.radii.2.dompointinit

                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                              Verify that when two radii are given to roundRect(), the second radius, specified as a DOMPointInit, applies to the top-right and bottom-left corners.

                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.2.double.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.2.double.html new file mode 100644 index 0000000000..2390a61dfd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.2.double.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.path.roundrect.2.radii.2.double + + + + + + +

                                                                                                                                                                                                                                                                                2d.path.roundrect.2.radii.2.double

                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                Verify that when two radii are given to roundRect(), the second radius, specified as a double, applies to the top-right and bottom-left corners.

                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.1.dompoint.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.1.dompoint.html new file mode 100644 index 0000000000..f4fa76afac --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.1.dompoint.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.path.roundrect.3.radii.1.dompoint + + + + + + +

                                                                                                                                                                                                                                                                                  2d.path.roundrect.3.radii.1.dompoint

                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  Verify that when three radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left corner.

                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.1.dompointinit.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.1.dompointinit.html new file mode 100644 index 0000000000..4e7dc947f4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.1.dompointinit.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.path.roundrect.3.radii.1.dompointinit + + + + + + +

                                                                                                                                                                                                                                                                                    2d.path.roundrect.3.radii.1.dompointinit

                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Verify that when three radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left corner.

                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.1.double.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.1.double.html new file mode 100644 index 0000000000..d7888da6d9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.1.double.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.path.roundrect.3.radii.1.double + + + + + + +

                                                                                                                                                                                                                                                                                      2d.path.roundrect.3.radii.1.double

                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                      Verify that when three radii are given to roundRect(), the first radius, specified as a double, applies to the top-left corner.

                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.2.dompoint.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.2.dompoint.html new file mode 100644 index 0000000000..38a8baac53 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.2.dompoint.html @@ -0,0 +1,46 @@ + + +Canvas test: 2d.path.roundrect.3.radii.2.dompoint + + + + + + +

                                                                                                                                                                                                                                                                                        2d.path.roundrect.3.radii.2.dompoint

                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                        Verify that when three radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottom-left corners.

                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.2.dompointinit.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.2.dompointinit.html new file mode 100644 index 0000000000..5e867caf42 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.2.dompointinit.html @@ -0,0 +1,46 @@ + + +Canvas test: 2d.path.roundrect.3.radii.2.dompointinit + + + + + + +

                                                                                                                                                                                                                                                                                          2d.path.roundrect.3.radii.2.dompointinit

                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          Verify that when three radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottom-left corners.

                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.2.double.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.2.double.html new file mode 100644 index 0000000000..41edff205c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.2.double.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.path.roundrect.3.radii.2.double + + + + + + +

                                                                                                                                                                                                                                                                                            2d.path.roundrect.3.radii.2.double

                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            Verify that when three radii are given to roundRect(), the second radius, specified as a double, applies to the top-right and bottom-left corners.

                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.3.dompoint.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.3.dompoint.html new file mode 100644 index 0000000000..6d6a1a6ae0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.3.dompoint.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.path.roundrect.3.radii.3.dompoint + + + + + + +

                                                                                                                                                                                                                                                                                              2d.path.roundrect.3.radii.3.dompoint

                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              Verify that when three radii are given to roundRect(), the third radius, specified as a DOMPoint, applies to the bottom-right corner.

                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.3.dompointinit.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.3.dompointinit.html new file mode 100644 index 0000000000..132420e343 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.3.dompointinit.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.path.roundrect.3.radii.3.dompointinit + + + + + + +

                                                                                                                                                                                                                                                                                                2d.path.roundrect.3.radii.3.dompointinit

                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                Verify that when three radii are given to roundRect(), the third radius, specified as a DOMPointInit, applies to the bottom-right corner.

                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.3.double.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.3.double.html new file mode 100644 index 0000000000..75a8e924ff --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.3.double.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.path.roundrect.3.radii.3.double + + + + + + +

                                                                                                                                                                                                                                                                                                  2d.path.roundrect.3.radii.3.double

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Verify that when three radii are given to roundRect(), the third radius, specified as a double, applies to the bottom-right corner.

                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.1.dompoint.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.1.dompoint.html new file mode 100644 index 0000000000..b681b59f4e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.1.dompoint.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.path.roundrect.4.radii.1.dompoint + + + + + + +

                                                                                                                                                                                                                                                                                                    2d.path.roundrect.4.radii.1.dompoint

                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    Verify that when four radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left corner.

                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.1.dompointinit.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.1.dompointinit.html new file mode 100644 index 0000000000..e5542894b3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.1.dompointinit.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.path.roundrect.4.radii.1.dompointinit + + + + + + +

                                                                                                                                                                                                                                                                                                      2d.path.roundrect.4.radii.1.dompointinit

                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      Verify that when four radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left corner.

                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.1.double.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.1.double.html new file mode 100644 index 0000000000..028effa82b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.1.double.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.path.roundrect.4.radii.1.double + + + + + + +

                                                                                                                                                                                                                                                                                                        2d.path.roundrect.4.radii.1.double

                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        Verify that when four radii are given to roundRect(), the first radius, specified as a double, applies to the top-left corner.

                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.2.dompoint.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.2.dompoint.html new file mode 100644 index 0000000000..d3c16eb493 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.2.dompoint.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.path.roundrect.4.radii.2.dompoint + + + + + + +

                                                                                                                                                                                                                                                                                                          2d.path.roundrect.4.radii.2.dompoint

                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                          Verify that when four radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right corner.

                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.2.dompointinit.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.2.dompointinit.html new file mode 100644 index 0000000000..ab5ad3f4da --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.2.dompointinit.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.path.roundrect.4.radii.2.dompointinit + + + + + + +

                                                                                                                                                                                                                                                                                                            2d.path.roundrect.4.radii.2.dompointinit

                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            Verify that when four radii are given to roundRect(), the second radius, specified as a DOMPointInit, applies to the top-right corner.

                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.2.double.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.2.double.html new file mode 100644 index 0000000000..ec229e396a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.2.double.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.path.roundrect.4.radii.2.double + + + + + + +

                                                                                                                                                                                                                                                                                                              2d.path.roundrect.4.radii.2.double

                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              Verify that when four radii are given to roundRect(), the second radius, specified as a double, applies to the top-right corner.

                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.3.dompoint.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.3.dompoint.html new file mode 100644 index 0000000000..5367543fa3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.3.dompoint.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.path.roundrect.4.radii.3.dompoint + + + + + + +

                                                                                                                                                                                                                                                                                                                2d.path.roundrect.4.radii.3.dompoint

                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                Verify that when four radii are given to roundRect(), the third radius, specified as a DOMPoint, applies to the bottom-right corner.

                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.3.dompointinit.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.3.dompointinit.html new file mode 100644 index 0000000000..89df524d53 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.3.dompointinit.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.path.roundrect.4.radii.3.dompointinit + + + + + + +

                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.4.radii.3.dompointinit

                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                  Verify that when four radii are given to roundRect(), the third radius, specified as a DOMPointInit, applies to the bottom-right corner.

                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.3.double.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.3.double.html new file mode 100644 index 0000000000..22ba747b37 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.3.double.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.path.roundrect.4.radii.3.double + + + + + + +

                                                                                                                                                                                                                                                                                                                    2d.path.roundrect.4.radii.3.double

                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                    Verify that when four radii are given to roundRect(), the third radius, specified as a double, applies to the bottom-right corner.

                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.4.dompoint.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.4.dompoint.html new file mode 100644 index 0000000000..b15c291884 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.4.dompoint.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.path.roundrect.4.radii.4.dompoint + + + + + + +

                                                                                                                                                                                                                                                                                                                      2d.path.roundrect.4.radii.4.dompoint

                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                      Verify that when four radii are given to roundRect(), the fourth radius, specified as a DOMPoint, applies to the bottom-left corner.

                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.4.dompointinit.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.4.dompointinit.html new file mode 100644 index 0000000000..d9b03a1225 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.4.dompointinit.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.path.roundrect.4.radii.4.dompointinit + + + + + + +

                                                                                                                                                                                                                                                                                                                        2d.path.roundrect.4.radii.4.dompointinit

                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                        Verify that when four radii are given to roundRect(), the fourth radius, specified as a DOMPointInit, applies to the bottom-left corner.

                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.4.double.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.4.double.html new file mode 100644 index 0000000000..62ccf85958 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.4.double.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.path.roundrect.4.radii.4.double + + + + + + +

                                                                                                                                                                                                                                                                                                                          2d.path.roundrect.4.radii.4.double

                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                          Verify that when four radii are given to roundRect(), the fourth radius, specified as a double, applies to the bottom-left corner.

                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.badinput.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.badinput.html new file mode 100644 index 0000000000..39e1d0c655 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.badinput.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.roundrect.badinput + + + + + + +

                                                                                                                                                                                                                                                                                                                            2d.path.roundrect.badinput

                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                            roundRect() throws or does not throw errors given the strange inputs.

                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.closed.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.closed.html new file mode 100644 index 0000000000..89aeb3b865 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.closed.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.roundrect.closed + + + + + + +

                                                                                                                                                                                                                                                                                                                              2d.path.roundrect.closed

                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                              Expected output:

                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.end.1.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.end.1.html new file mode 100644 index 0000000000..be98ce5841 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.end.1.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.roundrect.end.1 + + + + + + +

                                                                                                                                                                                                                                                                                                                                2d.path.roundrect.end.1

                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                Expected output:

                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.end.2.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.end.2.html new file mode 100644 index 0000000000..16131ad345 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.end.2.html @@ -0,0 +1,38 @@ + + +Canvas test: 2d.path.roundrect.end.2 + + + + + + +

                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.end.2

                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                  Expected output:

                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.end.3.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.end.3.html new file mode 100644 index 0000000000..f9454080eb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.end.3.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.path.roundrect.end.3 + + + + + + +

                                                                                                                                                                                                                                                                                                                                    2d.path.roundrect.end.3

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Expected output:

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.end.4.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.end.4.html new file mode 100644 index 0000000000..52d49c32e7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.end.4.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.path.roundrect.end.4 + + + + + + +

                                                                                                                                                                                                                                                                                                                                      2d.path.roundrect.end.4

                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                      Expected output:

                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.negative.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.negative.html new file mode 100644 index 0000000000..66e1172432 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.negative.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.path.roundrect.negative + + + + + + +

                                                                                                                                                                                                                                                                                                                                        2d.path.roundrect.negative

                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.newsubpath.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.newsubpath.html new file mode 100644 index 0000000000..df3990a376 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.newsubpath.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.path.roundrect.newsubpath + + + + + + +

                                                                                                                                                                                                                                                                                                                                          2d.path.roundrect.newsubpath

                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                          Expected output:

                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.nonfinite.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.nonfinite.html new file mode 100644 index 0000000000..5f0f0b6eaf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.nonfinite.html @@ -0,0 +1,115 @@ + + +Canvas test: 2d.path.roundrect.nonfinite + + + + + + +

                                                                                                                                                                                                                                                                                                                                            2d.path.roundrect.nonfinite

                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                            roundRect() with Infinity/NaN is ignored

                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                            Expected output:

                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.radius.intersecting.1.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.radius.intersecting.1.html new file mode 100644 index 0000000000..913b17e45e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.radius.intersecting.1.html @@ -0,0 +1,39 @@ + + +Canvas test: 2d.path.roundrect.radius.intersecting.1 + + + + + + +

                                                                                                                                                                                                                                                                                                                                              2d.path.roundrect.radius.intersecting.1

                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                              Check that roundRects with intersecting corner arcs are rendered correctly.

                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.radius.intersecting.2.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.radius.intersecting.2.html new file mode 100644 index 0000000000..abd7f86088 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.radius.intersecting.2.html @@ -0,0 +1,39 @@ + + +Canvas test: 2d.path.roundrect.radius.intersecting.2 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                2d.path.roundrect.radius.intersecting.2

                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                Check that roundRects with intersecting corner arcs are rendered correctly.

                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.radius.negative.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.radius.negative.html new file mode 100644 index 0000000000..ac2532dcfe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.radius.negative.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.path.roundrect.radius.negative + + + + + + +

                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.radius.negative

                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                  roundRect() with negative radius throws an exception

                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.radius.noargument.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.radius.noargument.html new file mode 100644 index 0000000000..cfaf87ecf2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.radius.noargument.html @@ -0,0 +1,49 @@ + + +Canvas test: 2d.path.roundrect.radius.noargument + + + + + + +

                                                                                                                                                                                                                                                                                                                                                    2d.path.roundrect.radius.noargument

                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                    Check that roundRect draws a rectangle when no radii are provided.

                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.radius.noarugment.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.radius.noarugment.html new file mode 100644 index 0000000000..08f576b379 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.radius.noarugment.html @@ -0,0 +1,49 @@ + + +Canvas test: 2d.path.roundrect.radius.noarugment + + + + + + +

                                                                                                                                                                                                                                                                                                                                                      2d.path.roundrect.radius.noarugment

                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      Check that roundRect draws a rectangle when no radii are provided.

                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                        + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.radius.none.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.radius.none.html new file mode 100644 index 0000000000..8363285ffc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.radius.none.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.path.roundrect.radius.none + + + + + + +

                                                                                                                                                                                                                                                                                                                                                        2d.path.roundrect.radius.none

                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                        Check that roundRect throws an RangeError if radii is an empty array.

                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.radius.toomany.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.radius.toomany.html new file mode 100644 index 0000000000..d8fe4bb45c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.radius.toomany.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.path.roundrect.radius.toomany + + + + + + +

                                                                                                                                                                                                                                                                                                                                                          2d.path.roundrect.radius.toomany

                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          Check that roundRect throws an IndeSizeError if radii has more than four items.

                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.selfintersect.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.selfintersect.html new file mode 100644 index 0000000000..7a69aaf4c6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.selfintersect.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.roundrect.selfintersect + + + + + + +

                                                                                                                                                                                                                                                                                                                                                            2d.path.roundrect.selfintersect

                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            Expected output:

                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.winding.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.winding.html new file mode 100644 index 0000000000..9c1f985eb9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.winding.html @@ -0,0 +1,38 @@ + + +Canvas test: 2d.path.roundrect.winding + + + + + + +

                                                                                                                                                                                                                                                                                                                                                              2d.path.roundrect.winding

                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.zero.1.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.zero.1.html new file mode 100644 index 0000000000..4e9a804dc2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.zero.1.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.roundrect.zero.1 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                2d.path.roundrect.zero.1

                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                Expected output:

                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.zero.2.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.zero.2.html new file mode 100644 index 0000000000..ac64fa7818 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.zero.2.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.roundrect.zero.2 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.zero.2

                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                  Expected output:

                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.zero.3.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.zero.3.html new file mode 100644 index 0000000000..a807715b35 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.zero.3.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.roundrect.zero.3 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                    2d.path.roundrect.zero.3

                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                    Expected output:

                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.zero.4.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.zero.4.html new file mode 100644 index 0000000000..fc51918c27 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.zero.4.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.roundrect.zero.4 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                      2d.path.roundrect.zero.4

                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      Expected output:

                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.zero.5.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.zero.5.html new file mode 100644 index 0000000000..de7d41b68f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.zero.5.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.path.roundrect.zero.5 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                        2d.path.roundrect.zero.5

                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        Expected output:

                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.zero.6.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.zero.6.html new file mode 100644 index 0000000000..1e8e338a73 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.roundrect.zero.6.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.path.roundrect.zero.6 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                          2d.path.roundrect.zero.6

                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                          Expected output:

                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.empty.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.empty.html new file mode 100644 index 0000000000..aa459ec986 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.empty.html @@ -0,0 +1,39 @@ + + +Canvas test: 2d.path.stroke.empty + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                            2d.path.stroke.empty

                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                            Empty subpaths are not stroked

                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                            Expected output:

                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.overlap.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.overlap.html new file mode 100644 index 0000000000..a577f22769 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.overlap.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.path.stroke.overlap + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                              2d.path.stroke.overlap

                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                              Stroked subpaths are combined before being drawn

                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                              Expected output:

                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.overlap.png b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.overlap.png new file mode 100644 index 0000000000..e2a35d48d4 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.overlap.png differ diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.prune.arc.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.prune.arc.html new file mode 100644 index 0000000000..6474a15424 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.prune.arc.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.path.stroke.prune.arc + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                2d.path.stroke.prune.arc

                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                Zero-length line segments from arcTo and arc are removed before stroking

                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                Expected output:

                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.prune.closed.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.prune.closed.html new file mode 100644 index 0000000000..16b46852a1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.prune.closed.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.path.stroke.prune.closed + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                  2d.path.stroke.prune.closed

                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                  Zero-length line segments from closed paths are removed before stroking

                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                  Expected output:

                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.prune.corner.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.prune.corner.html new file mode 100644 index 0000000000..226fccc6d4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.prune.corner.html @@ -0,0 +1,42 @@ + + +Canvas test: 2d.path.stroke.prune.corner + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                    2d.path.stroke.prune.corner

                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                    Zero-length line segments are removed before stroking with miters

                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                    Expected output:

                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.prune.curve.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.prune.curve.html new file mode 100644 index 0000000000..8023b7b3f9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.prune.curve.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.path.stroke.prune.curve + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                      2d.path.stroke.prune.curve

                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      Zero-length line segments from quadraticCurveTo and bezierCurveTo are removed before stroking

                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      Expected output:

                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.prune.line.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.prune.line.html new file mode 100644 index 0000000000..97f88847c0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.prune.line.html @@ -0,0 +1,39 @@ + + +Canvas test: 2d.path.stroke.prune.line + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                        2d.path.stroke.prune.line

                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                        Zero-length line segments from lineTo are removed before stroking

                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                        Expected output:

                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.prune.rect.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.prune.rect.html new file mode 100644 index 0000000000..bf1fc9aa20 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.prune.rect.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.path.stroke.prune.rect + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                          2d.path.stroke.prune.rect

                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                          Zero-length line segments from rect and strokeRect are removed before stroking

                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                          Expected output:

                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.scale1.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.scale1.html new file mode 100644 index 0000000000..3e4651ec4a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.scale1.html @@ -0,0 +1,53 @@ + + +Canvas test: 2d.path.stroke.scale1 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                            2d.path.stroke.scale1

                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                            Stroke line widths are scaled by the current transformation matrix

                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                            Expected output:

                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.scale2.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.scale2.html new file mode 100644 index 0000000000..099efec76c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.scale2.html @@ -0,0 +1,55 @@ + + +Canvas test: 2d.path.stroke.scale2 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                              2d.path.stroke.scale2

                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                              Stroke line widths are scaled by the current transformation matrix

                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                              Expected output:

                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.skew.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.skew.html new file mode 100644 index 0000000000..86f3eebf1d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.skew.html @@ -0,0 +1,69 @@ + + +Canvas test: 2d.path.stroke.skew + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                2d.path.stroke.skew

                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                Strokes lines are skewed by the current transformation matrix

                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.unaffected.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.unaffected.html new file mode 100644 index 0000000000..8e6b41946f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.unaffected.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.path.stroke.unaffected + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.stroke.unaffected

                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  Stroking does not start a new path or subpath

                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.union.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.union.html new file mode 100644 index 0000000000..73198ab24d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.stroke.union.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.path.stroke.union + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                    2d.path.stroke.union

                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    Strokes in opposite directions are unioned, not subtracted

                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.transformation.basic.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.transformation.basic.html new file mode 100644 index 0000000000..1cdc81e4f6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.transformation.basic.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.path.transformation.basic + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                      2d.path.transformation.basic

                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                      Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.transformation.changing.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.transformation.changing.html new file mode 100644 index 0000000000..8f711b6b9a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.transformation.changing.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.path.transformation.changing + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                        2d.path.transformation.changing

                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                        Transformations are applied while building paths, not when drawing

                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                        Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.transformation.multiple.html b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.transformation.multiple.html new file mode 100644 index 0000000000..af06c06371 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/path-objects/2d.path.transformation.multiple.html @@ -0,0 +1,46 @@ + + +Canvas test: 2d.path.transformation.multiple + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                          2d.path.transformation.multiple

                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          Transformations are applied while building paths, not when drawing

                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create.and.resize.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create.and.resize.html new file mode 100644 index 0000000000..1ecd3fbd65 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create.and.resize.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.imageData.create.and.resize + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                            2d.imageData.create.and.resize

                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            Verify no crash when resizing an image bitmap to zero.

                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                              + + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.basic.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.basic.html new file mode 100644 index 0000000000..1ea73690e8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.basic.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.imageData.create1.basic + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                              2d.imageData.create1.basic

                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                              createImageData(imgdata) exists and returns something

                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.initial.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.initial.html new file mode 100644 index 0000000000..8709623a0c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.initial.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.imageData.create1.initial + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                2d.imageData.create1.initial

                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                createImageData(imgdata) returns transparent black data of the right size

                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.this.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.this.html new file mode 100644 index 0000000000..dd4b80ec08 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.this.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.imageData.create1.this + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.create1.this

                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  createImageData(imgdata) should throw when called with the wrong |this|

                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in "Web IDL" (draft) +

                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.type.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.type.html new file mode 100644 index 0000000000..36f3db99be --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.type.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.imageData.create1.type + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                    2d.imageData.create1.type

                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    createImageData(imgdata) returns an ImageData object containing a Uint8ClampedArray object

                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.zero.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.zero.html new file mode 100644 index 0000000000..02619376a1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.zero.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.imageData.create1.zero + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                      2d.imageData.create1.zero

                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      createImageData(null) throws TypeError

                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.basic.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.basic.html new file mode 100644 index 0000000000..807b6dbfa2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.basic.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.imageData.create2.basic + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                        2d.imageData.create2.basic

                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                        createImageData(sw, sh) exists and returns something

                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.double.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.double.html new file mode 100644 index 0000000000..31aa42d5a8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.double.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.imageData.create2.double + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                          2d.imageData.create2.double

                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                          createImageData(w, h) double is converted to long

                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.initial.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.initial.html new file mode 100644 index 0000000000..c2a69b4c06 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.initial.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.imageData.create2.initial + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                            2d.imageData.create2.initial

                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            createImageData(sw, sh) returns transparent black data of the right size

                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.large.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.large.html new file mode 100644 index 0000000000..73b2a1c19f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.large.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.imageData.create2.large + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                              2d.imageData.create2.large

                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                              createImageData(sw, sh) works for sizes much larger than the canvas

                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.negative.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.negative.html new file mode 100644 index 0000000000..7c4a3944eb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.negative.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.imageData.create2.negative + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                2d.imageData.create2.negative

                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                createImageData(sw, sh) takes the absolute magnitude of the size arguments

                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.nonfinite.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.nonfinite.html new file mode 100644 index 0000000000..af30dc9124 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.nonfinite.html @@ -0,0 +1,42 @@ + + +Canvas test: 2d.imageData.create2.nonfinite + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.create2.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                  createImageData() throws TypeError if arguments are not finite

                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in "Web IDL" (draft) +

                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.round.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.round.html new file mode 100644 index 0000000000..c62243f418 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.round.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.imageData.create2.round + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.imageData.create2.round

                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    createImageData(w, h) is rounded the same as getImageData(0, 0, w, h)

                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.this.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.this.html new file mode 100644 index 0000000000..f5373d0edd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.this.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.imageData.create2.this + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.imageData.create2.this

                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                      createImageData(sw, sh) should throw when called with the wrong |this|

                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in "Web IDL" (draft) +

                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.type.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.type.html new file mode 100644 index 0000000000..d595d33845 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.type.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.imageData.create2.type + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.imageData.create2.type

                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                        createImageData(sw, sh) returns an ImageData object containing a Uint8ClampedArray object

                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.zero.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.zero.html new file mode 100644 index 0000000000..cc949162d3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.zero.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.imageData.create2.zero + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.imageData.create2.zero

                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                          createImageData(sw, sh) throws INDEX_SIZE_ERR if size is zero

                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.basic.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.basic.html new file mode 100644 index 0000000000..5f8f199540 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.basic.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.imageData.get.basic + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.imageData.get.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                            getImageData() exists and returns something

                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.clamp.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.clamp.html new file mode 100644 index 0000000000..0047e910b7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.clamp.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.imageData.get.clamp + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.imageData.get.clamp

                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                              getImageData() clamps colors to the range [0, 255]

                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.double.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.double.html new file mode 100644 index 0000000000..5cea5fcbc2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.double.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.imageData.get.double + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.imageData.get.double

                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                createImageData(w, h) double is converted to long

                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.invalid.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.invalid.html new file mode 100644 index 0000000000..689e72f69b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.invalid.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.imageData.get.invalid + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.get.invalid

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify getImageData() behavior in invalid cases.

                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.large.crash.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.large.crash.html new file mode 100644 index 0000000000..f41eec7b9b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.large.crash.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.imageData.get.large.crash + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.imageData.get.large.crash

                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Test that canvas crash when image data cannot be allocated.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.length.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.length.html new file mode 100644 index 0000000000..41b9832025 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.length.html @@ -0,0 +1,27 @@ + + +Canvas test: 2d.imageData.get.length + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.imageData.get.length

                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      getImageData() returns a correctly-sized Uint8ClampedArray

                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.nonfinite.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.nonfinite.html new file mode 100644 index 0000000000..a80e905cfd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.nonfinite.html @@ -0,0 +1,74 @@ + + +Canvas test: 2d.imageData.get.nonfinite + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.imageData.get.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                        getImageData() throws TypeError if arguments are not finite

                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in "Web IDL" (draft) +

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.nonpremul.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.nonpremul.html new file mode 100644 index 0000000000..bc833c2198 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.nonpremul.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.imageData.get.nonpremul + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.imageData.get.nonpremul

                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          getImageData() returns non-premultiplied colors

                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.alpha.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.alpha.html new file mode 100644 index 0000000000..e5b57f650e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.alpha.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.imageData.get.order.alpha + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.imageData.get.order.alpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            getImageData() returns A in the fourth component

                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.cols.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.cols.html new file mode 100644 index 0000000000..66fd984ebd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.cols.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.imageData.get.order.cols + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.imageData.get.order.cols

                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                              getImageData() returns leftmost columns first

                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.rgb.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.rgb.html new file mode 100644 index 0000000000..4d15ce7927 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.rgb.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.imageData.get.order.rgb + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.imageData.get.order.rgb

                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                getImageData() returns R then G then B

                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.rows.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.rows.html new file mode 100644 index 0000000000..086ce322e0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.rows.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.imageData.get.order.rows + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.get.order.rows

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  getImageData() returns topmost rows first

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.range.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.range.html new file mode 100644 index 0000000000..d921191772 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.range.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.imageData.get.range + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.imageData.get.range

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    getImageData() returns values in the range [0, 255]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.rounding.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.rounding.html new file mode 100644 index 0000000000..9255be087b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.rounding.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.imageData.get.rounding + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.imageData.get.rounding

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Test the handling of non-integer source coordinates in getImageData().

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.source.negative.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.source.negative.html new file mode 100644 index 0000000000..0b84b1caca --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.source.negative.html @@ -0,0 +1,45 @@ + + +Canvas test: 2d.imageData.get.source.negative + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.imageData.get.source.negative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        getImageData() works with negative width and height, and returns top-to-bottom left-to-right

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.source.outside.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.source.outside.html new file mode 100644 index 0000000000..fca97f2e6f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.source.outside.html @@ -0,0 +1,85 @@ + + +Canvas test: 2d.imageData.get.source.outside + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.imageData.get.source.outside

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          getImageData() returns transparent black outside the canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.source.size.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.source.size.html new file mode 100644 index 0000000000..800edb8baf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.source.size.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.imageData.get.source.size + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.imageData.get.source.size

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            getImageData() returns bigger ImageData for bigger source rectangle

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.type.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.type.html new file mode 100644 index 0000000000..748d46b166 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.type.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.imageData.get.type + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.imageData.get.type

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              getImageData() returns an ImageData object containing a Uint8ClampedArray object

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.unaffected.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.unaffected.html new file mode 100644 index 0000000000..f2f4a2e4fa --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.unaffected.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.imageData.get.unaffected + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.imageData.get.unaffected

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                getImageData() is not affected by context state

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.zero.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.zero.html new file mode 100644 index 0000000000..438bc2fb1e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.get.zero.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.imageData.get.zero + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.get.zero

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  getImageData() throws INDEX_SIZE_ERR if size is zero

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.clamp.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.clamp.html new file mode 100644 index 0000000000..df8ef1ba20 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.clamp.html @@ -0,0 +1,54 @@ + + +Canvas test: 2d.imageData.object.clamp + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.imageData.object.clamp

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ImageData.data clamps numbers to [0, 255]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.array.bounds.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.array.bounds.html new file mode 100644 index 0000000000..01affeb947 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.array.bounds.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.imageData.object.ctor.array.bounds + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.imageData.object.ctor.array.bounds

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ImageData has a usable constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.array.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.array.html new file mode 100644 index 0000000000..0cdc025764 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.array.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.imageData.object.ctor.array + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.imageData.object.ctor.array

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ImageData has a usable constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.basics.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.basics.html new file mode 100644 index 0000000000..f7811e7441 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.basics.html @@ -0,0 +1,111 @@ + + +Canvas test: 2d.imageData.object.ctor.basics + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.imageData.object.ctor.basics

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Testing different type of ImageData constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.size.bounds.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.size.bounds.html new file mode 100644 index 0000000000..5ea899ac86 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.size.bounds.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.imageData.object.ctor.size.bounds + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.imageData.object.ctor.size.bounds

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ImageData has a usable constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.size.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.size.html new file mode 100644 index 0000000000..a11d8e2340 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.size.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.imageData.object.ctor.size + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.imageData.object.ctor.size

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ImageData has a usable constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.nan.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.nan.html new file mode 100644 index 0000000000..974b5898a3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.nan.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.imageData.object.nan + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.imageData.object.nan

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ImageData.data converts NaN to 0

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.properties.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.properties.html new file mode 100644 index 0000000000..7eefdb2f55 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.properties.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.imageData.object.properties + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.object.properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ImageData objects have the right properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.readonly.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.readonly.html new file mode 100644 index 0000000000..f002466bab --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.readonly.html @@ -0,0 +1,39 @@ + + +Canvas test: 2d.imageData.object.readonly + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.imageData.object.readonly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ImageData objects properties are read-only

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.round.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.round.html new file mode 100644 index 0000000000..0f7da4fff5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.round.html @@ -0,0 +1,54 @@ + + +Canvas test: 2d.imageData.object.round + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.imageData.object.round

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ImageData.data rounds numbers with round-to-zero

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.set.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.set.html new file mode 100644 index 0000000000..3d03bd6769 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.set.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.imageData.object.set + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.imageData.object.set

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ImageData.data can be modified

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.string.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.string.html new file mode 100644 index 0000000000..eda6f2838d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.string.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.imageData.object.string + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.imageData.object.string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ImageData.data converts strings to numbers with ToNumber

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.undefined.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.undefined.html new file mode 100644 index 0000000000..96867bec4a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.object.undefined.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.imageData.object.undefined + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.imageData.object.undefined

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ImageData.data converts undefined to 0

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.alpha.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.alpha.html new file mode 100644 index 0000000000..6ee38802f6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.alpha.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.imageData.put.alpha + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.imageData.put.alpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              putImageData() puts non-solid image data correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.alpha.png b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.alpha.png new file mode 100644 index 0000000000..5428c65524 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.alpha.png differ diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.basic.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.basic.html new file mode 100644 index 0000000000..17f7d3e8e6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.basic.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.imageData.put.basic + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.imageData.put.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                putImageData() puts image data from getImageData() onto the canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.clip.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.clip.html new file mode 100644 index 0000000000..948f617095 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.clip.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.imageData.put.clip + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.put.clip

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  putImageData() is not affected by clipping regions

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.created.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.created.html new file mode 100644 index 0000000000..4db45873a1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.created.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.imageData.put.created + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.imageData.put.created

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    putImageData() puts image data from createImageData() onto the canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.cross.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.cross.html new file mode 100644 index 0000000000..10226834a3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.cross.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.imageData.put.cross + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.imageData.put.cross

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      putImageData() accepts image data got from a different canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.negative.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.negative.html new file mode 100644 index 0000000000..efaa6f2550 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.negative.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.imageData.put.dirty.negative + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.imageData.put.dirty.negative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        putImageData() handles negative-sized dirty rectangles correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.outside.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.outside.html new file mode 100644 index 0000000000..86a77369f0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.outside.html @@ -0,0 +1,45 @@ + + +Canvas test: 2d.imageData.put.dirty.outside + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.imageData.put.dirty.outside

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          putImageData() handles dirty rectangles outside the canvas correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.rect1.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.rect1.html new file mode 100644 index 0000000000..786db5ac4f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.rect1.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.imageData.put.dirty.rect1 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.imageData.put.dirty.rect1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            putImageData() only modifies areas inside the dirty rectangle, using width and height

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.rect2.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.rect2.html new file mode 100644 index 0000000000..f5f8a3a0d1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.rect2.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.imageData.put.dirty.rect2 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.imageData.put.dirty.rect2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              putImageData() only modifies areas inside the dirty rectangle, using x and y

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.zero.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.zero.html new file mode 100644 index 0000000000..d3799104dd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.zero.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.imageData.put.dirty.zero + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.imageData.put.dirty.zero

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                putImageData() with zero-sized dirty rectangle puts nothing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.modified.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.modified.html new file mode 100644 index 0000000000..70b70a866f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.modified.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.imageData.put.modified + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.put.modified

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  putImageData() puts modified image data correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.nonfinite.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.nonfinite.html new file mode 100644 index 0000000000..ab03f9f20f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.nonfinite.html @@ -0,0 +1,108 @@ + + +Canvas test: 2d.imageData.put.nonfinite + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.imageData.put.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    putImageData() throws TypeError if arguments are not finite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Defined in "Web IDL" (draft) +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.null.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.null.html new file mode 100644 index 0000000000..4ed429fe7c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.null.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.imageData.put.null + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.imageData.put.null

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      putImageData() with null imagedata throws TypeError

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.path.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.path.html new file mode 100644 index 0000000000..e32d7cc257 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.path.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.imageData.put.path + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.imageData.put.path

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        putImageData() does not affect the current path

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.unaffected.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.unaffected.html new file mode 100644 index 0000000000..bad06b745f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.unaffected.html @@ -0,0 +1,38 @@ + + +Canvas test: 2d.imageData.put.unaffected + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.imageData.put.unaffected

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          putImageData() is not affected by context state

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.unchanged.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.unchanged.html new file mode 100644 index 0000000000..026e4347ed --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.unchanged.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.imageData.put.unchanged + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.imageData.put.unchanged

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            putImageData(getImageData(...), ...) has no effect

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.wrongtype.html b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.wrongtype.html new file mode 100644 index 0000000000..9e43b1fbe9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/pixel-manipulation/2d.imageData.put.wrongtype.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.imageData.put.wrongtype + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.imageData.put.wrongtype

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              putImageData() does not accept non-ImageData objects

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.basic.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.basic.html new file mode 100644 index 0000000000..0753ec6da8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.basic.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.reset.basic + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.reset.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                reset clears to transparent black

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.drop_shadow-expected.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.drop_shadow-expected.html new file mode 100644 index 0000000000..182f7e40cd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.drop_shadow-expected.html @@ -0,0 +1,14 @@ + + +Canvas test: 2d.reset.render.drop_shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.drop_shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that drop shadows are correctly rendered after reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.drop_shadow.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.drop_shadow.html new file mode 100644 index 0000000000..264355c8b3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.drop_shadow.html @@ -0,0 +1,22 @@ + + + +Canvas test: 2d.reset.render.drop_shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.drop_shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that drop shadows are correctly rendered after reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.global_composite_operation-expected.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.global_composite_operation-expected.html new file mode 100644 index 0000000000..1f9d247634 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.global_composite_operation-expected.html @@ -0,0 +1,15 @@ + + +Canvas test: 2d.reset.render.global_composite_operation +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.global_composite_operation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that canvas correctly renders rectangles with the default global composite operation after reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.global_composite_operation.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.global_composite_operation.html new file mode 100644 index 0000000000..fc851b84b8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.global_composite_operation.html @@ -0,0 +1,20 @@ + + + +Canvas test: 2d.reset.render.global_composite_operation +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.global_composite_operation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that canvas correctly renders rectangles with the default global composite operation after reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.line-expected.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.line-expected.html new file mode 100644 index 0000000000..dcd648d8c3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.line-expected.html @@ -0,0 +1,19 @@ + + +Canvas test: 2d.reset.render.line +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.line

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that lines are correctly rendered after reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.line.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.line.html new file mode 100644 index 0000000000..0dda7c7a7e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.line.html @@ -0,0 +1,28 @@ + + + +Canvas test: 2d.reset.render.line +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.line

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that lines are correctly rendered after reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.misc-expected.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.misc-expected.html new file mode 100644 index 0000000000..c359e6b42e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.misc-expected.html @@ -0,0 +1,15 @@ + + +Canvas test: 2d.reset.render.misc +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.misc

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that canvas correctly renders rectangles after reset (states not covered by other tests)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.misc.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.misc.html new file mode 100644 index 0000000000..61d2dbe2f0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.misc.html @@ -0,0 +1,23 @@ + + + +Canvas test: 2d.reset.render.misc +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.misc

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that canvas correctly renders rectangles after reset (states not covered by other tests)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.miter_limit-expected.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.miter_limit-expected.html new file mode 100644 index 0000000000..c91f485c53 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.miter_limit-expected.html @@ -0,0 +1,22 @@ + + +Canvas test: 2d.reset.render.miter_limit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.miter_limit

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the lines are correctly rendered with the default miter limit after reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.miter_limit.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.miter_limit.html new file mode 100644 index 0000000000..f6eaed00f6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.miter_limit.html @@ -0,0 +1,27 @@ + + + +Canvas test: 2d.reset.render.miter_limit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.miter_limit

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the lines are correctly rendered with the default miter limit after reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.text-expected.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.text-expected.html new file mode 100644 index 0000000000..7221483b02 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.text-expected.html @@ -0,0 +1,14 @@ + + +Canvas test: 2d.reset.render.text +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.text

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that text is correctly rendered after reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.text.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.text.html new file mode 100644 index 0000000000..3d76ddf292 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.render.text.html @@ -0,0 +1,28 @@ + + + +Canvas test: 2d.reset.render.text +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.text

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that text is correctly rendered after reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.clip-expected.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.clip-expected.html new file mode 100644 index 0000000000..974b37fab4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.clip-expected.html @@ -0,0 +1,14 @@ + + +Canvas test: 2d.reset.state.clip +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.clip

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the clip is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.clip.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.clip.html new file mode 100644 index 0000000000..ab3fa1081c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.clip.html @@ -0,0 +1,23 @@ + + + +Canvas test: 2d.reset.state.clip +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.clip

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the clip is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.direction.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.direction.html new file mode 100644 index 0000000000..8b27e3cfe4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.direction.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.reset.state.direction + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.direction

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.fill_style.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.fill_style.html new file mode 100644 index 0000000000..1239e2ec7f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.fill_style.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.reset.state.fill_style + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.reset.state.fill_style

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.filter.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.filter.html new file mode 100644 index 0000000000..80ccd22bb2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.filter.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.reset.state.filter + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.reset.state.filter

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.font.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.font.html new file mode 100644 index 0000000000..c93d038a62 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.font.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.reset.state.font + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.reset.state.font

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.font_kerning.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.font_kerning.html new file mode 100644 index 0000000000..d3ad9d386c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.font_kerning.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.reset.state.font_kerning + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.reset.state.font_kerning

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.font_stretch.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.font_stretch.html new file mode 100644 index 0000000000..0a91c640b2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.font_stretch.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.reset.state.font_stretch + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.reset.state.font_stretch

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.font_variant_caps.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.font_variant_caps.html new file mode 100644 index 0000000000..262c4fc4d3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.font_variant_caps.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.reset.state.font_variant_caps + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.reset.state.font_variant_caps

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.global_alpha.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.global_alpha.html new file mode 100644 index 0000000000..18b825e60f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.global_alpha.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.reset.state.global_alpha + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.reset.state.global_alpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.global_composite_operation.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.global_composite_operation.html new file mode 100644 index 0000000000..aee6841d95 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.global_composite_operation.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.reset.state.global_composite_operation + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.global_composite_operation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.image_smoothing_enabled.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.image_smoothing_enabled.html new file mode 100644 index 0000000000..e865967a38 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.image_smoothing_enabled.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.reset.state.image_smoothing_enabled + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.reset.state.image_smoothing_enabled

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.image_smoothing_quality.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.image_smoothing_quality.html new file mode 100644 index 0000000000..e78abfce77 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.image_smoothing_quality.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.reset.state.image_smoothing_quality + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.reset.state.image_smoothing_quality

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.letter_spacing.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.letter_spacing.html new file mode 100644 index 0000000000..3e732b1fa0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.letter_spacing.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.reset.state.letter_spacing + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.reset.state.letter_spacing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.line_cap.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.line_cap.html new file mode 100644 index 0000000000..8020e284a7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.line_cap.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.reset.state.line_cap + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.reset.state.line_cap

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.line_dash.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.line_dash.html new file mode 100644 index 0000000000..ca68ae5158 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.line_dash.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.reset.state.line_dash + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.reset.state.line_dash

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            check that the line dash is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.line_dash_offset.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.line_dash_offset.html new file mode 100644 index 0000000000..10015199b9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.line_dash_offset.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.reset.state.line_dash_offset + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.reset.state.line_dash_offset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.line_join.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.line_join.html new file mode 100644 index 0000000000..1c20cb1b2a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.line_join.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.reset.state.line_join + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.reset.state.line_join

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.line_width.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.line_width.html new file mode 100644 index 0000000000..db2516b535 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.line_width.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.reset.state.line_width + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.line_width

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.miter_limit.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.miter_limit.html new file mode 100644 index 0000000000..7920c38d52 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.miter_limit.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.reset.state.miter_limit + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.reset.state.miter_limit

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.shadow_blur.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.shadow_blur.html new file mode 100644 index 0000000000..07784de7d5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.shadow_blur.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.reset.state.shadow_blur + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.reset.state.shadow_blur

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.shadow_color.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.shadow_color.html new file mode 100644 index 0000000000..9e8ee6c7f5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.shadow_color.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.reset.state.shadow_color + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.reset.state.shadow_color

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.shadow_offset_x.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.shadow_offset_x.html new file mode 100644 index 0000000000..7992ce4c1e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.shadow_offset_x.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.reset.state.shadow_offset_x + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.reset.state.shadow_offset_x

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.shadow_offset_y.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.shadow_offset_y.html new file mode 100644 index 0000000000..84a38e0bdb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.shadow_offset_y.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.reset.state.shadow_offset_y + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.reset.state.shadow_offset_y

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.stroke_style.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.stroke_style.html new file mode 100644 index 0000000000..4acb19c41e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.stroke_style.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.reset.state.stroke_style + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.reset.state.stroke_style

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.text_align.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.text_align.html new file mode 100644 index 0000000000..a625737d72 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.text_align.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.reset.state.text_align + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.reset.state.text_align

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.text_baseline.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.text_baseline.html new file mode 100644 index 0000000000..2e4169bdb1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.text_baseline.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.reset.state.text_baseline + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.text_baseline

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.text_rendering.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.text_rendering.html new file mode 100644 index 0000000000..e182babee4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.text_rendering.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.reset.state.text_rendering + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.reset.state.text_rendering

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.transformation_matrix.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.transformation_matrix.html new file mode 100644 index 0000000000..7872681bfc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.transformation_matrix.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.reset.state.transformation_matrix + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.reset.state.transformation_matrix

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.word_spacing.html b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.word_spacing.html new file mode 100644 index 0000000000..c4a448f21c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/reset/2d.reset.state.word_spacing.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.reset.state.word_spacing + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.reset.state.word_spacing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/scroll/2d.scrollPathIntoView.basic.html b/testing/web-platform/tests/html/canvas/element/scroll/2d.scrollPathIntoView.basic.html new file mode 100644 index 0000000000..e4cf8ea9ad --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/scroll/2d.scrollPathIntoView.basic.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.scrollPathIntoView.basic + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.scrollPathIntoView.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          scrollPathIntoView() works

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/scroll/2d.scrollPathIntoView.path.html b/testing/web-platform/tests/html/canvas/element/scroll/2d.scrollPathIntoView.path.html new file mode 100644 index 0000000000..ee1f833aaf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/scroll/2d.scrollPathIntoView.path.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.scrollPathIntoView.path + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.scrollPathIntoView.path

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            scrollPathIntoView() with path argument works

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/scroll/2d.scrollPathIntoView.verticalLR.html b/testing/web-platform/tests/html/canvas/element/scroll/2d.scrollPathIntoView.verticalLR.html new file mode 100644 index 0000000000..9d09980b6f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/scroll/2d.scrollPathIntoView.verticalLR.html @@ -0,0 +1,38 @@ + + +Canvas test: 2d.scrollPathIntoView.verticalLR + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.scrollPathIntoView.verticalLR

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              scrollPathIntoView() works in vertical-lr writing mode

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/scroll/2d.scrollPathIntoView.verticalRL.html b/testing/web-platform/tests/html/canvas/element/scroll/2d.scrollPathIntoView.verticalRL.html new file mode 100644 index 0000000000..8193106f8e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/scroll/2d.scrollPathIntoView.verticalRL.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.scrollPathIntoView.verticalRL + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.scrollPathIntoView.verticalRL

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                scrollPathIntoView() works in vertical-rl writing mode

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.1.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.1.html new file mode 100644 index 0000000000..8888ae6885 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.1.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.shadow.alpha.1 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.alpha.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadow color alpha components are used

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.2.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.2.html new file mode 100644 index 0000000000..534d3dd16d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.2.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.shadow.alpha.2 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.shadow.alpha.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Shadow color alpha components are used

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.2.png b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.2.png new file mode 100644 index 0000000000..8764e89b37 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.2.png differ diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.3.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.3.html new file mode 100644 index 0000000000..468228208c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.3.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.shadow.alpha.3 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.shadow.alpha.3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Shadows are affected by globalAlpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.3.png b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.3.png new file mode 100644 index 0000000000..8764e89b37 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.3.png differ diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.4.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.4.html new file mode 100644 index 0000000000..2932c9dfe1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.4.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.shadow.alpha.4 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.shadow.alpha.4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Shadows with alpha components are correctly affected by globalAlpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.4.png b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.4.png new file mode 100644 index 0000000000..8764e89b37 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.4.png differ diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.5.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.5.html new file mode 100644 index 0000000000..ffa9ed8fde --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.5.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.shadow.alpha.5 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.shadow.alpha.5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Shadows of shapes with alpha components are drawn correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.5.png b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.5.png new file mode 100644 index 0000000000..8764e89b37 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.alpha.5.png differ diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowBlur.initial.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowBlur.initial.html new file mode 100644 index 0000000000..b688156546 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowBlur.initial.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.shadow.attributes.shadowBlur.initial + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.shadow.attributes.shadowBlur.initial

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowBlur.invalid.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowBlur.invalid.html new file mode 100644 index 0000000000..68f5dd41bc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowBlur.invalid.html @@ -0,0 +1,52 @@ + + +Canvas test: 2d.shadow.attributes.shadowBlur.invalid + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.shadow.attributes.shadowBlur.invalid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowBlur.valid.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowBlur.valid.html new file mode 100644 index 0000000000..51063a6ade --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowBlur.valid.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.shadow.attributes.shadowBlur.valid + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.shadow.attributes.shadowBlur.valid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.current.basic.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.current.basic.html new file mode 100644 index 0000000000..bfdc54d31b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.current.basic.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.shadow.attributes.shadowColor.current.basic + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.attributes.shadowColor.current.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  currentColor is computed from the canvas element

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.current.changed.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.current.changed.html new file mode 100644 index 0000000000..9eee2122d5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.current.changed.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.shadow.attributes.shadowColor.current.changed + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.shadow.attributes.shadowColor.current.changed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    currentColor is computed when the attribute is set, not when it is painted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.current.removed.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.current.removed.html new file mode 100644 index 0000000000..e1989cbdc8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.current.removed.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.shadow.attributes.shadowColor.current.removed + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.shadow.attributes.shadowColor.current.removed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      currentColor is solid black when the canvas element is not in a document

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.initial.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.initial.html new file mode 100644 index 0000000000..f4d0d33d6d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.initial.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.shadow.attributes.shadowColor.initial + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.shadow.attributes.shadowColor.initial

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.invalid.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.invalid.html new file mode 100644 index 0000000000..73f835dd96 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.invalid.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.shadow.attributes.shadowColor.invalid + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.shadow.attributes.shadowColor.invalid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.valid.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.valid.html new file mode 100644 index 0000000000..bc86c3d6c1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.valid.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.shadow.attributes.shadowColor.valid + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.shadow.attributes.shadowColor.valid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowOffset.initial.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowOffset.initial.html new file mode 100644 index 0000000000..056dd1607b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowOffset.initial.html @@ -0,0 +1,27 @@ + + +Canvas test: 2d.shadow.attributes.shadowOffset.initial + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.shadow.attributes.shadowOffset.initial

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowOffset.invalid.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowOffset.invalid.html new file mode 100644 index 0000000000..1567edb16a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowOffset.invalid.html @@ -0,0 +1,66 @@ + + +Canvas test: 2d.shadow.attributes.shadowOffset.invalid + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.shadow.attributes.shadowOffset.invalid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowOffset.valid.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowOffset.valid.html new file mode 100644 index 0000000000..04fe18c391 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.attributes.shadowOffset.valid.html @@ -0,0 +1,49 @@ + + +Canvas test: 2d.shadow.attributes.shadowOffset.valid + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.attributes.shadowOffset.valid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.blur.high-manual.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.blur.high-manual.html new file mode 100644 index 0000000000..aae0a163bb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.blur.high-manual.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.shadow.blur.high + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.shadow.blur.high

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Shadows look correct for large blurs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.blur.high.png b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.blur.high.png new file mode 100644 index 0000000000..743640b79f Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.blur.high.png differ diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.blur.low-manual.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.blur.low-manual.html new file mode 100644 index 0000000000..9674d6f0db --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.blur.low-manual.html @@ -0,0 +1,38 @@ + + +Canvas test: 2d.shadow.blur.low + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.shadow.blur.low

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Shadows look correct for small blurs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.blur.low.png b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.blur.low.png new file mode 100644 index 0000000000..99fb651c21 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.blur.low.png differ diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.canvas.alpha.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.canvas.alpha.html new file mode 100644 index 0000000000..18818fa726 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.canvas.alpha.html @@ -0,0 +1,39 @@ + + +Canvas test: 2d.shadow.canvas.alpha + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.shadow.canvas.alpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Shadows are drawn correctly for partially-transparent canvases

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.canvas.alpha.png b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.canvas.alpha.png new file mode 100644 index 0000000000..8764e89b37 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.canvas.alpha.png differ diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.canvas.basic.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.canvas.basic.html new file mode 100644 index 0000000000..e752c8f180 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.canvas.basic.html @@ -0,0 +1,39 @@ + + +Canvas test: 2d.shadow.canvas.basic + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.shadow.canvas.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Shadows are drawn for canvases

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.canvas.transparent.1.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.canvas.transparent.1.html new file mode 100644 index 0000000000..7d159328a4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.canvas.transparent.1.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.shadow.canvas.transparent.1 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.shadow.canvas.transparent.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Shadows are not drawn for transparent canvases

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.canvas.transparent.2.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.canvas.transparent.2.html new file mode 100644 index 0000000000..4326d42bbe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.canvas.transparent.2.html @@ -0,0 +1,45 @@ + + +Canvas test: 2d.shadow.canvas.transparent.2 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.shadow.canvas.transparent.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Shadows are not drawn for transparent parts of canvases

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.clip.1.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.clip.1.html new file mode 100644 index 0000000000..6caff8b92f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.clip.1.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.shadow.clip.1 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.shadow.clip.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Shadows of clipped shapes are still drawn within the clipping region

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.clip.2.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.clip.2.html new file mode 100644 index 0000000000..a5b05237e6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.clip.2.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.shadow.clip.2 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.clip.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are not drawn outside the clipping region

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.clip.3.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.clip.3.html new file mode 100644 index 0000000000..b7652634fb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.clip.3.html @@ -0,0 +1,42 @@ + + +Canvas test: 2d.shadow.clip.3 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.shadow.clip.3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Shadows of clipped shapes are still drawn within the clipping region

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.composite.1.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.composite.1.html new file mode 100644 index 0000000000..d64ecb4972 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.composite.1.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.shadow.composite.1 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.shadow.composite.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Shadows are drawn using globalCompositeOperation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.composite.2.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.composite.2.html new file mode 100644 index 0000000000..abc6b98d72 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.composite.2.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.shadow.composite.2 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.shadow.composite.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Shadows are drawn using globalCompositeOperation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.composite.3.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.composite.3.html new file mode 100644 index 0000000000..45eebd9eb0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.composite.3.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.shadow.composite.3 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.shadow.composite.3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Areas outside shadows are drawn correctly with destination-out

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.enable.blur.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.enable.blur.html new file mode 100644 index 0000000000..7efa459c29 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.enable.blur.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.shadow.enable.blur + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.shadow.enable.blur

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Shadows are drawn if shadowBlur is set

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.enable.off.1.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.enable.off.1.html new file mode 100644 index 0000000000..953ea04277 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.enable.off.1.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.shadow.enable.off.1 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.shadow.enable.off.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Shadows are not drawn when only shadowColor is set

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.enable.off.2.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.enable.off.2.html new file mode 100644 index 0000000000..2a8cf7301d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.enable.off.2.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.shadow.enable.off.2 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.shadow.enable.off.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Shadows are not drawn when only shadowColor is set

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.enable.x.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.enable.x.html new file mode 100644 index 0000000000..6eae985fd6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.enable.x.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.shadow.enable.x + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.enable.x

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are drawn if shadowOffsetX is set

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.enable.y.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.enable.y.html new file mode 100644 index 0000000000..2025babca6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.enable.y.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.shadow.enable.y + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.shadow.enable.y

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Shadows are drawn if shadowOffsetY is set

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.gradient.alpha.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.gradient.alpha.html new file mode 100644 index 0000000000..65f4fdad27 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.gradient.alpha.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.shadow.gradient.alpha + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.shadow.gradient.alpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Shadows are drawn correctly for partially-transparent gradient fills

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.gradient.alpha.png b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.gradient.alpha.png new file mode 100644 index 0000000000..8764e89b37 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.gradient.alpha.png differ diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.gradient.basic.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.gradient.basic.html new file mode 100644 index 0000000000..a7c5efe738 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.gradient.basic.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.shadow.gradient.basic + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.shadow.gradient.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Shadows are drawn for gradient fills

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.gradient.transparent.1.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.gradient.transparent.1.html new file mode 100644 index 0000000000..1c11f75e80 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.gradient.transparent.1.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.shadow.gradient.transparent.1 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.shadow.gradient.transparent.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Shadows are not drawn for transparent gradient fills

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.gradient.transparent.2.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.gradient.transparent.2.html new file mode 100644 index 0000000000..244aecab21 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.gradient.transparent.2.html @@ -0,0 +1,42 @@ + + +Canvas test: 2d.shadow.gradient.transparent.2 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.shadow.gradient.transparent.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Shadows are not drawn for transparent parts of gradient fills

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.image.alpha.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.image.alpha.html new file mode 100644 index 0000000000..f00e1752df --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.image.alpha.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.shadow.image.alpha + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.shadow.image.alpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Shadows are drawn correctly for partially-transparent images

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.image.alpha.png b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.image.alpha.png new file mode 100644 index 0000000000..8764e89b37 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.image.alpha.png differ diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.image.basic.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.image.basic.html new file mode 100644 index 0000000000..d106e223db --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.image.basic.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.shadow.image.basic + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.shadow.image.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Shadows are drawn for images

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.image.scale.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.image.scale.html new file mode 100644 index 0000000000..7e07fff378 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.image.scale.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.shadow.image.scale + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.image.scale

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are drawn correctly for scaled images

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.image.section.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.image.section.html new file mode 100644 index 0000000000..a1b3e7032f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.image.section.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.shadow.image.section + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.shadow.image.section

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Shadows are not drawn for areas outside image source rectangles

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.image.transparent.1.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.image.transparent.1.html new file mode 100644 index 0000000000..74d8b22951 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.image.transparent.1.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.shadow.image.transparent.1 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.shadow.image.transparent.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Shadows are not drawn for transparent images

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.image.transparent.2.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.image.transparent.2.html new file mode 100644 index 0000000000..1a52a52c3f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.image.transparent.2.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.shadow.image.transparent.2 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.shadow.image.transparent.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Shadows are not drawn for transparent parts of images

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.offset.negativeX.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.offset.negativeX.html new file mode 100644 index 0000000000..0a73b07b6c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.offset.negativeX.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.shadow.offset.negativeX + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.shadow.offset.negativeX

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Shadows can be offset with negative x

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.offset.negativeY.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.offset.negativeY.html new file mode 100644 index 0000000000..04c9620fd2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.offset.negativeY.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.shadow.offset.negativeY + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.shadow.offset.negativeY

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Shadows can be offset with negative y

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.offset.positiveX.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.offset.positiveX.html new file mode 100644 index 0000000000..1254474385 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.offset.positiveX.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.shadow.offset.positiveX + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.shadow.offset.positiveX

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Shadows can be offset with positive x

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.offset.positiveY.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.offset.positiveY.html new file mode 100644 index 0000000000..fdcf25a435 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.offset.positiveY.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.shadow.offset.positiveY + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.shadow.offset.positiveY

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Shadows can be offset with positive y

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.outside.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.outside.html new file mode 100644 index 0000000000..fcf2129488 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.outside.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.shadow.outside + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.outside

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows of shapes outside the visible area can be offset onto the visible area

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.pattern.alpha.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.pattern.alpha.html new file mode 100644 index 0000000000..10b5414b12 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.pattern.alpha.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.shadow.pattern.alpha + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.shadow.pattern.alpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Shadows are drawn correctly for partially-transparent fill patterns

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.pattern.alpha.png b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.pattern.alpha.png new file mode 100644 index 0000000000..8764e89b37 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.pattern.alpha.png differ diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.pattern.basic.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.pattern.basic.html new file mode 100644 index 0000000000..47d2149a57 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.pattern.basic.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.shadow.pattern.basic + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.shadow.pattern.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Shadows are drawn for fill patterns

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.pattern.transparent.1.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.pattern.transparent.1.html new file mode 100644 index 0000000000..c41dd83778 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.pattern.transparent.1.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.shadow.pattern.transparent.1 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.shadow.pattern.transparent.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Shadows are not drawn for transparent fill patterns

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.pattern.transparent.2.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.pattern.transparent.2.html new file mode 100644 index 0000000000..ddaf21fe90 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.pattern.transparent.2.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.shadow.pattern.transparent.2 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.shadow.pattern.transparent.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Shadows are not drawn for transparent parts of fill patterns

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.stroke.basic.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.stroke.basic.html new file mode 100644 index 0000000000..6146ba7d19 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.stroke.basic.html @@ -0,0 +1,39 @@ + + +Canvas test: 2d.shadow.stroke.basic + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.shadow.stroke.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Shadows are drawn for strokes

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.stroke.cap.1.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.stroke.cap.1.html new file mode 100644 index 0000000000..5d6e53a685 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.stroke.cap.1.html @@ -0,0 +1,42 @@ + + +Canvas test: 2d.shadow.stroke.cap.1 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.shadow.stroke.cap.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Shadows are not drawn for areas outside stroke caps

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.stroke.cap.2.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.stroke.cap.2.html new file mode 100644 index 0000000000..f18a9b6cc5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.stroke.cap.2.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.shadow.stroke.cap.2 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.shadow.stroke.cap.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Shadows are drawn for stroke caps

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.stroke.join.1.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.stroke.join.1.html new file mode 100644 index 0000000000..46735a918f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.stroke.join.1.html @@ -0,0 +1,42 @@ + + +Canvas test: 2d.shadow.stroke.join.1 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.stroke.join.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are not drawn for areas outside stroke joins

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.stroke.join.2.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.stroke.join.2.html new file mode 100644 index 0000000000..85abc24e81 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.stroke.join.2.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.shadow.stroke.join.2 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.shadow.stroke.join.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Shadows are drawn for stroke joins

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.stroke.join.3.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.stroke.join.3.html new file mode 100644 index 0000000000..795c6137d5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.stroke.join.3.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.shadow.stroke.join.3 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.shadow.stroke.join.3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Shadows are drawn for stroke joins respecting miter limit

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.transform.1.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.transform.1.html new file mode 100644 index 0000000000..abfb54e5db --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.transform.1.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.shadow.transform.1 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.shadow.transform.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Shadows take account of transformations

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.transform.2.html b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.transform.2.html new file mode 100644 index 0000000000..736dd4efa4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.transform.2.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.shadow.transform.2 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.shadow.transform.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Shadow offsets are not affected by transformations

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.align.default.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.align.default.html new file mode 100644 index 0000000000..d32f7831d0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.align.default.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.text.align.default + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.text.align.default

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.align.invalid.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.align.invalid.html new file mode 100644 index 0000000000..7b7f33766a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.align.invalid.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.text.align.invalid + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.text.align.invalid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.align.valid.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.align.valid.html new file mode 100644 index 0000000000..a568530f3b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.align.valid.html @@ -0,0 +1,39 @@ + + +Canvas test: 2d.text.align.valid + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.text.align.valid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.baseline.default.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.baseline.default.html new file mode 100644 index 0000000000..08e8512c66 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.baseline.default.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.text.baseline.default + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.baseline.default

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.baseline.invalid.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.baseline.invalid.html new file mode 100644 index 0000000000..e527a77288 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.baseline.invalid.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.text.baseline.invalid + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.text.baseline.invalid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.baseline.valid.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.baseline.valid.html new file mode 100644 index 0000000000..238f6ff7dc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.baseline.valid.html @@ -0,0 +1,42 @@ + + +Canvas test: 2d.text.baseline.valid + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.text.baseline.valid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.align.center.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.align.center.html new file mode 100644 index 0000000000..723ebe8764 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.align.center.html @@ -0,0 +1,47 @@ + + +Canvas test: 2d.text.draw.align.center + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.text.draw.align.center

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        textAlign center is the center of the em squares (not the bounding box)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.align.end.ltr.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.align.end.ltr.html new file mode 100644 index 0000000000..d29da833cc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.align.end.ltr.html @@ -0,0 +1,47 @@ + + +Canvas test: 2d.text.draw.align.end.ltr + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.text.draw.align.end.ltr

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          textAlign end with ltr is the right edge

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.align.end.rtl.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.align.end.rtl.html new file mode 100644 index 0000000000..09a9658ac0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.align.end.rtl.html @@ -0,0 +1,47 @@ + + +Canvas test: 2d.text.draw.align.end.rtl + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.text.draw.align.end.rtl

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            textAlign end with rtl is the left edge

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.align.left.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.align.left.html new file mode 100644 index 0000000000..dda5318fbf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.align.left.html @@ -0,0 +1,47 @@ + + +Canvas test: 2d.text.draw.align.left + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.text.draw.align.left

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              textAlign left is the left of the first em square (not the bounding box)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.align.right.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.align.right.html new file mode 100644 index 0000000000..2b3217278a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.align.right.html @@ -0,0 +1,47 @@ + + +Canvas test: 2d.text.draw.align.right + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.text.draw.align.right

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                textAlign right is the right of the last em square (not the bounding box)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.align.start.ltr.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.align.start.ltr.html new file mode 100644 index 0000000000..8e14642fc2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.align.start.ltr.html @@ -0,0 +1,47 @@ + + +Canvas test: 2d.text.draw.align.start.ltr + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.align.start.ltr

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  textAlign start with ltr is the left edge

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.align.start.rtl.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.align.start.rtl.html new file mode 100644 index 0000000000..fe1ccd1137 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.align.start.rtl.html @@ -0,0 +1,47 @@ + + +Canvas test: 2d.text.draw.align.start.rtl + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.text.draw.align.start.rtl

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    textAlign start with rtl is the right edge

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.baseline.alphabetic.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.baseline.alphabetic.html new file mode 100644 index 0000000000..a45db596d0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.baseline.alphabetic.html @@ -0,0 +1,47 @@ + + +Canvas test: 2d.text.draw.baseline.alphabetic + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.text.draw.baseline.alphabetic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.baseline.bottom.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.baseline.bottom.html new file mode 100644 index 0000000000..ed1bf002a1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.baseline.bottom.html @@ -0,0 +1,47 @@ + + +Canvas test: 2d.text.draw.baseline.bottom + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.text.draw.baseline.bottom

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        textBaseline bottom is the bottom of the em square (not the bounding box)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.baseline.hanging.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.baseline.hanging.html new file mode 100644 index 0000000000..2f274b4199 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.baseline.hanging.html @@ -0,0 +1,47 @@ + + +Canvas test: 2d.text.draw.baseline.hanging + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.text.draw.baseline.hanging

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.baseline.ideographic.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.baseline.ideographic.html new file mode 100644 index 0000000000..8d6a12e262 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.baseline.ideographic.html @@ -0,0 +1,47 @@ + + +Canvas test: 2d.text.draw.baseline.ideographic + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.text.draw.baseline.ideographic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.baseline.middle.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.baseline.middle.html new file mode 100644 index 0000000000..5b021a5877 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.baseline.middle.html @@ -0,0 +1,47 @@ + + +Canvas test: 2d.text.draw.baseline.middle + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.text.draw.baseline.middle

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              textBaseline middle is the middle of the em square (not the bounding box)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.baseline.top.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.baseline.top.html new file mode 100644 index 0000000000..2011514d33 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.baseline.top.html @@ -0,0 +1,47 @@ + + +Canvas test: 2d.text.draw.baseline.top + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.text.draw.baseline.top

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                textBaseline top is the top of the em square (not the bounding box)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.basic-manual.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.basic-manual.html new file mode 100644 index 0000000000..d3f5df9d01 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.basic-manual.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.text.draw.fill.basic + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.fill.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fillText draws filled text

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.basic.png b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.basic.png new file mode 100644 index 0000000000..70d7b046cb Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.basic.png differ diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.NaN.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.NaN.html new file mode 100644 index 0000000000..9705d28830 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.NaN.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.text.draw.fill.maxWidth.NaN + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.text.draw.fill.maxWidth.NaN

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    fillText handles maxWidth correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.bound.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.bound.html new file mode 100644 index 0000000000..c5f7dcf119 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.bound.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.text.draw.fill.maxWidth.bound + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.text.draw.fill.maxWidth.bound

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      fillText handles maxWidth based on line size, not bounding box size

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.fontface.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.fontface.html new file mode 100644 index 0000000000..7df5553815 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.fontface.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.text.draw.fill.maxWidth.fontface + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.text.draw.fill.maxWidth.fontface

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        fillText works on @font-face fonts

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.large-manual.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.large-manual.html new file mode 100644 index 0000000000..96bb2e7de1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.large-manual.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.text.draw.fill.maxWidth.large + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.text.draw.fill.maxWidth.large

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          fillText handles maxWidth correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.large.png b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.large.png new file mode 100644 index 0000000000..70d7b046cb Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.large.png differ diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.negative.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.negative.html new file mode 100644 index 0000000000..ad50d57608 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.negative.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.text.draw.fill.maxWidth.negative + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.text.draw.fill.maxWidth.negative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            fillText handles maxWidth correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.small.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.small.html new file mode 100644 index 0000000000..75866af406 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.small.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.text.draw.fill.maxWidth.small + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.text.draw.fill.maxWidth.small

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              fillText handles maxWidth correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.zero.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.zero.html new file mode 100644 index 0000000000..a175a57879 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.maxWidth.zero.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.text.draw.fill.maxWidth.zero + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.text.draw.fill.maxWidth.zero

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                fillText handles maxWidth correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.rtl-manual.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.rtl-manual.html new file mode 100644 index 0000000000..6917d7ed6c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.rtl-manual.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.text.draw.fill.rtl + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.fill.rtl

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fillText respects Right-To-Left Override characters

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.rtl.png b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.rtl.png new file mode 100644 index 0000000000..70d7b046cb Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.rtl.png differ diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.unaffected.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.unaffected.html new file mode 100644 index 0000000000..94ed31d199 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fill.unaffected.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.text.draw.fill.unaffected + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.text.draw.fill.unaffected

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    fillText does not start a new path or subpath

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fontface.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fontface.html new file mode 100644 index 0000000000..c46ac2084e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fontface.html @@ -0,0 +1,44 @@ + + +Canvas test: 2d.text.draw.fontface + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.text.draw.fontface

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fontface.notinpage.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fontface.notinpage.html new file mode 100644 index 0000000000..92891fb04f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fontface.notinpage.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.text.draw.fontface.notinpage + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.text.draw.fontface.notinpage

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @font-face fonts should work even if they are not used in the page

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fontface.repeat.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fontface.repeat.html new file mode 100644 index 0000000000..d597540b97 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.fontface.repeat.html @@ -0,0 +1,46 @@ + + +Canvas test: 2d.text.draw.fontface.repeat + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.text.draw.fontface.repeat

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Draw with the font immediately, then wait a bit until and draw again. (This crashes some version of WebKit.)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.kern.consistent-manual.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.kern.consistent-manual.html new file mode 100644 index 0000000000..1840ef01b1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.kern.consistent-manual.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.text.draw.kern.consistent + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.text.draw.kern.consistent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Stroked and filled text should have exactly the same kerning so it overlaps

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.space.basic.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.space.basic.html new file mode 100644 index 0000000000..d4447402aa --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.space.basic.html @@ -0,0 +1,42 @@ + + +Canvas test: 2d.text.draw.space.basic + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.text.draw.space.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              U+0020 is rendered the correct size (1em wide)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.space.collapse.end.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.space.collapse.end.html new file mode 100644 index 0000000000..5a14dbd514 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.space.collapse.end.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.text.draw.space.collapse.end + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.text.draw.space.collapse.end

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Space characters at the end of a line are NOT collapsed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.space.collapse.nonspace.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.space.collapse.nonspace.html new file mode 100644 index 0000000000..1fc4203b90 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.space.collapse.nonspace.html @@ -0,0 +1,42 @@ + + +Canvas test: 2d.text.draw.space.collapse.nonspace + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.space.collapse.nonspace

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Non-space characters are not converted to U+0020 and collapsed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.space.collapse.other.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.space.collapse.other.html new file mode 100644 index 0000000000..ffc82929b5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.space.collapse.other.html @@ -0,0 +1,42 @@ + + +Canvas test: 2d.text.draw.space.collapse.other + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.text.draw.space.collapse.other

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Space characters are converted to U+0020, and are NOT collapsed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.space.collapse.space.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.space.collapse.space.html new file mode 100644 index 0000000000..64c14d1a54 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.space.collapse.space.html @@ -0,0 +1,42 @@ + + +Canvas test: 2d.text.draw.space.collapse.space + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.text.draw.space.collapse.space

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Space characters are converted to U+0020, and are NOT collapsed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.space.collapse.start.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.space.collapse.start.html new file mode 100644 index 0000000000..272432c3be --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.space.collapse.start.html @@ -0,0 +1,42 @@ + + +Canvas test: 2d.text.draw.space.collapse.start + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.text.draw.space.collapse.start

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Space characters at the start of a line are NOT collapsed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.stroke.basic-manual.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.stroke.basic-manual.html new file mode 100644 index 0000000000..1db0f0694e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.stroke.basic-manual.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.text.draw.stroke.basic + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.text.draw.stroke.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          strokeText draws stroked text

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.stroke.basic.png b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.stroke.basic.png new file mode 100644 index 0000000000..fb3b5b830d Binary files /dev/null and b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.stroke.basic.png differ diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.stroke.unaffected.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.stroke.unaffected.html new file mode 100644 index 0000000000..76a36476ee --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.draw.stroke.unaffected.html @@ -0,0 +1,42 @@ + + +Canvas test: 2d.text.draw.stroke.unaffected + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.text.draw.stroke.unaffected

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            strokeText does not start a new path or subpath

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.absolute.spacing.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.absolute.spacing.html new file mode 100644 index 0000000000..1207f84e2b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.absolute.spacing.html @@ -0,0 +1,45 @@ + + +Canvas test: 2d.text.drawing.style.absolute.spacing + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.text.drawing.style.absolute.spacing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Testing letter spacing and word spacing with absolute length

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.font-relative.spacing.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.font-relative.spacing.html new file mode 100644 index 0000000000..a232ec1602 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.font-relative.spacing.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.text.drawing.style.font-relative.spacing + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.text.drawing.style.font-relative.spacing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Testing letter spacing and word spacing with font-relative length

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.fontKerning.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.fontKerning.html new file mode 100644 index 0000000000..6de9c6eb50 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.fontKerning.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.text.drawing.style.fontKerning + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.drawing.style.fontKerning

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing basic functionalities of fontKerning for canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.fontKerning.with.uppercase.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.fontKerning.with.uppercase.html new file mode 100644 index 0000000000..991f35af0d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.fontKerning.with.uppercase.html @@ -0,0 +1,57 @@ + + +Canvas test: 2d.text.drawing.style.fontKerning.with.uppercase + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.text.drawing.style.fontKerning.with.uppercase

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Testing basic functionalities of fontKerning for canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.fontStretch.settings.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.fontStretch.settings.html new file mode 100644 index 0000000000..b19eced891 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.fontStretch.settings.html @@ -0,0 +1,81 @@ + + +Canvas test: 2d.text.drawing.style.fontStretch.settings + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.text.drawing.style.fontStretch.settings

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Testing value setting of fontStretch in Canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.fontVariant.settings.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.fontVariant.settings.html new file mode 100644 index 0000000000..cff5ad183a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.fontVariant.settings.html @@ -0,0 +1,78 @@ + + +Canvas test: 2d.text.drawing.style.fontVariant.settings + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.text.drawing.style.fontVariant.settings

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Testing basic functionalities of fontVariant for canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.invalid.spacing.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.invalid.spacing.html new file mode 100644 index 0000000000..a0b8340b2c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.invalid.spacing.html @@ -0,0 +1,42 @@ + + +Canvas test: 2d.text.drawing.style.invalid.spacing + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.text.drawing.style.invalid.spacing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Testing letter spacing and word spacing with invalid units

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.letterSpacing.change.font.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.letterSpacing.change.font.html new file mode 100644 index 0000000000..daff0cf9d6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.letterSpacing.change.font.html @@ -0,0 +1,45 @@ + + +Canvas test: 2d.text.drawing.style.letterSpacing.change.font + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.text.drawing.style.letterSpacing.change.font

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Set letter spacing and word spacing to font dependent value and verify it works after font change.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.letterSpacing.measure.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.letterSpacing.measure.html new file mode 100644 index 0000000000..0e4848b6fe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.letterSpacing.measure.html @@ -0,0 +1,54 @@ + + +Canvas test: 2d.text.drawing.style.letterSpacing.measure + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.text.drawing.style.letterSpacing.measure

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Testing letter spacing with different length units

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.measure.direction.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.measure.direction.html new file mode 100644 index 0000000000..abe696b196 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.measure.direction.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.text.drawing.style.measure.direction + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.text.drawing.style.measure.direction

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Measurement should follow text direction

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.measure.rtl.text.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.measure.rtl.text.html new file mode 100644 index 0000000000..e521b09236 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.measure.rtl.text.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.text.drawing.style.measure.rtl.text + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.drawing.style.measure.rtl.text

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Measurement should follow canvas direction instead text direction

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.measure.textAlign.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.measure.textAlign.html new file mode 100644 index 0000000000..2d5a4718c5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.measure.textAlign.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.text.drawing.style.measure.textAlign + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.text.drawing.style.measure.textAlign

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Measurement should be related to textAlignment

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.nonfinite.spacing.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.nonfinite.spacing.html new file mode 100644 index 0000000000..5ba20208e5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.nonfinite.spacing.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.text.drawing.style.nonfinite.spacing + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.text.drawing.style.nonfinite.spacing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Testing letter spacing and word spacing with nonfinite inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.textRendering.settings.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.textRendering.settings.html new file mode 100644 index 0000000000..dee856842a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.textRendering.settings.html @@ -0,0 +1,80 @@ + + +Canvas test: 2d.text.drawing.style.textRendering.settings + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.text.drawing.style.textRendering.settings

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Testing basic functionalities of textRendering in Canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.wordSpacing.change.font.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.wordSpacing.change.font.html new file mode 100644 index 0000000000..8bad1a0447 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.wordSpacing.change.font.html @@ -0,0 +1,45 @@ + + +Canvas test: 2d.text.drawing.style.wordSpacing.change.font + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.text.drawing.style.wordSpacing.change.font

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Set word spacing and word spacing to font dependent value and verify it works after font change.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.wordSpacing.measure.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.wordSpacing.measure.html new file mode 100644 index 0000000000..2562477d94 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.drawing.style.wordSpacing.measure.html @@ -0,0 +1,54 @@ + + +Canvas test: 2d.text.drawing.style.wordSpacing.measure + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.text.drawing.style.wordSpacing.measure

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Testing word spacing with different length units

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.font.default.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.font.default.html new file mode 100644 index 0000000000..c6ac084843 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.font.default.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.text.font.default + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.text.font.default

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.basic.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.basic.html new file mode 100644 index 0000000000..70efec7743 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.basic.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.text.font.parse.basic + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.text.font.parse.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.complex.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.complex.html new file mode 100644 index 0000000000..12e1d60e56 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.complex.html @@ -0,0 +1,27 @@ + + +Canvas test: 2d.text.font.parse.complex + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.font.parse.complex

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.complex2.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.complex2.html new file mode 100644 index 0000000000..d85765fcd3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.complex2.html @@ -0,0 +1,27 @@ + + +Canvas test: 2d.text.font.parse.complex2 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.text.font.parse.complex2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.family.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.family.html new file mode 100644 index 0000000000..c53bedbffc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.family.html @@ -0,0 +1,27 @@ + + +Canvas test: 2d.text.font.parse.family + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.text.font.parse.family

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.invalid.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.invalid.html new file mode 100644 index 0000000000..4fef0b4846 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.invalid.html @@ -0,0 +1,71 @@ + + +Canvas test: 2d.text.font.parse.invalid + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.text.font.parse.invalid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.size.percentage.default.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.size.percentage.default.html new file mode 100644 index 0000000000..cb245f18a2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.size.percentage.default.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.text.font.parse.size.percentage.default + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.text.font.parse.size.percentage.default

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.size.percentage.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.size.percentage.html new file mode 100644 index 0000000000..520231a804 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.size.percentage.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.text.font.parse.size.percentage + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.text.font.parse.size.percentage

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.system.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.system.html new file mode 100644 index 0000000000..10fa0cb36d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.system.html @@ -0,0 +1,27 @@ + + +Canvas test: 2d.text.font.parse.system + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.text.font.parse.system

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              System fonts must be computed to explicit values

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.tiny.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.tiny.html new file mode 100644 index 0000000000..10c9d2a0e0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.font.parse.tiny.html @@ -0,0 +1,27 @@ + + +Canvas test: 2d.text.font.parse.tiny + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.text.font.parse.tiny

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.font.relative_size.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.font.relative_size.html new file mode 100644 index 0000000000..97b9718b14 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.font.relative_size.html @@ -0,0 +1,29 @@ + + +Canvas test: 2d.text.font.relative_size + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.font.relative_size

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.font.weight.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.font.weight.html new file mode 100644 index 0000000000..05816b7254 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.font.weight.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.text.font.weight + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.text.font.weight

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps1-expected.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps1-expected.html new file mode 100644 index 0000000000..e2cef0d77a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps1-expected.html @@ -0,0 +1,15 @@ + + +Canvas test: 2d.text.fontVariantCaps1 +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.text.fontVariantCaps1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Testing small caps setting in fontVariant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps1.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps1.html new file mode 100644 index 0000000000..56acfc61f4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps1.html @@ -0,0 +1,18 @@ + + + +Canvas test: 2d.text.fontVariantCaps1 +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.text.fontVariantCaps1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Testing small caps setting in fontVariant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps2.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps2.html new file mode 100644 index 0000000000..56efbb6fd3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps2.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.text.fontVariantCaps2 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.text.fontVariantCaps2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Testing small caps setting in fontVariant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps3-expected.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps3-expected.html new file mode 100644 index 0000000000..cf2d5ae119 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps3-expected.html @@ -0,0 +1,15 @@ + + +Canvas test: 2d.text.fontVariantCaps3 +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.text.fontVariantCaps3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Testing small caps setting in fontVariant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps3.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps3.html new file mode 100644 index 0000000000..c3d80d3e56 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps3.html @@ -0,0 +1,19 @@ + + + +Canvas test: 2d.text.fontVariantCaps3 +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.text.fontVariantCaps3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Testing small caps setting in fontVariant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps4-expected.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps4-expected.html new file mode 100644 index 0000000000..3813fd3684 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps4-expected.html @@ -0,0 +1,15 @@ + + +Canvas test: 2d.text.fontVariantCaps4 +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.text.fontVariantCaps4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Testing small caps setting in fontVariant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps4.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps4.html new file mode 100644 index 0000000000..1ee9053b4d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps4.html @@ -0,0 +1,19 @@ + + + +Canvas test: 2d.text.fontVariantCaps4 +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.text.fontVariantCaps4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Testing small caps setting in fontVariant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps5-expected.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps5-expected.html new file mode 100644 index 0000000000..4bda4ec4b5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps5-expected.html @@ -0,0 +1,15 @@ + + +Canvas test: 2d.text.fontVariantCaps5 +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.text.fontVariantCaps5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Testing small caps setting in fontVariant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps5.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps5.html new file mode 100644 index 0000000000..d80de4ea31 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps5.html @@ -0,0 +1,19 @@ + + + +Canvas test: 2d.text.fontVariantCaps5 +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.text.fontVariantCaps5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Testing small caps setting in fontVariant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps6-expected.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps6-expected.html new file mode 100644 index 0000000000..af9c736aea --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps6-expected.html @@ -0,0 +1,15 @@ + + +Canvas test: 2d.text.fontVariantCaps6 +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.text.fontVariantCaps6

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Testing small caps setting in fontVariant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps6.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps6.html new file mode 100644 index 0000000000..c17fac18b7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.fontVariantCaps6.html @@ -0,0 +1,19 @@ + + + +Canvas test: 2d.text.fontVariantCaps6 +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.text.fontVariantCaps6

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Testing small caps setting in fontVariant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.actualBoundingBox.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.actualBoundingBox.html new file mode 100644 index 0000000000..d0672b23dc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.actualBoundingBox.html @@ -0,0 +1,61 @@ + + +Canvas test: 2d.text.measure.actualBoundingBox + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.text.measure.actualBoundingBox

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Testing actualBoundingBox

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.advances.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.advances.html new file mode 100644 index 0000000000..84f04dd677 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.advances.html @@ -0,0 +1,52 @@ + + +Canvas test: 2d.text.measure.advances + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.text.measure.advances

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Testing width advances

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.baselines.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.baselines.html new file mode 100644 index 0000000000..9d947eb361 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.baselines.html @@ -0,0 +1,45 @@ + + +Canvas test: 2d.text.measure.baselines + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.text.measure.baselines

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Testing baselines

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.emHeights-low-ascent.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.emHeights-low-ascent.html new file mode 100644 index 0000000000..7b6874d10b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.emHeights-low-ascent.html @@ -0,0 +1,45 @@ + + +Canvas test: 2d.text.measure.emHeights-low-ascent + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.text.measure.emHeights-low-ascent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Testing emHeights with reduced ascent metric

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.emHeights-zero-descent.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.emHeights-zero-descent.html new file mode 100644 index 0000000000..c3ce994fa1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.emHeights-zero-descent.html @@ -0,0 +1,45 @@ + + +Canvas test: 2d.text.measure.emHeights-zero-descent + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.text.measure.emHeights-zero-descent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Testing emHeights with zero descent metric

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.emHeights.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.emHeights.html new file mode 100644 index 0000000000..0db4c30801 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.emHeights.html @@ -0,0 +1,45 @@ + + +Canvas test: 2d.text.measure.emHeights + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.measure.emHeights

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing emHeights

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.fontBoundingBox-reduced-ascent.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.fontBoundingBox-reduced-ascent.html new file mode 100644 index 0000000000..653d26d820 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.fontBoundingBox-reduced-ascent.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.text.measure.fontBoundingBox-reduced-ascent + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.text.measure.fontBoundingBox-reduced-ascent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Testing fontBoundingBox for OffscreenCanvas with reduced ascent metric

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.fontBoundingBox-zero-descent.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.fontBoundingBox-zero-descent.html new file mode 100644 index 0000000000..785c0bc186 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.fontBoundingBox-zero-descent.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.text.measure.fontBoundingBox-zero-descent + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.text.measure.fontBoundingBox-zero-descent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Testing fontBoundingBox for OffscreenCanvas with zero descent metric

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.fontBoundingBox.ahem.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.fontBoundingBox.ahem.html new file mode 100644 index 0000000000..0044f4d1e7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.fontBoundingBox.ahem.html @@ -0,0 +1,42 @@ + + +Canvas test: 2d.text.measure.fontBoundingBox.ahem + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.text.measure.fontBoundingBox.ahem

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Testing fontBoundingBox for font ahem

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.fontBoundingBox.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.fontBoundingBox.html new file mode 100644 index 0000000000..9e7e190754 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.fontBoundingBox.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.text.measure.fontBoundingBox + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.text.measure.fontBoundingBox

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Testing fontBoundingBox measurements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.width.basic.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.width.basic.html new file mode 100644 index 0000000000..36dc468b4e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.width.basic.html @@ -0,0 +1,42 @@ + + +Canvas test: 2d.text.measure.width.basic + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.text.measure.width.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The width of character is same as font used

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.width.empty.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.width.empty.html new file mode 100644 index 0000000000..39ddad9789 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.width.empty.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.text.measure.width.empty + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.text.measure.width.empty

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The empty string has zero width

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.width.space.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.width.space.html new file mode 100644 index 0000000000..7fd8095e28 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.measure.width.space.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.text.measure.width.space + + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.text.measure.width.space

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Space characters are converted to U+0020 and NOT collapsed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +A +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/text/2d.text.setFont.mathFont.html b/testing/web-platform/tests/html/canvas/element/text/2d.text.setFont.mathFont.html new file mode 100644 index 0000000000..370104f1b8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/2d.text.setFont.mathFont.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.text.setFont.mathFont + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.setFont.mathFont

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  crbug.com/1212190, make sure offscreencanvas doesn't crash with Math Font

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/text/direction-inherit-rtl.html b/testing/web-platform/tests/html/canvas/element/text/direction-inherit-rtl.html new file mode 100644 index 0000000000..0ad92181a0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/direction-inherit-rtl.html @@ -0,0 +1,31 @@ + + +HTML Canvas Test: the 'direction' property + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/text/direction-ltr.html b/testing/web-platform/tests/html/canvas/element/text/direction-ltr.html new file mode 100644 index 0000000000..42a39ac589 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/direction-ltr.html @@ -0,0 +1,31 @@ + + +HTML Canvas Test: the 'direction' property + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/text/direction-rtl.html b/testing/web-platform/tests/html/canvas/element/text/direction-rtl.html new file mode 100644 index 0000000000..3cc67c69f5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/direction-rtl.html @@ -0,0 +1,31 @@ + + +HTML Canvas Test: the 'direction' property + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/text/parent-style-relative-units.html b/testing/web-platform/tests/html/canvas/element/text/parent-style-relative-units.html new file mode 100644 index 0000000000..b9a6b314c6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/parent-style-relative-units.html @@ -0,0 +1,23 @@ + +Canvas test: CanvasTextDrawingStyles.font with canvas relative units + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/text/reference/direction-default-ref.html b/testing/web-platform/tests/html/canvas/element/text/reference/direction-default-ref.html new file mode 100644 index 0000000000..cef6df259c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/reference/direction-default-ref.html @@ -0,0 +1,27 @@ + + +HTML Canvas Reference: the 'direction' property + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/text/reference/direction-rtl-ref.html b/testing/web-platform/tests/html/canvas/element/text/reference/direction-rtl-ref.html new file mode 100644 index 0000000000..010526d667 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/text/reference/direction-rtl-ref.html @@ -0,0 +1,27 @@ + + +HTML Canvas Reference: the 'direction' property + + + + + + diff --git a/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.bitmap.html b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.bitmap.html new file mode 100644 index 0000000000..6814679aba --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.bitmap.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.state.saverestore.bitmap + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.state.saverestore.bitmap

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    save()/restore() does not affect the current bitmap

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.clip.html b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.clip.html new file mode 100644 index 0000000000..1ce44ab147 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.clip.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.state.saverestore.clip + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.state.saverestore.clip

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      save()/restore() affects the clipping path

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.fillStyle.html b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.fillStyle.html new file mode 100644 index 0000000000..1eb8360e5f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.fillStyle.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.state.saverestore.fillStyle + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.state.saverestore.fillStyle

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        save()/restore() works for fillStyle

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.font.html b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.font.html new file mode 100644 index 0000000000..8cb4d171bb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.font.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.state.saverestore.font + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.state.saverestore.font

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          save()/restore() works for font

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.globalAlpha.html b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.globalAlpha.html new file mode 100644 index 0000000000..f3dae5ff51 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.globalAlpha.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.state.saverestore.globalAlpha + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.state.saverestore.globalAlpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            save()/restore() works for globalAlpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.globalCompositeOperation.html b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.globalCompositeOperation.html new file mode 100644 index 0000000000..fed0ceec3b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.globalCompositeOperation.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.state.saverestore.globalCompositeOperation + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.state.saverestore.globalCompositeOperation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              save()/restore() works for globalCompositeOperation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.lineCap.html b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.lineCap.html new file mode 100644 index 0000000000..90c52ce564 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.lineCap.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.state.saverestore.lineCap + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.state.saverestore.lineCap

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                save()/restore() works for lineCap

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.lineJoin.html b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.lineJoin.html new file mode 100644 index 0000000000..00495d9fb6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.lineJoin.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.state.saverestore.lineJoin + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.state.saverestore.lineJoin

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  save()/restore() works for lineJoin

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.lineWidth.html b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.lineWidth.html new file mode 100644 index 0000000000..0705878d0a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.lineWidth.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.state.saverestore.lineWidth + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.state.saverestore.lineWidth

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    save()/restore() works for lineWidth

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.miterLimit.html b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.miterLimit.html new file mode 100644 index 0000000000..efd2207515 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.miterLimit.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.state.saverestore.miterLimit + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.state.saverestore.miterLimit

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      save()/restore() works for miterLimit

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.path.html b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.path.html new file mode 100644 index 0000000000..5848ae560c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.path.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.state.saverestore.path + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.state.saverestore.path

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        save()/restore() does not affect the current path

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowBlur.html b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowBlur.html new file mode 100644 index 0000000000..c5699b78fd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowBlur.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.state.saverestore.shadowBlur + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.state.saverestore.shadowBlur

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          save()/restore() works for shadowBlur

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowColor.html b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowColor.html new file mode 100644 index 0000000000..9b6a435202 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowColor.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.state.saverestore.shadowColor + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.state.saverestore.shadowColor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            save()/restore() works for shadowColor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowOffsetX.html b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowOffsetX.html new file mode 100644 index 0000000000..427a44a373 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowOffsetX.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.state.saverestore.shadowOffsetX + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.state.saverestore.shadowOffsetX

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              save()/restore() works for shadowOffsetX

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowOffsetY.html b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowOffsetY.html new file mode 100644 index 0000000000..b711445c20 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowOffsetY.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.state.saverestore.shadowOffsetY + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.state.saverestore.shadowOffsetY

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                save()/restore() works for shadowOffsetY

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.stack.html b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.stack.html new file mode 100644 index 0000000000..122c543473 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.stack.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.state.saverestore.stack + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.state.saverestore.stack

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  save()/restore() can be nested as a stack

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.stackdepth.html b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.stackdepth.html new file mode 100644 index 0000000000..6fa591d06a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.stackdepth.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.state.saverestore.stackdepth + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.state.saverestore.stackdepth

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    save()/restore() stack depth is not unreasonably limited

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.strokeStyle.html b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.strokeStyle.html new file mode 100644 index 0000000000..9ccaac7e7a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.strokeStyle.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.state.saverestore.strokeStyle + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.state.saverestore.strokeStyle

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      save()/restore() works for strokeStyle

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.textAlign.html b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.textAlign.html new file mode 100644 index 0000000000..a86d62a8b7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.textAlign.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.state.saverestore.textAlign + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.state.saverestore.textAlign

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        save()/restore() works for textAlign

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.textBaseline.html b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.textBaseline.html new file mode 100644 index 0000000000..5cbf712fb1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.textBaseline.html @@ -0,0 +1,40 @@ + + +Canvas test: 2d.state.saverestore.textBaseline + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.state.saverestore.textBaseline

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          save()/restore() works for textBaseline

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.transformation.html b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.transformation.html new file mode 100644 index 0000000000..6edee8ae84 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.transformation.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.state.saverestore.transformation + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.state.saverestore.transformation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            save()/restore() affects the current transformation matrix

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.underflow.html b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.underflow.html new file mode 100644 index 0000000000..763f269556 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/the-canvas-state/2d.state.saverestore.underflow.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.state.saverestore.underflow + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.state.saverestore.underflow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              restore() with an empty stack has no effect

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.order.html b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.order.html new file mode 100644 index 0000000000..6c97bf7426 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.order.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.transformation.order + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.transformation.order

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Transformations are applied in the right order

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.rotate.direction.html b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.rotate.direction.html new file mode 100644 index 0000000000..0b583cd678 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.rotate.direction.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.transformation.rotate.direction + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.transformation.rotate.direction

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  rotate() is clockwise

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.rotate.nonfinite.html b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.rotate.nonfinite.html new file mode 100644 index 0000000000..3e685fa7a8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.rotate.nonfinite.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.transformation.rotate.nonfinite + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.transformation.rotate.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    rotate() with Infinity/NaN is ignored

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.rotate.radians.html b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.rotate.radians.html new file mode 100644 index 0000000000..63f895a0de --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.rotate.radians.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.transformation.rotate.radians + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.transformation.rotate.radians

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      rotate() uses radians

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.rotate.wrap.html b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.rotate.wrap.html new file mode 100644 index 0000000000..9b923e0008 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.rotate.wrap.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.transformation.rotate.wrap + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.transformation.rotate.wrap

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        rotate() wraps large positive values correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.rotate.wrapnegative.html b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.rotate.wrapnegative.html new file mode 100644 index 0000000000..96894ef20e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.rotate.wrapnegative.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.transformation.rotate.wrapnegative + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.transformation.rotate.wrapnegative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          rotate() wraps large negative values correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.rotate.zero.html b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.rotate.zero.html new file mode 100644 index 0000000000..7026ea9d1b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.rotate.zero.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.transformation.rotate.zero + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.transformation.rotate.zero

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            rotate() by 0 does nothing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.scale.basic.html b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.scale.basic.html new file mode 100644 index 0000000000..7e4b3593b1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.scale.basic.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.transformation.scale.basic + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.transformation.scale.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              scale() works

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.scale.large.html b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.scale.large.html new file mode 100644 index 0000000000..ce7f6d9fae --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.scale.large.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.transformation.scale.large + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.transformation.scale.large

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                scale() with large scale factors works

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Not really that large at all, but it hits the limits in Firefox. +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.scale.multiple.html b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.scale.multiple.html new file mode 100644 index 0000000000..73bfbc87c1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.scale.multiple.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.transformation.scale.multiple + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.transformation.scale.multiple

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Multiple scale()s combine

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.scale.negative.html b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.scale.negative.html new file mode 100644 index 0000000000..a5aef69b63 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.scale.negative.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.transformation.scale.negative + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.transformation.scale.negative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    scale() with negative scale factors works

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.scale.nonfinite.html b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.scale.nonfinite.html new file mode 100644 index 0000000000..c06f96eb22 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.scale.nonfinite.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.transformation.scale.nonfinite + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.transformation.scale.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      scale() with Infinity/NaN is ignored

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.scale.zero.html b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.scale.zero.html new file mode 100644 index 0000000000..ae15034a19 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.scale.zero.html @@ -0,0 +1,43 @@ + + +Canvas test: 2d.transformation.scale.zero + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.transformation.scale.zero

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        scale() with a scale factor of zero works

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.setTransform.multiple.html b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.setTransform.multiple.html new file mode 100644 index 0000000000..099831e638 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.setTransform.multiple.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.transformation.setTransform.multiple + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.transformation.setTransform.multiple

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.setTransform.nonfinite.html b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.setTransform.nonfinite.html new file mode 100644 index 0000000000..019493ad16 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.setTransform.nonfinite.html @@ -0,0 +1,109 @@ + + +Canvas test: 2d.transformation.setTransform.nonfinite + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.transformation.setTransform.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            setTransform() with Infinity/NaN is ignored

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.setTransform.skewed.html b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.setTransform.skewed.html new file mode 100644 index 0000000000..f6f8655b1e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.setTransform.skewed.html @@ -0,0 +1,54 @@ + + +Canvas test: 2d.transformation.setTransform.skewed + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.transformation.setTransform.skewed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.transform.identity.html b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.transform.identity.html new file mode 100644 index 0000000000..be5de19a45 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.transform.identity.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.transformation.transform.identity + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.transformation.transform.identity

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                transform() with the identity matrix does nothing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.transform.multiply.html b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.transform.multiply.html new file mode 100644 index 0000000000..1e8e4cccdf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.transform.multiply.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.transformation.transform.multiply + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.transformation.transform.multiply

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  transform() multiplies the CTM

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.transform.nonfinite.html b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.transform.nonfinite.html new file mode 100644 index 0000000000..d3fae8520c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.transform.nonfinite.html @@ -0,0 +1,109 @@ + + +Canvas test: 2d.transformation.transform.nonfinite + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.transformation.transform.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    transform() with Infinity/NaN is ignored

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.transform.skewed.html b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.transform.skewed.html new file mode 100644 index 0000000000..c69756bc1d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.transform.skewed.html @@ -0,0 +1,54 @@ + + +Canvas test: 2d.transformation.transform.skewed + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.transformation.transform.skewed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      transform() with skewy matrix transforms correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.translate.basic.html b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.translate.basic.html new file mode 100644 index 0000000000..189a1544b6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.translate.basic.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.transformation.translate.basic + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.transformation.translate.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        translate() works

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.translate.nonfinite.html b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.translate.nonfinite.html new file mode 100644 index 0000000000..0857693aff --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/transformations/2d.transformation.translate.nonfinite.html @@ -0,0 +1,41 @@ + + +Canvas test: 2d.transformation.translate.nonfinite + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.transformation.translate.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          translate() with Infinity/NaN is ignored

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/video/2d.video.invalid.html b/testing/web-platform/tests/html/canvas/element/video/2d.video.invalid.html new file mode 100644 index 0000000000..22b4e054f8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/video/2d.video.invalid.html @@ -0,0 +1,30 @@ + + +Canvas test: 2d.video.invalid + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.video.invalid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Verify test doesn't crash with invalid video.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.html b/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.html new file mode 100644 index 0000000000..9c3d1b3374 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.html @@ -0,0 +1,58 @@ + + +Canvas test: 2d.color.space.p3.fillText + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.color.space.p3.fillText

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Test if fillText can be used with a solid display-p3 color

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.shadow.html b/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.shadow.html new file mode 100644 index 0000000000..cc459fb2cd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.shadow.html @@ -0,0 +1,62 @@ + + +Canvas test: 2d.color.space.p3.fillText.shadow + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.color.space.p3.fillText.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Test if fillText can be used with a display-p3 shadow color

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.strokeText.html b/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.strokeText.html new file mode 100644 index 0000000000..626a41b49b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.strokeText.html @@ -0,0 +1,59 @@ + + +Canvas test: 2d.color.space.p3.strokeText + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.color.space.p3.strokeText

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test if strokeText can be used with a solid display-p3 color

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + diff --git a/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.to.p3.html b/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.to.p3.html new file mode 100644 index 0000000000..a03f49740f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.to.p3.html @@ -0,0 +1,38 @@ + + +Canvas test: 2d.color.space.p3.to.p3 + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2d.color.space.p3.to.p3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    test getImageData with display-p3 and uint8 from display p3 uint8 canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + diff --git a/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.to.srgb.html b/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.to.srgb.html new file mode 100644 index 0000000000..0433ae38c7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.to.srgb.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.color.space.p3.to.srgb + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2d.color.space.p3.to.srgb

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      test getImageData with srsb and uint8 from display p3 uint8 canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + diff --git a/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toBlob.p3.canvas.html b/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toBlob.p3.canvas.html new file mode 100644 index 0000000000..1a44af20a6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toBlob.p3.canvas.html @@ -0,0 +1,50 @@ + + +Canvas test: 2d.color.space.p3.toBlob.p3.canvas + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2d.color.space.p3.toBlob.p3.canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        test if toblob returns p3 data from p3 color space canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + diff --git a/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toBlob.with.putImageData.html b/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toBlob.with.putImageData.html new file mode 100644 index 0000000000..a53de72259 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toBlob.with.putImageData.html @@ -0,0 +1,56 @@ + + +Canvas test: 2d.color.space.p3.toBlob.with.putImageData + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2d.color.space.p3.toBlob.with.putImageData

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Use putImageData to put some p3 data in canvas and test if toBlob returns the same data

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + diff --git a/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.jpeg.p3.canvas.html b/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.jpeg.p3.canvas.html new file mode 100644 index 0000000000..e0986cb8e8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.jpeg.p3.canvas.html @@ -0,0 +1,46 @@ + + +Canvas test: 2d.color.space.p3.toDataURL.jpeg.p3.canvas + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2d.color.space.p3.toDataURL.jpeg.p3.canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            test if toDataURL('image/jpeg') returns p3 data from canvas with p3 color space

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + diff --git a/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.p3.canvas.html b/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.p3.canvas.html new file mode 100644 index 0000000000..94ba703980 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.p3.canvas.html @@ -0,0 +1,46 @@ + + +Canvas test: 2d.color.space.p3.toDataURL.p3.canvas + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2d.color.space.p3.toDataURL.p3.canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              test if toDataURL returns p3 data from canvas with p3 color space

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + diff --git a/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.with.putImageData.html b/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.with.putImageData.html new file mode 100644 index 0000000000..58d0718eba --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.with.putImageData.html @@ -0,0 +1,53 @@ + + +Canvas test: 2d.color.space.p3.toDataURL.with.putImageData + + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2d.color.space.p3.toDataURL.with.putImageData

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Use putImageData to put some p3 data in canvas and test if toDataURL returns the same data

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/2d.conformance.requirements.basics.html b/testing/web-platform/tests/html/canvas/offscreen/2d.conformance.requirements.basics.html new file mode 100644 index 0000000000..a89ec10f9b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/2d.conformance.requirements.basics.html @@ -0,0 +1,62 @@ + + +OffscreenCanvas test: 2d.conformance.requirements.basics + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.conformance.requirements.basics

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  void methods return undefined

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in "Web IDL" (draft) + diff --git a/testing/web-platform/tests/html/canvas/offscreen/2d.conformance.requirements.basics.worker.js b/testing/web-platform/tests/html/canvas/offscreen/2d.conformance.requirements.basics.worker.js new file mode 100644 index 0000000000..8d6ddc894f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/2d.conformance.requirements.basics.worker.js @@ -0,0 +1,58 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.conformance.requirements.basics +// Description:void methods return undefined +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in "Web IDL" (draft) + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("void methods return undefined"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + +var canvas = new OffscreenCanvas(100, 50); +var ctx = canvas.getContext('2d'); + +_assertSame(ctx.save(), undefined, "ctx.save()", "undefined"); +_assertSame(ctx.restore(), undefined, "ctx.restore()", "undefined"); +_assertSame(ctx.scale(1, 1), undefined, "ctx.scale(1, 1)", "undefined"); +_assertSame(ctx.rotate(0), undefined, "ctx.rotate(0)", "undefined"); +_assertSame(ctx.translate(0, 0), undefined, "ctx.translate(0, 0)", "undefined"); +if (ctx.transform) { // (avoid spurious failures, since the aim here is not to test that all features are supported) + _assertSame(ctx.transform(1, 0, 0, 1, 0, 0), undefined, "ctx.transform(1, 0, 0, 1, 0, 0)", "undefined"); +} +if (ctx.setTransform) { + _assertSame(ctx.setTransform(1, 0, 0, 1, 0, 0), undefined, "ctx.setTransform(1, 0, 0, 1, 0, 0)", "undefined"); + _assertSame(ctx.setTransform(), undefined, "ctx.setTransform()", "undefined"); +} +_assertSame(ctx.clearRect(0, 0, 0, 0), undefined, "ctx.clearRect(0, 0, 0, 0)", "undefined"); +_assertSame(ctx.fillRect(0, 0, 0, 0), undefined, "ctx.fillRect(0, 0, 0, 0)", "undefined"); +_assertSame(ctx.strokeRect(0, 0, 0, 0), undefined, "ctx.strokeRect(0, 0, 0, 0)", "undefined"); +_assertSame(ctx.beginPath(), undefined, "ctx.beginPath()", "undefined"); +_assertSame(ctx.closePath(), undefined, "ctx.closePath()", "undefined"); +_assertSame(ctx.moveTo(0, 0), undefined, "ctx.moveTo(0, 0)", "undefined"); +_assertSame(ctx.lineTo(0, 0), undefined, "ctx.lineTo(0, 0)", "undefined"); +_assertSame(ctx.quadraticCurveTo(0, 0, 0, 0), undefined, "ctx.quadraticCurveTo(0, 0, 0, 0)", "undefined"); +_assertSame(ctx.bezierCurveTo(0, 0, 0, 0, 0, 0), undefined, "ctx.bezierCurveTo(0, 0, 0, 0, 0, 0)", "undefined"); +_assertSame(ctx.arcTo(0, 0, 0, 0, 1), undefined, "ctx.arcTo(0, 0, 0, 0, 1)", "undefined"); +_assertSame(ctx.rect(0, 0, 0, 0), undefined, "ctx.rect(0, 0, 0, 0)", "undefined"); +_assertSame(ctx.arc(0, 0, 1, 0, 0, true), undefined, "ctx.arc(0, 0, 1, 0, 0, true)", "undefined"); +_assertSame(ctx.fill(), undefined, "ctx.fill()", "undefined"); +_assertSame(ctx.stroke(), undefined, "ctx.stroke()", "undefined"); +_assertSame(ctx.clip(), undefined, "ctx.clip()", "undefined"); +if (ctx.fillText) { + _assertSame(ctx.fillText('test', 0, 0), undefined, "ctx.fillText('test', 0, 0)", "undefined"); + _assertSame(ctx.strokeText('test', 0, 0), undefined, "ctx.strokeText('test', 0, 0)", "undefined"); +} +if (ctx.putImageData) { + _assertSame(ctx.putImageData(ctx.getImageData(0, 0, 1, 1), 0, 0), undefined, "ctx.putImageData(ctx.getImageData(0, 0, 1, 1), 0, 0)", "undefined"); +} +_assertSame(ctx.drawImage(canvas, 0, 0, 1, 1, 0, 0, 0, 0), undefined, "ctx.drawImage(canvas, 0, 0, 1, 1, 0, 0, 0, 0)", "undefined"); +_assertSame(ctx.createLinearGradient(0, 0, 0, 0).addColorStop(0, 'white'), undefined, "ctx.createLinearGradient(0, 0, 0, 0).addColorStop(0, 'white')", "undefined"); +t.done(); + +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/2d.conformance.requirements.missingargs.html b/testing/web-platform/tests/html/canvas/offscreen/2d.conformance.requirements.missingargs.html new file mode 100644 index 0000000000..cfbbca9e5e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/2d.conformance.requirements.missingargs.html @@ -0,0 +1,141 @@ + + +OffscreenCanvas test: 2d.conformance.requirements.missingargs + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.conformance.requirements.missingargs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Missing arguments cause TypeError

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/2d.conformance.requirements.missingargs.worker.js b/testing/web-platform/tests/html/canvas/offscreen/2d.conformance.requirements.missingargs.worker.js new file mode 100644 index 0000000000..fe1b111f05 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/2d.conformance.requirements.missingargs.worker.js @@ -0,0 +1,137 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.conformance.requirements.missingargs +// Description:Missing arguments cause TypeError +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Missing arguments cause TypeError"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + +var canvas = new OffscreenCanvas(100, 50); +var ctx = canvas.getContext('2d'); + +assert_throws_js(TypeError, function() { ctx.scale(); }); +assert_throws_js(TypeError, function() { ctx.scale(1); }); +assert_throws_js(TypeError, function() { ctx.rotate(); }); +assert_throws_js(TypeError, function() { ctx.translate(); }); +assert_throws_js(TypeError, function() { ctx.translate(0); }); +if (ctx.transform) { // (avoid spurious failures, since the aim here is not to test that all features are supported) + assert_throws_js(TypeError, function() { ctx.transform(); }); + assert_throws_js(TypeError, function() { ctx.transform(1); }); + assert_throws_js(TypeError, function() { ctx.transform(1, 0); }); + assert_throws_js(TypeError, function() { ctx.transform(1, 0, 0); }); + assert_throws_js(TypeError, function() { ctx.transform(1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.transform(1, 0, 0, 1, 0); }); +} +if (ctx.setTransform) { + assert_throws_js(TypeError, function() { ctx.setTransform(1); }); + assert_throws_js(TypeError, function() { ctx.setTransform(1, 0); }); + assert_throws_js(TypeError, function() { ctx.setTransform(1, 0, 0); }); + assert_throws_js(TypeError, function() { ctx.setTransform(1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.setTransform(1, 0, 0, 1, 0); }); +} +assert_throws_js(TypeError, function() { ctx.createLinearGradient(); }); +assert_throws_js(TypeError, function() { ctx.createLinearGradient(0); }); +assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0); }); +assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1); }); +assert_throws_js(TypeError, function() { ctx.createRadialGradient(); }); +assert_throws_js(TypeError, function() { ctx.createRadialGradient(0); }); +assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0); }); +assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1); }); +assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0); }); +assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0); }); +assert_throws_js(TypeError, function() { ctx.createPattern(canvas); }); +assert_throws_js(TypeError, function() { ctx.clearRect(); }); +assert_throws_js(TypeError, function() { ctx.clearRect(0); }); +assert_throws_js(TypeError, function() { ctx.clearRect(0, 0); }); +assert_throws_js(TypeError, function() { ctx.clearRect(0, 0, 0); }); +assert_throws_js(TypeError, function() { ctx.fillRect(); }); +assert_throws_js(TypeError, function() { ctx.fillRect(0); }); +assert_throws_js(TypeError, function() { ctx.fillRect(0, 0); }); +assert_throws_js(TypeError, function() { ctx.fillRect(0, 0, 0); }); +assert_throws_js(TypeError, function() { ctx.strokeRect(); }); +assert_throws_js(TypeError, function() { ctx.strokeRect(0); }); +assert_throws_js(TypeError, function() { ctx.strokeRect(0, 0); }); +assert_throws_js(TypeError, function() { ctx.strokeRect(0, 0, 0); }); +assert_throws_js(TypeError, function() { ctx.moveTo(); }); +assert_throws_js(TypeError, function() { ctx.moveTo(0); }); +assert_throws_js(TypeError, function() { ctx.lineTo(); }); +assert_throws_js(TypeError, function() { ctx.lineTo(0); }); +assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(); }); +assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(0); }); +assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(0, 0); }); +assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(0, 0, 0); }); +assert_throws_js(TypeError, function() { ctx.bezierCurveTo(); }); +assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0); }); +assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0); }); +assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0, 0); }); +assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0, 0, 0); }); +assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0, 0, 0, 0); }); +assert_throws_js(TypeError, function() { ctx.arcTo(); }); +assert_throws_js(TypeError, function() { ctx.arcTo(0); }); +assert_throws_js(TypeError, function() { ctx.arcTo(0, 0); }); +assert_throws_js(TypeError, function() { ctx.arcTo(0, 0, 0); }); +assert_throws_js(TypeError, function() { ctx.arcTo(0, 0, 0, 0); }); +assert_throws_js(TypeError, function() { ctx.rect(); }); +assert_throws_js(TypeError, function() { ctx.rect(0); }); +assert_throws_js(TypeError, function() { ctx.rect(0, 0); }); +assert_throws_js(TypeError, function() { ctx.rect(0, 0, 0); }); +assert_throws_js(TypeError, function() { ctx.arc(); }); +assert_throws_js(TypeError, function() { ctx.arc(0); }); +assert_throws_js(TypeError, function() { ctx.arc(0, 0); }); +assert_throws_js(TypeError, function() { ctx.arc(0, 0, 1); }); +assert_throws_js(TypeError, function() { ctx.arc(0, 0, 1, 0); }); +// (6th argument to arc is optional) +if (ctx.isPointInPath) { + assert_throws_js(TypeError, function() { ctx.isPointInPath(); }); + assert_throws_js(TypeError, function() { ctx.isPointInPath(0); }); +} +if (ctx.drawFocusRing) { + assert_throws_js(TypeError, function() { ctx.drawFocusRing(); }); + assert_throws_js(TypeError, function() { ctx.drawFocusRing(canvas); }); + assert_throws_js(TypeError, function() { ctx.drawFocusRing(canvas, 0); }); +} +if (ctx.fillText) { + assert_throws_js(TypeError, function() { ctx.fillText(); }); + assert_throws_js(TypeError, function() { ctx.fillText('test'); }); + assert_throws_js(TypeError, function() { ctx.fillText('test', 0); }); + assert_throws_js(TypeError, function() { ctx.strokeText(); }); + assert_throws_js(TypeError, function() { ctx.strokeText('test'); }); + assert_throws_js(TypeError, function() { ctx.strokeText('test', 0); }); + assert_throws_js(TypeError, function() { ctx.measureText(); }); +} +assert_throws_js(TypeError, function() { ctx.drawImage(); }); +assert_throws_js(TypeError, function() { ctx.drawImage(canvas); }); +assert_throws_js(TypeError, function() { ctx.drawImage(canvas, 0); }); +// TODO: n >= 3 args on drawImage could be either a valid overload, +// or too few for another overload, or too many for another +// overload - what should happen? +if (ctx.createImageData) { + assert_throws_js(TypeError, function() { ctx.createImageData(); }); + assert_throws_js(TypeError, function() { ctx.createImageData(1); }); +} +if (ctx.getImageData) { + assert_throws_js(TypeError, function() { ctx.getImageData(); }); + assert_throws_js(TypeError, function() { ctx.getImageData(0); }); + assert_throws_js(TypeError, function() { ctx.getImageData(0, 0); }); + assert_throws_js(TypeError, function() { ctx.getImageData(0, 0, 1); }); +} +if (ctx.putImageData) { + var imgdata = ctx.getImageData(0, 0, 1, 1); + assert_throws_js(TypeError, function() { ctx.putImageData(); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 0); }); +} +var g = ctx.createLinearGradient(0, 0, 0, 0); +assert_throws_js(TypeError, function() { g.addColorStop(); }); +assert_throws_js(TypeError, function() { g.addColorStop(0); }); +t.done(); + +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/META.yml b/testing/web-platform/tests/html/canvas/offscreen/META.yml new file mode 100644 index 0000000000..d0524194c9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/META.yml @@ -0,0 +1,7 @@ +spec: https://html.spec.whatwg.org/multipage/canvas.html#the-offscreencanvas-interface +suggested_reviewers: + - AmeliaBR + - annevk + - kenrussell + - fserb + - Cwiiis diff --git a/testing/web-platform/tests/html/canvas/offscreen/WEB_FEATURES.yml b/testing/web-platform/tests/html/canvas/offscreen/WEB_FEATURES.yml new file mode 100644 index 0000000000..b1f003a745 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/WEB_FEATURES.yml @@ -0,0 +1,3 @@ +features: +- name: offscreen-canvas + files: "**" diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.arguments.missing.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.arguments.missing.html new file mode 100644 index 0000000000..0c9fdc9639 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.arguments.missing.html @@ -0,0 +1,28 @@ + + +OffscreenCanvas test: 2d.canvas.context.arguments.missing + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.context.arguments.missing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.arguments.missing.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.arguments.missing.worker.js new file mode 100644 index 0000000000..1b5c857a79 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.arguments.missing.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.context.arguments.missing +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + assert_throws_js(TypeError, function() { offscreenCanvas2.getContext(); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.casesensitive.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.casesensitive.html new file mode 100644 index 0000000000..aed71a37e9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.casesensitive.html @@ -0,0 +1,28 @@ + + +OffscreenCanvas test: 2d.canvas.context.casesensitive + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.context.casesensitive

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Context name "2D" is unrecognised; matching is case sensitive

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.casesensitive.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.casesensitive.worker.js new file mode 100644 index 0000000000..c1df3a9f80 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.casesensitive.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.context.casesensitive +// Description:Context name "2D" is unrecognised; matching is case sensitive +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Context name \"2D\" is unrecognised; matching is case sensitive"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + assert_throws_js(TypeError, function() { offscreenCanvas2.getContext('2D'); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.emptystring.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.emptystring.html new file mode 100644 index 0000000000..10548a6b7c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.emptystring.html @@ -0,0 +1,28 @@ + + +OffscreenCanvas test: 2d.canvas.context.emptystring + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.context.emptystring

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  getContext with empty string returns null

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.emptystring.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.emptystring.worker.js new file mode 100644 index 0000000000..53a58c1f5d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.emptystring.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.context.emptystring +// Description:getContext with empty string returns null +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("getContext with empty string returns null"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + assert_throws_js(TypeError, function() { offscreenCanvas2.getContext(""); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.exists.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.exists.html new file mode 100644 index 0000000000..41b5cfee31 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.exists.html @@ -0,0 +1,28 @@ + + +OffscreenCanvas test: 2d.canvas.context.exists + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.context.exists

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The 2D context is implemented

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.exists.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.exists.worker.js new file mode 100644 index 0000000000..77a43530a0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.exists.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.context.exists +// Description:The 2D context is implemented +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("The 2D context is implemented"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + _assertDifferent(offscreenCanvas2.getContext('2d'), null, "offscreenCanvas2.getContext('2d')", "null"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.extraargs.cache.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.extraargs.cache.html new file mode 100644 index 0000000000..2bcf34490e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.extraargs.cache.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.canvas.context.extraargs.cache + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.context.extraargs.cache

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The 2D context doesn't throw with extra getContext arguments (cached)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.extraargs.cache.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.extraargs.cache.worker.js new file mode 100644 index 0000000000..14284a0a7d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.extraargs.cache.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.context.extraargs.cache +// Description:The 2D context doesn't throw with extra getContext arguments (cached) +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("The 2D context doesn't throw with extra getContext arguments (cached)"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertDifferent(canvas.getContext('2d', false, {}, [], 1, "2"), null, "canvas.getContext('2d', false, {}, [], 1, \"2\")", "null"); + _assertDifferent(canvas.getContext('2d', 123), null, "canvas.getContext('2d', 123)", "null"); + _assertDifferent(canvas.getContext('2d', "test"), null, "canvas.getContext('2d', \"test\")", "null"); + _assertDifferent(canvas.getContext('2d', undefined), null, "canvas.getContext('2d', undefined)", "null"); + _assertDifferent(canvas.getContext('2d', null), null, "canvas.getContext('2d', null)", "null"); + _assertDifferent(canvas.getContext('2d', Symbol.hasInstance), null, "canvas.getContext('2d', Symbol.hasInstance)", "null"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.extraargs.create.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.extraargs.create.html new file mode 100644 index 0000000000..029122355c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.extraargs.create.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.canvas.context.extraargs.create + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.context.extraargs.create

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The 2D context doesn't throw with extra getContext arguments (new context)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.extraargs.create.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.extraargs.create.worker.js new file mode 100644 index 0000000000..b4208edba8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.extraargs.create.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.context.extraargs.create +// Description:The 2D context doesn't throw with extra getContext arguments (new context) +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("The 2D context doesn't throw with extra getContext arguments (new context)"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', false, {}, [], 1, "2"), null, "(new OffscreenCanvas(100, 50)).getContext('2d', false, {}, [], 1, \"2\")", "null"); + _assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', 123), null, "(new OffscreenCanvas(100, 50)).getContext('2d', 123)", "null"); + _assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', "test"), null, "(new OffscreenCanvas(100, 50)).getContext('2d', \"test\")", "null"); + _assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', undefined), null, "(new OffscreenCanvas(100, 50)).getContext('2d', undefined)", "null"); + _assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', null), null, "(new OffscreenCanvas(100, 50)).getContext('2d', null)", "null"); + _assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', Symbol.hasInstance), null, "(new OffscreenCanvas(100, 50)).getContext('2d', Symbol.hasInstance)", "null"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.shared.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.shared.html new file mode 100644 index 0000000000..cb9501747e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.shared.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.canvas.context.shared + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.context.shared

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  getContext('2d') returns objects which share canvas state

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.shared.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.shared.worker.js new file mode 100644 index 0000000000..8e53475756 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.shared.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.context.shared +// Description:getContext('2d') returns objects which share canvas state +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("getContext('2d') returns objects which share canvas state"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var ctx2 = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx2.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unique.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unique.html new file mode 100644 index 0000000000..66e4a049ba --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unique.html @@ -0,0 +1,28 @@ + + +OffscreenCanvas test: 2d.canvas.context.unique + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.context.unique

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  getContext('2d') returns the same object

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unique.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unique.worker.js new file mode 100644 index 0000000000..275e45fde6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unique.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.context.unique +// Description:getContext('2d') returns the same object +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("getContext('2d') returns the same object"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + _assertSame(offscreenCanvas2.getContext('2d'), offscreenCanvas2.getContext('2d'), "offscreenCanvas2.getContext('2d')", "offscreenCanvas2.getContext('2d')"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.badname.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.badname.html new file mode 100644 index 0000000000..4313f40843 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.badname.html @@ -0,0 +1,28 @@ + + +OffscreenCanvas test: 2d.canvas.context.unrecognised.badname + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.context.unrecognised.badname

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  getContext with unrecognised context name returns null

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.badname.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.badname.worker.js new file mode 100644 index 0000000000..dd16f2fbe1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.badname.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.context.unrecognised.badname +// Description:getContext with unrecognised context name returns null +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("getContext with unrecognised context name returns null"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + assert_throws_js(TypeError, function() { offscreenCanvas2.getContext('This is not an implemented context in any real browser'); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.badsuffix.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.badsuffix.html new file mode 100644 index 0000000000..c00afa686e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.badsuffix.html @@ -0,0 +1,28 @@ + + +OffscreenCanvas test: 2d.canvas.context.unrecognised.badsuffix + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.context.unrecognised.badsuffix

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Context name "2d" plus a suffix is unrecognised

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.badsuffix.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.badsuffix.worker.js new file mode 100644 index 0000000000..5e684c92c7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.badsuffix.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.context.unrecognised.badsuffix +// Description:Context name "2d" plus a suffix is unrecognised +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Context name \"2d\" plus a suffix is unrecognised"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + assert_throws_js(TypeError, function() { offscreenCanvas2.getContext("2d#"); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.nullsuffix.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.nullsuffix.html new file mode 100644 index 0000000000..0ce3d4195e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.nullsuffix.html @@ -0,0 +1,28 @@ + + +OffscreenCanvas test: 2d.canvas.context.unrecognised.nullsuffix + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.context.unrecognised.nullsuffix

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Context name "2d" plus a "\0" suffix is unrecognised

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.nullsuffix.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.nullsuffix.worker.js new file mode 100644 index 0000000000..2886010fb6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.nullsuffix.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.context.unrecognised.nullsuffix +// Description:Context name "2d" plus a "\0" suffix is unrecognised +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Context name \"2d\" plus a \"\\0\" suffix is unrecognised"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + assert_throws_js(TypeError, function() { offscreenCanvas2.getContext("2d\0"); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.unicode.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.unicode.html new file mode 100644 index 0000000000..316123675a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.unicode.html @@ -0,0 +1,28 @@ + + +OffscreenCanvas test: 2d.canvas.context.unrecognised.unicode + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.context.unrecognised.unicode

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Context name which kind of looks like "2d" is unrecognised

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.unicode.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.unicode.worker.js new file mode 100644 index 0000000000..46e562dd48 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.canvas.context.unrecognised.unicode.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.context.unrecognised.unicode +// Description:Context name which kind of looks like "2d" is unrecognised +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Context name which kind of looks like \"2d\" is unrecognised"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + assert_throws_js(TypeError, function() { offscreenCanvas2.getContext("2\uFF44"); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.getContext.options.any.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.getContext.options.any.js new file mode 100644 index 0000000000..930f7722ee --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-context/2d.getContext.options.any.js @@ -0,0 +1,46 @@ +test(() => { + const expected = [ + "alpha", + "colorSpace", + "colorSpace toString", + "desynchronized", + "willReadFrequently", + ]; + var actual = []; + const options = { + get alpha() { + actual.push("alpha"); + return true; + }, + get willReadFrequently() { + actual.push("willReadFrequently"); + return false; + }, + get desynchronized() { + actual.push("desynchronized"); + return false; + }, + get colorSpace() { + actual.push("colorSpace"); + return { + toString() { + actual.push("colorSpace toString"); + return "srgb"; + } + }; + }, + }; + + const canvas = new OffscreenCanvas(100, 50); + const context = canvas.getContext('2d', options); + assert_not_equals(context, null, "context"); + assert_array_equals(actual, expected, "order of operations (creation)"); + actual = []; + assert_equals(canvas.getContext('2d', options), context, "cached context"); + // Getting the cached context does not involve the options argument at all; + // the context retains its existing settings, and the new options (if any) + // are ignored. + // Therefore, there is no expectation that the 'options' dictionary will be + // accessed again here, and we cannot predict the contents, if any, of the + // 'actual' array. +}); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.color.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.color.html new file mode 100644 index 0000000000..0793c74f39 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.color.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.canvas.host.initial.color + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.initial.color

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Initial state is transparent black

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.color.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.color.worker.js new file mode 100644 index 0000000000..11d6b9f098 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.color.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.initial.color +// Description:Initial state is transparent black +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Initial state is transparent black"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertPixel(canvas, 20,20, 0,0,0,0); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.2dstate.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.2dstate.html new file mode 100644 index 0000000000..36230dab77 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.2dstate.html @@ -0,0 +1,89 @@ + + +OffscreenCanvas test: 2d.canvas.host.initial.reset.2dstate + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.initial.reset.2dstate

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Resetting the canvas state resets 2D state variables

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.2dstate.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.2dstate.worker.js new file mode 100644 index 0000000000..df0bd9f63c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.2dstate.worker.js @@ -0,0 +1,84 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.initial.reset.2dstate +// Description:Resetting the canvas state resets 2D state variables +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Resetting the canvas state resets 2D state variables"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = 100; + var default_val; + + default_val = ctx.strokeStyle; + ctx.strokeStyle = "#ff0000"; + canvas.width = 100; + _assertSame(ctx.strokeStyle, default_val, "ctx.strokeStyle", "default_val"); + + default_val = ctx.fillStyle; + ctx.fillStyle = "#ff0000"; + canvas.width = 100; + _assertSame(ctx.fillStyle, default_val, "ctx.fillStyle", "default_val"); + + default_val = ctx.globalAlpha; + ctx.globalAlpha = 0.5; + canvas.width = 100; + _assertSame(ctx.globalAlpha, default_val, "ctx.globalAlpha", "default_val"); + + default_val = ctx.lineWidth; + ctx.lineWidth = 0.5; + canvas.width = 100; + _assertSame(ctx.lineWidth, default_val, "ctx.lineWidth", "default_val"); + + default_val = ctx.lineCap; + ctx.lineCap = "round"; + canvas.width = 100; + _assertSame(ctx.lineCap, default_val, "ctx.lineCap", "default_val"); + + default_val = ctx.lineJoin; + ctx.lineJoin = "round"; + canvas.width = 100; + _assertSame(ctx.lineJoin, default_val, "ctx.lineJoin", "default_val"); + + default_val = ctx.miterLimit; + ctx.miterLimit = 0.5; + canvas.width = 100; + _assertSame(ctx.miterLimit, default_val, "ctx.miterLimit", "default_val"); + + default_val = ctx.shadowOffsetX; + ctx.shadowOffsetX = 5; + canvas.width = 100; + _assertSame(ctx.shadowOffsetX, default_val, "ctx.shadowOffsetX", "default_val"); + + default_val = ctx.shadowOffsetY; + ctx.shadowOffsetY = 5; + canvas.width = 100; + _assertSame(ctx.shadowOffsetY, default_val, "ctx.shadowOffsetY", "default_val"); + + default_val = ctx.shadowBlur; + ctx.shadowBlur = 5; + canvas.width = 100; + _assertSame(ctx.shadowBlur, default_val, "ctx.shadowBlur", "default_val"); + + default_val = ctx.shadowColor; + ctx.shadowColor = "#ff0000"; + canvas.width = 100; + _assertSame(ctx.shadowColor, default_val, "ctx.shadowColor", "default_val"); + + default_val = ctx.globalCompositeOperation; + ctx.globalCompositeOperation = "copy"; + canvas.width = 100; + _assertSame(ctx.globalCompositeOperation, default_val, "ctx.globalCompositeOperation", "default_val"); + + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.clip.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.clip.html new file mode 100644 index 0000000000..fc53240795 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.clip.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.canvas.host.initial.reset.clip + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.initial.reset.clip

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Resetting the canvas state resets the current clip region

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.clip.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.clip.worker.js new file mode 100644 index 0000000000..80554b0a3f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.clip.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.initial.reset.clip +// Description:Resetting the canvas state resets the current clip region +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Resetting the canvas state resets the current clip region"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = 100; + ctx.rect(0, 0, 1, 1); + ctx.clip(); + canvas.width = 100; + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 20,20, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.different.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.different.html new file mode 100644 index 0000000000..3771a5e37a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.different.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.canvas.host.initial.reset.different + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.initial.reset.different

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Changing size resets canvas to transparent black

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.different.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.different.worker.js new file mode 100644 index 0000000000..6074d4f2a2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.different.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.initial.reset.different +// Description:Changing size resets canvas to transparent black +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Changing size resets canvas to transparent black"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 20,20, 255,0,0,255); + canvas.width = 50; + _assertPixel(canvas, 20,20, 0,0,0,0); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.gradient.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.gradient.html new file mode 100644 index 0000000000..387b4d1f1e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.gradient.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.canvas.host.initial.reset.gradient + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.initial.reset.gradient

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Resetting the canvas state does not invalidate any existing gradients

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.gradient.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.gradient.worker.js new file mode 100644 index 0000000000..9029b48056 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.gradient.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.initial.reset.gradient +// Description:Resetting the canvas state does not invalidate any existing gradients +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Resetting the canvas state does not invalidate any existing gradients"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = 50; + var g = ctx.createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#0f0'); + canvas.width = 100; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.path.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.path.html new file mode 100644 index 0000000000..3a887a8f1f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.path.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.canvas.host.initial.reset.path + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.initial.reset.path

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Resetting the canvas state resets the current path

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.path.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.path.worker.js new file mode 100644 index 0000000000..0ab12872ae --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.path.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.initial.reset.path +// Description:Resetting the canvas state resets the current path +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Resetting the canvas state resets the current path"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = 100; + ctx.rect(0, 0, 100, 50); + canvas.width = 100; + ctx.fillStyle = '#f00'; + ctx.fill(); + _assertPixel(canvas, 20,20, 0,0,0,0); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.pattern.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.pattern.html new file mode 100644 index 0000000000..d822f90917 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.pattern.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.canvas.host.initial.reset.pattern + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.initial.reset.pattern

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Resetting the canvas state does not invalidate any existing patterns

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.pattern.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.pattern.worker.js new file mode 100644 index 0000000000..c4870a6f99 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.pattern.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.initial.reset.pattern +// Description:Resetting the canvas state does not invalidate any existing patterns +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Resetting the canvas state does not invalidate any existing patterns"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = 30; + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 30, 50); + var p = ctx.createPattern(canvas, 'repeat-x'); + canvas.width = 100; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = p; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.same.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.same.html new file mode 100644 index 0000000000..19394def37 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.same.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.canvas.host.initial.reset.same + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.initial.reset.same

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Setting size (not changing the value) resets canvas to transparent black

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.same.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.same.worker.js new file mode 100644 index 0000000000..48d24750ac --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.same.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.initial.reset.same +// Description:Setting size (not changing the value) resets canvas to transparent black +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Setting size (not changing the value) resets canvas to transparent black"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = 100; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 20,20, 255,0,0,255); + canvas.width = 100; + _assertPixel(canvas, 20,20, 0,0,0,0); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.transform.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.transform.html new file mode 100644 index 0000000000..ee3b5abf10 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.transform.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.canvas.host.initial.reset.transform + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.initial.reset.transform

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Resetting the canvas state resets the current transformation matrix

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.transform.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.transform.worker.js new file mode 100644 index 0000000000..218e64fa5d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.transform.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.initial.reset.transform +// Description:Resetting the canvas state resets the current transformation matrix +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Resetting the canvas state resets the current transformation matrix"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = 100; + ctx.scale(0.1, 0.1); + canvas.width = 100; + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 20,20, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.readonly.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.readonly.html new file mode 100644 index 0000000000..0e7e10cd24 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.readonly.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.canvas.host.readonly + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.readonly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  canvas is readonly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.readonly.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.readonly.worker.js new file mode 100644 index 0000000000..bbe50dcf61 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.readonly.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.readonly +// Description:canvas is readonly +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("canvas is readonly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var d = ctx.canvas; + _assertDifferent(offscreenCanvas2, d, "offscreenCanvas2", "d"); + ctx.canvas = offscreenCanvas2; + _assertSame(ctx.canvas, d, "ctx.canvas", "d"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.reference.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.reference.html new file mode 100644 index 0000000000..b5de73f403 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.reference.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.canvas.host.reference + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.reference

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  canvas refers back to its canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.reference.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.reference.worker.js new file mode 100644 index 0000000000..7a1f0c5ab4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.reference.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.reference +// Description:canvas refers back to its canvas +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("canvas refers back to its canvas"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.canvas, canvas, "ctx.canvas", "canvas"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.default.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.default.html new file mode 100644 index 0000000000..dc7b894b20 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.default.html @@ -0,0 +1,28 @@ + + +OffscreenCanvas test: 2d.canvas.host.size.attributes.default + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.size.attributes.default

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Default width/height when attributes are missing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.default.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.default.worker.js new file mode 100644 index 0000000000..78fce5aef8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.default.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.size.attributes.default +// Description:Default width/height when attributes are missing +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Default width/height when attributes are missing"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 50, "canvas.height", "50"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.idl.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.idl.html new file mode 100644 index 0000000000..7030103524 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.idl.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.canvas.host.size.attributes.idl + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.size.attributes.idl

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Getting/setting width/height IDL attributes

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.idl.set.zero.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.idl.set.zero.html new file mode 100644 index 0000000000..347c460cd7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.idl.set.zero.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.canvas.host.size.attributes.idl.set.zero + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.size.attributes.idl.set.zero

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Setting width/height IDL attributes to 0

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.idl.set.zero.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.idl.set.zero.worker.js new file mode 100644 index 0000000000..21535da0eb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.idl.set.zero.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.size.attributes.idl.set.zero +// Description:Setting width/height IDL attributes to 0 +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Setting width/height IDL attributes to 0"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = 0; + canvas.height = 0; + _assertSame(canvas.width, 0, "canvas.width", "0"); + _assertSame(canvas.height, 0, "canvas.height", "0"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.idl.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.idl.worker.js new file mode 100644 index 0000000000..a00201f18c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.idl.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.size.attributes.idl +// Description:Getting/setting width/height IDL attributes +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Getting/setting width/height IDL attributes"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = "100"; + canvas.height = "100"; + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + canvas.width = "+1.5e2"; + canvas.height = "0x96"; + _assertSame(canvas.width, 150, "canvas.width", "150"); + _assertSame(canvas.height, 150, "canvas.height", "150"); + canvas.width = 301.999; + canvas.height = 301.001; + _assertSame(canvas.width, 301, "canvas.width", "301"); + _assertSame(canvas.height, 301, "canvas.height", "301"); + assert_throws_js(TypeError, function() { canvas.width = "400x"; }); + assert_throws_js(TypeError, function() { canvas.height = "foo"; }); + _assertSame(canvas.width, 301, "canvas.width", "301"); + _assertSame(canvas.height, 301, "canvas.height", "301"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.decimal.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.decimal.html new file mode 100644 index 0000000000..c3fa3b4ba6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.decimal.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.canvas.host.size.attributes.parse.decimal + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.size.attributes.parse.decimal

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parsing of non-negative integers

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.decimal.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.decimal.worker.js new file mode 100644 index 0000000000..1267bb205a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.decimal.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.size.attributes.parse.decimal +// Description:Parsing of non-negative integers +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Parsing of non-negative integers"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = '100.999'; + canvas.height = '100.999'; + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.em.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.em.html new file mode 100644 index 0000000000..ea6f811b8f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.em.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.canvas.host.size.attributes.parse.em + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.size.attributes.parse.em

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parsing of non-negative integers

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.em.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.em.worker.js new file mode 100644 index 0000000000..2f0642d997 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.em.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.size.attributes.parse.em +// Description:Parsing of non-negative integers +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Parsing of non-negative integers"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_js(TypeError, function() { canvas.width = '100em'; }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.empty.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.empty.html new file mode 100644 index 0000000000..d38c159a6e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.empty.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.canvas.host.size.attributes.parse.empty + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.size.attributes.parse.empty

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parsing of non-negative integers

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.empty.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.empty.worker.js new file mode 100644 index 0000000000..b1eee3a5b2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.empty.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.size.attributes.parse.empty +// Description:Parsing of non-negative integers +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Parsing of non-negative integers"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = ''; + canvas.height = ''; + _assertSame(canvas.width, 0, "canvas.width", "0"); + _assertSame(canvas.height, 0, "canvas.height", "0"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.exp.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.exp.html new file mode 100644 index 0000000000..2aa8245a49 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.exp.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.canvas.host.size.attributes.parse.exp + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.size.attributes.parse.exp

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parsing of non-negative integers

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.exp.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.exp.worker.js new file mode 100644 index 0000000000..8c8b4cc715 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.exp.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.size.attributes.parse.exp +// Description:Parsing of non-negative integers +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Parsing of non-negative integers"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = '100e1'; + canvas.height = '100e1'; + _assertSame(canvas.width, 1000.0, "canvas.width", "1000.0"); + _assertSame(canvas.height, 1000.0, "canvas.height", "1000.0"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.hex.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.hex.html new file mode 100644 index 0000000000..4b0e47b53f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.hex.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.canvas.host.size.attributes.parse.hex + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.size.attributes.parse.hex

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parsing of non-negative integers

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.hex.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.hex.worker.js new file mode 100644 index 0000000000..b685aaffa2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.hex.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.size.attributes.parse.hex +// Description:Parsing of non-negative integers +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Parsing of non-negative integers"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = '0x100'; + canvas.height = '0x100'; + _assertSame(canvas.width, 256, "canvas.width", "256"); + _assertSame(canvas.height, 256, "canvas.height", "256"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.junk.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.junk.html new file mode 100644 index 0000000000..a619651f78 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.junk.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.canvas.host.size.attributes.parse.junk + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.size.attributes.parse.junk

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parsing of non-negative integers

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.junk.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.junk.worker.js new file mode 100644 index 0000000000..f4822f4bd9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.junk.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.size.attributes.parse.junk +// Description:Parsing of non-negative integers +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Parsing of non-negative integers"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_js(TypeError, function() { canvas.width = '#!?'; }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.minus.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.minus.html new file mode 100644 index 0000000000..c7f12fdb02 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.minus.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.canvas.host.size.attributes.parse.minus + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.size.attributes.parse.minus

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parsing of non-negative integers

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.minus.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.minus.worker.js new file mode 100644 index 0000000000..322b992eda --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.minus.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.size.attributes.parse.minus +// Description:Parsing of non-negative integers +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Parsing of non-negative integers"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_js(TypeError, function() { canvas.width = '-100'; }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.octal.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.octal.html new file mode 100644 index 0000000000..7bfb7658d4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.octal.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.canvas.host.size.attributes.parse.octal + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.size.attributes.parse.octal

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parsing of non-negative integers

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.octal.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.octal.worker.js new file mode 100644 index 0000000000..ce518e35c7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.octal.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.size.attributes.parse.octal +// Description:Parsing of non-negative integers +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Parsing of non-negative integers"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = '0100'; + canvas.height = '0100'; + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.onlyspace.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.onlyspace.html new file mode 100644 index 0000000000..16dace16ea --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.onlyspace.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.canvas.host.size.attributes.parse.onlyspace + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.size.attributes.parse.onlyspace

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parsing of non-negative integers

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.onlyspace.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.onlyspace.worker.js new file mode 100644 index 0000000000..c186a4c08b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.onlyspace.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.size.attributes.parse.onlyspace +// Description:Parsing of non-negative integers +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Parsing of non-negative integers"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = ' '; + canvas.height = ' '; + _assertSame(canvas.width, 0, "canvas.width", "0"); + _assertSame(canvas.height, 0, "canvas.height", "0"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.percent.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.percent.html new file mode 100644 index 0000000000..040a775ec7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.percent.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.canvas.host.size.attributes.parse.percent + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.size.attributes.parse.percent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parsing of non-negative integers

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.percent.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.percent.worker.js new file mode 100644 index 0000000000..f38a1862d4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.percent.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.size.attributes.parse.percent +// Description:Parsing of non-negative integers +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Parsing of non-negative integers"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_js(TypeError, function() { canvas.width = '100%'; }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.plus.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.plus.html new file mode 100644 index 0000000000..50c8467e2c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.plus.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.canvas.host.size.attributes.parse.plus + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.size.attributes.parse.plus

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parsing of non-negative integers

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.plus.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.plus.worker.js new file mode 100644 index 0000000000..bb45a1e4fa --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.plus.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.size.attributes.parse.plus +// Description:Parsing of non-negative integers +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Parsing of non-negative integers"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = '+100'; + canvas.height = '+100'; + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.space.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.space.html new file mode 100644 index 0000000000..cb1f3ae840 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.space.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.canvas.host.size.attributes.parse.space + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.size.attributes.parse.space

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parsing of non-negative integers

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.space.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.space.worker.js new file mode 100644 index 0000000000..967a0939d8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.space.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.size.attributes.parse.space +// Description:Parsing of non-negative integers +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Parsing of non-negative integers"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = ' 100'; + canvas.height = ' 100'; + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.trailingjunk.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.trailingjunk.html new file mode 100644 index 0000000000..8d8d481aef --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.trailingjunk.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.canvas.host.size.attributes.parse.trailingjunk + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.size.attributes.parse.trailingjunk

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parsing of non-negative integers

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.trailingjunk.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.trailingjunk.worker.js new file mode 100644 index 0000000000..ffebcd97f1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.trailingjunk.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.size.attributes.parse.trailingjunk +// Description:Parsing of non-negative integers +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Parsing of non-negative integers"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_js(TypeError, function() { canvas.width = '100#!?'; }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.whitespace.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.whitespace.html new file mode 100644 index 0000000000..f6e29d6cb6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.whitespace.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.canvas.host.size.attributes.parse.whitespace + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.size.attributes.parse.whitespace

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parsing of non-negative integers

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.whitespace.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.whitespace.worker.js new file mode 100644 index 0000000000..fb7ba47975 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.whitespace.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.size.attributes.parse.whitespace +// Description:Parsing of non-negative integers +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Parsing of non-negative integers"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = ' 100'; + canvas.height = ' 100'; + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.zero.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.zero.html new file mode 100644 index 0000000000..07e924a603 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.zero.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.canvas.host.size.attributes.parse.zero + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.size.attributes.parse.zero

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parsing of non-negative integers

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.zero.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.zero.worker.js new file mode 100644 index 0000000000..1363bff772 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.parse.zero.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.size.attributes.parse.zero +// Description:Parsing of non-negative integers +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Parsing of non-negative integers"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = '0'; + canvas.height = '0'; + _assertSame(canvas.width, 0, "canvas.width", "0"); + _assertSame(canvas.height, 0, "canvas.height", "0"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.reflect.setidl.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.reflect.setidl.html new file mode 100644 index 0000000000..d24b2cc49f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.reflect.setidl.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.canvas.host.size.attributes.reflect.setidl + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.size.attributes.reflect.setidl

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Setting IDL attributes updates IDL and content attributes

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.reflect.setidl.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.reflect.setidl.worker.js new file mode 100644 index 0000000000..3b3ced124a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.reflect.setidl.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.size.attributes.reflect.setidl +// Description:Setting IDL attributes updates IDL and content attributes +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Setting IDL attributes updates IDL and content attributes"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = 120; + canvas.height = 60; + _assertSame(canvas.width, 120, "canvas.width", "120"); + _assertSame(canvas.height, 60, "canvas.height", "60"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.reflect.setidlzero.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.reflect.setidlzero.html new file mode 100644 index 0000000000..c4839afb0e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.reflect.setidlzero.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.canvas.host.size.attributes.reflect.setidlzero + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.size.attributes.reflect.setidlzero

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Setting IDL attributes to 0 updates IDL and content attributes

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.reflect.setidlzero.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.reflect.setidlzero.worker.js new file mode 100644 index 0000000000..d440a9d807 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.attributes.reflect.setidlzero.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.size.attributes.reflect.setidlzero +// Description:Setting IDL attributes to 0 updates IDL and content attributes +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Setting IDL attributes to 0 updates IDL and content attributes"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = 0; + canvas.height = 0; + _assertSame(canvas.width, 0, "canvas.width", "0"); + _assertSame(canvas.height, 0, "canvas.height", "0"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.large.html b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.large.html new file mode 100644 index 0000000000..b220f8f2ed --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.large.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.canvas.host.size.large + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.canvas.host.size.large

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Not sure how reasonable this is, but the spec doesn't say there's an upper limit on the size. + diff --git a/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.large.worker.js b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.large.worker.js new file mode 100644 index 0000000000..a763704131 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.large.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.canvas.host.size.large +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Not sure how reasonable this is, but the spec doesn't say there's an upper limit on the size. + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var n = 2147483647; // 2^31 - 1, which should be supported by any sensible definition of "long" + canvas.width = n; + canvas.height = n; + _assertSame(canvas.width, n, "canvas.width", "n"); + _assertSame(canvas.height, n, "canvas.height", "n"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.clear.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.clear.html new file mode 100644 index 0000000000..eac9dbdef9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.clear.html @@ -0,0 +1,46 @@ + + +OffscreenCanvas test: 2d.composite.canvas.clear + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.canvas.clear

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.clear.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.clear.worker.js new file mode 100644 index 0000000000..2f9fb92da1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.clear.worker.js @@ -0,0 +1,41 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.canvas.clear +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'clear'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.copy.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.copy.html new file mode 100644 index 0000000000..7c9771c10f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.copy.html @@ -0,0 +1,46 @@ + + +OffscreenCanvas test: 2d.composite.canvas.copy + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.canvas.copy

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.copy.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.copy.worker.js new file mode 100644 index 0000000000..5b071665ce --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.copy.worker.js @@ -0,0 +1,41 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.canvas.copy +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 255,255,0,191, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-atop.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-atop.html new file mode 100644 index 0000000000..d9c34ded0b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-atop.html @@ -0,0 +1,46 @@ + + +OffscreenCanvas test: 2d.composite.canvas.destination-atop + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.canvas.destination-atop

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-atop.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-atop.worker.js new file mode 100644 index 0000000000..58828619a3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-atop.worker.js @@ -0,0 +1,41 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.canvas.destination-atop +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 128,255,128,191, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-in.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-in.html new file mode 100644 index 0000000000..9c1a8dbf47 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-in.html @@ -0,0 +1,46 @@ + + +OffscreenCanvas test: 2d.composite.canvas.destination-in + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.canvas.destination-in

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-in.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-in.worker.js new file mode 100644 index 0000000000..4e2ec058ec --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-in.worker.js @@ -0,0 +1,41 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.canvas.destination-in +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,255,255,96, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-out.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-out.html new file mode 100644 index 0000000000..10c5baf485 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-out.html @@ -0,0 +1,46 @@ + + +OffscreenCanvas test: 2d.composite.canvas.destination-out + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.canvas.destination-out

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-out.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-out.worker.js new file mode 100644 index 0000000000..bc7be056a1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-out.worker.js @@ -0,0 +1,41 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.canvas.destination-out +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-out'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,255,255,32, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-over.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-over.html new file mode 100644 index 0000000000..0e2ece9eab --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-over.html @@ -0,0 +1,46 @@ + + +OffscreenCanvas test: 2d.composite.canvas.destination-over + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.canvas.destination-over

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-over.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-over.worker.js new file mode 100644 index 0000000000..c1d15a0959 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-over.worker.js @@ -0,0 +1,41 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.canvas.destination-over +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-over'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 109,255,146,223, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.lighter.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.lighter.html new file mode 100644 index 0000000000..392bb855f6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.lighter.html @@ -0,0 +1,46 @@ + + +OffscreenCanvas test: 2d.composite.canvas.lighter + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.canvas.lighter

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.lighter.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.lighter.worker.js new file mode 100644 index 0000000000..df494f22d3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.lighter.worker.js @@ -0,0 +1,41 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.canvas.lighter +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'lighter'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 191,255,128,255, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-atop.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-atop.html new file mode 100644 index 0000000000..f7d4da4d84 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-atop.html @@ -0,0 +1,46 @@ + + +OffscreenCanvas test: 2d.composite.canvas.source-atop + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.canvas.source-atop

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-atop.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-atop.worker.js new file mode 100644 index 0000000000..781a89c1b6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-atop.worker.js @@ -0,0 +1,41 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.canvas.source-atop +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-atop'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-in.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-in.html new file mode 100644 index 0000000000..69e57e2578 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-in.html @@ -0,0 +1,46 @@ + + +OffscreenCanvas test: 2d.composite.canvas.source-in + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.canvas.source-in

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-in.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-in.worker.js new file mode 100644 index 0000000000..484399acfc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-in.worker.js @@ -0,0 +1,41 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.canvas.source-in +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-out.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-out.html new file mode 100644 index 0000000000..eb9dbd0810 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-out.html @@ -0,0 +1,46 @@ + + +OffscreenCanvas test: 2d.composite.canvas.source-out + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.canvas.source-out

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-out.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-out.worker.js new file mode 100644 index 0000000000..d0d6cc12e9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-out.worker.js @@ -0,0 +1,41 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.canvas.source-out +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-over.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-over.html new file mode 100644 index 0000000000..98629de8a4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-over.html @@ -0,0 +1,46 @@ + + +OffscreenCanvas test: 2d.composite.canvas.source-over + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.canvas.source-over

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-over.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-over.worker.js new file mode 100644 index 0000000000..848fbf3bec --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-over.worker.js @@ -0,0 +1,41 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.canvas.source-over +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-over'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 219,255,36,223, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.xor.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.xor.html new file mode 100644 index 0000000000..bc69c8a08b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.xor.html @@ -0,0 +1,46 @@ + + +OffscreenCanvas test: 2d.composite.canvas.xor + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.canvas.xor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.xor.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.xor.worker.js new file mode 100644 index 0000000000..250bba4bac --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.canvas.xor.worker.js @@ -0,0 +1,41 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.canvas.xor +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.clear.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.clear.html new file mode 100644 index 0000000000..f0e9989cce --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.clear.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.composite.clip.clear + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.clip.clear

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fill() does not affect pixels outside the clip region.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.clear.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.clear.worker.js new file mode 100644 index 0000000000..abae05ac24 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.clear.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.clip.clear +// Description:fill() does not affect pixels outside the clip region. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fill() does not affect pixels outside the clip region."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'clear'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.copy.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.copy.html new file mode 100644 index 0000000000..2471cd7edd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.copy.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.composite.clip.copy + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.clip.copy

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fill() does not affect pixels outside the clip region.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.copy.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.copy.worker.js new file mode 100644 index 0000000000..dfebd98a6b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.copy.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.clip.copy +// Description:fill() does not affect pixels outside the clip region. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fill() does not affect pixels outside the clip region."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-atop.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-atop.html new file mode 100644 index 0000000000..efb5e7ab6d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-atop.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.composite.clip.destination-atop + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.clip.destination-atop

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fill() does not affect pixels outside the clip region.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-atop.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-atop.worker.js new file mode 100644 index 0000000000..9c8fa79c5a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-atop.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.clip.destination-atop +// Description:fill() does not affect pixels outside the clip region. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fill() does not affect pixels outside the clip region."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-in.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-in.html new file mode 100644 index 0000000000..bc467a1d99 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-in.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.composite.clip.destination-in + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.clip.destination-in

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fill() does not affect pixels outside the clip region.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-in.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-in.worker.js new file mode 100644 index 0000000000..a98624f824 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-in.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.clip.destination-in +// Description:fill() does not affect pixels outside the clip region. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fill() does not affect pixels outside the clip region."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-out.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-out.html new file mode 100644 index 0000000000..674ec3aeb8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-out.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.composite.clip.destination-out + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.clip.destination-out

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fill() does not affect pixels outside the clip region.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-out.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-out.worker.js new file mode 100644 index 0000000000..0cf915d1c7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-out.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.clip.destination-out +// Description:fill() does not affect pixels outside the clip region. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fill() does not affect pixels outside the clip region."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-out'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-over.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-over.html new file mode 100644 index 0000000000..6abd0af788 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-over.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.composite.clip.destination-over + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.clip.destination-over

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fill() does not affect pixels outside the clip region.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-over.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-over.worker.js new file mode 100644 index 0000000000..b1b5eee6f4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-over.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.clip.destination-over +// Description:fill() does not affect pixels outside the clip region. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fill() does not affect pixels outside the clip region."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-over'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.lighter.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.lighter.html new file mode 100644 index 0000000000..00782a683e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.lighter.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.composite.clip.lighter + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.clip.lighter

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fill() does not affect pixels outside the clip region.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.lighter.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.lighter.worker.js new file mode 100644 index 0000000000..8576d9db7c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.lighter.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.clip.lighter +// Description:fill() does not affect pixels outside the clip region. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fill() does not affect pixels outside the clip region."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'lighter'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-atop.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-atop.html new file mode 100644 index 0000000000..a7dc6a3bc8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-atop.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.composite.clip.source-atop + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.clip.source-atop

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fill() does not affect pixels outside the clip region.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-atop.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-atop.worker.js new file mode 100644 index 0000000000..fd220f52b3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-atop.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.clip.source-atop +// Description:fill() does not affect pixels outside the clip region. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fill() does not affect pixels outside the clip region."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-atop'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-in.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-in.html new file mode 100644 index 0000000000..3f24076161 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-in.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.composite.clip.source-in + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.clip.source-in

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fill() does not affect pixels outside the clip region.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-in.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-in.worker.js new file mode 100644 index 0000000000..0c61fb7794 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-in.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.clip.source-in +// Description:fill() does not affect pixels outside the clip region. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fill() does not affect pixels outside the clip region."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-out.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-out.html new file mode 100644 index 0000000000..4033893b2b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-out.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.composite.clip.source-out + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.clip.source-out

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fill() does not affect pixels outside the clip region.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-out.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-out.worker.js new file mode 100644 index 0000000000..ec57663af1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-out.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.clip.source-out +// Description:fill() does not affect pixels outside the clip region. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fill() does not affect pixels outside the clip region."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-over.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-over.html new file mode 100644 index 0000000000..5b48161c65 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-over.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.composite.clip.source-over + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.clip.source-over

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fill() does not affect pixels outside the clip region.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-over.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-over.worker.js new file mode 100644 index 0000000000..15c322ee59 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.source-over.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.clip.source-over +// Description:fill() does not affect pixels outside the clip region. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fill() does not affect pixels outside the clip region."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-over'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.xor.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.xor.html new file mode 100644 index 0000000000..0156e4a2ef --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.xor.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.composite.clip.xor + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.clip.xor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fill() does not affect pixels outside the clip region.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.xor.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.xor.worker.js new file mode 100644 index 0000000000..30bae44aa9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.clip.xor.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.clip.xor +// Description:fill() does not affect pixels outside the clip region. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fill() does not affect pixels outside the clip region."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvas.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvas.html new file mode 100644 index 0000000000..c096253e27 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvas.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.composite.globalAlpha.canvas + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.globalAlpha.canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvas.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvas.worker.js new file mode 100644 index 0000000000..ede4733a83 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvas.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.globalAlpha.canvas +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var ctx2 = offscreenCanvas2.getContext('2d'); + ctx2.fillStyle = '#f00'; + ctx2.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + // Avoiding any potential alpha = 0 optimisations. + ctx.globalAlpha = 0.01; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 2,253,0,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvascopy.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvascopy.html new file mode 100644 index 0000000000..2eb06556ef --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvascopy.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.composite.globalAlpha.canvascopy + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.globalAlpha.canvascopy

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvascopy.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvascopy.worker.js new file mode 100644 index 0000000000..f61859d231 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvascopy.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.globalAlpha.canvascopy +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var ctx2 = offscreenCanvas2.getContext('2d'); + ctx2.fillStyle = '#0f0'; + ctx2.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy' + ctx.globalAlpha = 0.51; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,255,0,130, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvaspattern.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvaspattern.html new file mode 100644 index 0000000000..cbfe111092 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvaspattern.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.composite.globalAlpha.canvaspattern + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.globalAlpha.canvaspattern

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvaspattern.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvaspattern.worker.js new file mode 100644 index 0000000000..7ecd568fae --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvaspattern.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.globalAlpha.canvaspattern +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var ctx2 = offscreenCanvas2.getContext('2d'); + ctx2.fillStyle = '#f00'; + ctx2.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = ctx.createPattern(offscreenCanvas2, 'no-repeat'); + // Avoiding any potential alpha = 0 optimisations. + ctx.globalAlpha = 0.01; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 2,253,0,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.default.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.default.html new file mode 100644 index 0000000000..57c3745d4e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.default.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.composite.globalAlpha.default + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.globalAlpha.default

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.default.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.default.worker.js new file mode 100644 index 0000000000..8acbd6a37f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.default.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.globalAlpha.default +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.globalAlpha, 1.0, "ctx.globalAlpha", "1.0"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.fill.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.fill.html new file mode 100644 index 0000000000..7b31db198e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.fill.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.composite.globalAlpha.fill + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.globalAlpha.fill

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.fill.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.fill.worker.js new file mode 100644 index 0000000000..3ea8aa7ebe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.fill.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.globalAlpha.fill +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + // Avoiding any potential alpha = 0 optimisations. + ctx.globalAlpha = 0.01; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 2,253,0,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.image.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.image.html new file mode 100644 index 0000000000..4590a2ea1f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.image.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.composite.globalAlpha.image + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.globalAlpha.image

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.image.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.image.worker.js new file mode 100644 index 0000000000..20953417cc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.image.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.globalAlpha.image +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + // Avoiding any potential alpha = 0 optimisations. + ctx.globalAlpha = 0.01; + const response = await fetch('/images/red.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 2,253,0,255, 2); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.imagepattern.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.imagepattern.html new file mode 100644 index 0000000000..2fcbca84d2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.imagepattern.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.composite.globalAlpha.imagepattern + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.globalAlpha.imagepattern

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.imagepattern.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.imagepattern.worker.js new file mode 100644 index 0000000000..c6ab163b65 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.imagepattern.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.globalAlpha.imagepattern +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + const response = await fetch('/images/red.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + // Avoiding any potential alpha = 0 optimisations. + ctx.globalAlpha = 0.01; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 2,253,0,255, 2); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.invalid.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.invalid.html new file mode 100644 index 0000000000..9bcf85f1c4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.invalid.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.composite.globalAlpha.invalid + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.globalAlpha.invalid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.invalid.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.invalid.worker.js new file mode 100644 index 0000000000..4ca577ad44 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.invalid.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.globalAlpha.invalid +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.globalAlpha = 0.5; + // This may not set it to exactly 0.5 if it is rounded/quantised, so + // remember for future comparisons. + var a = ctx.globalAlpha; + ctx.globalAlpha = Infinity; + _assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a"); + ctx.globalAlpha = -Infinity; + _assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a"); + ctx.globalAlpha = NaN; + _assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.range.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.range.html new file mode 100644 index 0000000000..c064a41cbd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.range.html @@ -0,0 +1,39 @@ + + +OffscreenCanvas test: 2d.composite.globalAlpha.range + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.globalAlpha.range

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.range.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.range.worker.js new file mode 100644 index 0000000000..76ea819909 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.range.worker.js @@ -0,0 +1,34 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.globalAlpha.range +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.globalAlpha = 0.5; + // This may not set it to exactly 0.5 if it is rounded/quantised, so + // remember for future comparisons. + var a = ctx.globalAlpha; + _assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a"); + ctx.globalAlpha = 1.1; + _assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a"); + ctx.globalAlpha = -0.1; + _assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a"); + ctx.globalAlpha = 0; + _assertSame(ctx.globalAlpha, 0, "ctx.globalAlpha", "0"); + ctx.globalAlpha = 1; + _assertSame(ctx.globalAlpha, 1, "ctx.globalAlpha", "1"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.clear.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.clear.html new file mode 100644 index 0000000000..f001c4409c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.clear.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.composite.image.clear + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.image.clear

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.clear.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.clear.worker.js new file mode 100644 index 0000000000..f152cee739 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.clear.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.image.clear +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'clear'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.copy.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.copy.html new file mode 100644 index 0000000000..d472a0682d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.copy.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.composite.image.copy + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.image.copy

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.copy.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.copy.worker.js new file mode 100644 index 0000000000..05ccab1711 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.copy.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.image.copy +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 255,255,0,191, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-atop.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-atop.html new file mode 100644 index 0000000000..753c460ec6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-atop.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.composite.image.destination-atop + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.image.destination-atop

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-atop.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-atop.worker.js new file mode 100644 index 0000000000..43648142d5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-atop.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.image.destination-atop +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 128,255,128,191, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-in.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-in.html new file mode 100644 index 0000000000..df9f1ae786 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-in.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.composite.image.destination-in + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.image.destination-in

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-in.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-in.worker.js new file mode 100644 index 0000000000..2787237c56 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-in.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.image.destination-in +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,255,255,96, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-out.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-out.html new file mode 100644 index 0000000000..6981ca1d72 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-out.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.composite.image.destination-out + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.image.destination-out

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-out.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-out.worker.js new file mode 100644 index 0000000000..e030f533a0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-out.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.image.destination-out +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-out'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,255,255,32, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-over.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-over.html new file mode 100644 index 0000000000..3360115133 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-over.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.composite.image.destination-over + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.image.destination-over

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-over.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-over.worker.js new file mode 100644 index 0000000000..964df4ae8b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.destination-over.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.image.destination-over +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-over'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 109,255,146,223, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.lighter.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.lighter.html new file mode 100644 index 0000000000..25f2a7684a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.lighter.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.composite.image.lighter + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.image.lighter

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.lighter.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.lighter.worker.js new file mode 100644 index 0000000000..f3828b6411 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.lighter.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.image.lighter +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'lighter'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 191,255,128,255, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-atop.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-atop.html new file mode 100644 index 0000000000..cfa386cfd1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-atop.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.composite.image.source-atop + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.image.source-atop

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-atop.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-atop.worker.js new file mode 100644 index 0000000000..7b1618e3f9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-atop.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.image.source-atop +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-atop'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-in.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-in.html new file mode 100644 index 0000000000..cc44706b1c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-in.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.composite.image.source-in + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.image.source-in

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-in.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-in.worker.js new file mode 100644 index 0000000000..9accfb35c4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-in.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.image.source-in +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-out.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-out.html new file mode 100644 index 0000000000..bc2f7f2633 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-out.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.composite.image.source-out + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.image.source-out

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-out.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-out.worker.js new file mode 100644 index 0000000000..8e8d9116bb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-out.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.image.source-out +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-over.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-over.html new file mode 100644 index 0000000000..88a8176f7e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-over.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.composite.image.source-over + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.image.source-over

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-over.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-over.worker.js new file mode 100644 index 0000000000..679aa19ef9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.source-over.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.image.source-over +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-over'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 219,255,36,223, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.xor.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.xor.html new file mode 100644 index 0000000000..ef149b2f99 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.xor.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.composite.image.xor + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.image.xor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.xor.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.xor.worker.js new file mode 100644 index 0000000000..83a04928b5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.image.xor.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.image.xor +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.casesensitive.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.casesensitive.html new file mode 100644 index 0000000000..f21b92f83e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.casesensitive.html @@ -0,0 +1,29 @@ + + +OffscreenCanvas test: 2d.composite.operation.casesensitive + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.operation.casesensitive

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.casesensitive.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.casesensitive.worker.js new file mode 100644 index 0000000000..db1b54f5ef --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.casesensitive.worker.js @@ -0,0 +1,24 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.operation.casesensitive +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.globalCompositeOperation = 'xor'; + ctx.globalCompositeOperation = 'Source-over'; + _assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.clear.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.clear.html new file mode 100644 index 0000000000..02496b6d89 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.clear.html @@ -0,0 +1,29 @@ + + +OffscreenCanvas test: 2d.composite.operation.clear + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.operation.clear

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.clear.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.clear.worker.js new file mode 100644 index 0000000000..947dd16c5f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.clear.worker.js @@ -0,0 +1,24 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.operation.clear +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.globalCompositeOperation = 'xor'; + ctx.globalCompositeOperation = 'clear'; + _assertSame(ctx.globalCompositeOperation, 'clear', "ctx.globalCompositeOperation", "'clear'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.darker.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.darker.html new file mode 100644 index 0000000000..29dc039157 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.darker.html @@ -0,0 +1,29 @@ + + +OffscreenCanvas test: 2d.composite.operation.darker + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.operation.darker

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.darker.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.darker.worker.js new file mode 100644 index 0000000000..528f6b93d9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.darker.worker.js @@ -0,0 +1,24 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.operation.darker +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.globalCompositeOperation = 'xor'; + ctx.globalCompositeOperation = 'darker'; + _assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.default.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.default.html new file mode 100644 index 0000000000..106c0e73f4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.default.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.composite.operation.default + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.operation.default

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.default.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.default.worker.js new file mode 100644 index 0000000000..ffdb75ad75 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.default.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.operation.default +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.globalCompositeOperation, 'source-over', "ctx.globalCompositeOperation", "'source-over'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.get.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.get.html new file mode 100644 index 0000000000..1ade1a4e54 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.get.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.composite.operation.get + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.operation.get

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.get.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.get.worker.js new file mode 100644 index 0000000000..a266f1d537 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.get.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.operation.get +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var modes = ['source-atop', 'source-in', 'source-out', 'source-over', + 'destination-atop', 'destination-in', 'destination-out', 'destination-over', + 'lighter', 'copy', 'xor']; + for (var i = 0; i < modes.length; ++i) + { + ctx.globalCompositeOperation = modes[i]; + _assertSame(ctx.globalCompositeOperation, modes[i], "ctx.globalCompositeOperation", "modes[\""+(i)+"\"]"); + } + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.highlight.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.highlight.html new file mode 100644 index 0000000000..08def9a516 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.highlight.html @@ -0,0 +1,29 @@ + + +OffscreenCanvas test: 2d.composite.operation.highlight + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.operation.highlight

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.highlight.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.highlight.worker.js new file mode 100644 index 0000000000..800c4605e6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.highlight.worker.js @@ -0,0 +1,24 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.operation.highlight +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.globalCompositeOperation = 'xor'; + ctx.globalCompositeOperation = 'highlight'; + _assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.nullsuffix.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.nullsuffix.html new file mode 100644 index 0000000000..f021d40b53 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.nullsuffix.html @@ -0,0 +1,29 @@ + + +OffscreenCanvas test: 2d.composite.operation.nullsuffix + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.operation.nullsuffix

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.nullsuffix.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.nullsuffix.worker.js new file mode 100644 index 0000000000..1c1d5124a3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.nullsuffix.worker.js @@ -0,0 +1,24 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.operation.nullsuffix +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.globalCompositeOperation = 'xor'; + ctx.globalCompositeOperation = 'source-over\0'; + _assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.over.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.over.html new file mode 100644 index 0000000000..df934336c6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.over.html @@ -0,0 +1,29 @@ + + +OffscreenCanvas test: 2d.composite.operation.over + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.operation.over

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.over.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.over.worker.js new file mode 100644 index 0000000000..f75a462e93 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.over.worker.js @@ -0,0 +1,24 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.operation.over +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.globalCompositeOperation = 'xor'; + ctx.globalCompositeOperation = 'over'; + _assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.unrecognised.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.unrecognised.html new file mode 100644 index 0000000000..c649102cc7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.unrecognised.html @@ -0,0 +1,29 @@ + + +OffscreenCanvas test: 2d.composite.operation.unrecognised + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.operation.unrecognised

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.unrecognised.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.unrecognised.worker.js new file mode 100644 index 0000000000..23a6630e82 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.operation.unrecognised.worker.js @@ -0,0 +1,24 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.operation.unrecognised +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.globalCompositeOperation = 'xor'; + ctx.globalCompositeOperation = 'nonexistent'; + _assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.clear.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.clear.html new file mode 100644 index 0000000000..9bb03097fc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.clear.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.solid.clear + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.solid.clear

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.clear.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.clear.worker.js new file mode 100644 index 0000000000..c49ec7a322 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.clear.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.solid.clear +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'clear'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.copy.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.copy.html new file mode 100644 index 0000000000..a5bcda9337 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.copy.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.solid.copy + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.solid.copy

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.copy.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.copy.worker.js new file mode 100644 index 0000000000..ee4baecbd2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.copy.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.solid.copy +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 255,255,0,255, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-atop.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-atop.html new file mode 100644 index 0000000000..c5554ff240 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-atop.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.solid.destination-atop + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.solid.destination-atop

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-atop.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-atop.worker.js new file mode 100644 index 0000000000..8829971c6b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-atop.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.solid.destination-atop +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,255,255, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-in.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-in.html new file mode 100644 index 0000000000..8e620e2714 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-in.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.solid.destination-in + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.solid.destination-in

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-in.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-in.worker.js new file mode 100644 index 0000000000..fe9e461717 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-in.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.solid.destination-in +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,255,255, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-out.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-out.html new file mode 100644 index 0000000000..06da4d3650 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-out.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.solid.destination-out + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.solid.destination-out

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-out.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-out.worker.js new file mode 100644 index 0000000000..05ec2fae16 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-out.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.solid.destination-out +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-out'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-over.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-over.html new file mode 100644 index 0000000000..e62c3fea70 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-over.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.solid.destination-over + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.solid.destination-over

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-over.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-over.worker.js new file mode 100644 index 0000000000..5c171fc282 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-over.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.solid.destination-over +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-over'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,255,255, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.lighter.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.lighter.html new file mode 100644 index 0000000000..2e09805cc1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.lighter.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.solid.lighter + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.solid.lighter

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.lighter.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.lighter.worker.js new file mode 100644 index 0000000000..353389221d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.lighter.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.solid.lighter +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'lighter'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 255,255,255,255, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-atop.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-atop.html new file mode 100644 index 0000000000..dd36e0e622 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-atop.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.solid.source-atop + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.solid.source-atop

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-atop.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-atop.worker.js new file mode 100644 index 0000000000..27e1c253ce --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-atop.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.solid.source-atop +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-atop'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 255,255,0,255, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-in.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-in.html new file mode 100644 index 0000000000..83dcc8e523 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-in.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.solid.source-in + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.solid.source-in

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-in.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-in.worker.js new file mode 100644 index 0000000000..7dfdb07075 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-in.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.solid.source-in +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 255,255,0,255, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-out.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-out.html new file mode 100644 index 0000000000..3067c44fcd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-out.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.solid.source-out + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.solid.source-out

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-out.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-out.worker.js new file mode 100644 index 0000000000..8252549267 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-out.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.solid.source-out +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-over.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-over.html new file mode 100644 index 0000000000..059655334f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-over.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.solid.source-over + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.solid.source-over

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-over.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-over.worker.js new file mode 100644 index 0000000000..1c82a95c36 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-over.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.solid.source-over +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-over'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 255,255,0,255, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.xor.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.xor.html new file mode 100644 index 0000000000..822c9c70d1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.xor.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.solid.xor + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.solid.xor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.xor.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.xor.worker.js new file mode 100644 index 0000000000..cb098ebab1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.xor.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.solid.xor +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.clear.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.clear.html new file mode 100644 index 0000000000..81d781acc7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.clear.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.transparent.clear + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.transparent.clear

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.clear.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.clear.worker.js new file mode 100644 index 0000000000..8f30463c41 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.clear.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.transparent.clear +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'clear'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.copy.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.copy.html new file mode 100644 index 0000000000..ab3a97226f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.copy.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.transparent.copy + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.transparent.copy

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.copy.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.copy.worker.js new file mode 100644 index 0000000000..6b9ea9dbcf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.copy.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.transparent.copy +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,255,191, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-atop.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-atop.html new file mode 100644 index 0000000000..5e580f5a67 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-atop.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.transparent.destination-atop + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.transparent.destination-atop

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-atop.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-atop.worker.js new file mode 100644 index 0000000000..3247632e53 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-atop.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.transparent.destination-atop +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,128,128,191, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-in.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-in.html new file mode 100644 index 0000000000..9f0ec56357 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-in.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.transparent.destination-in + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.transparent.destination-in

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-in.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-in.worker.js new file mode 100644 index 0000000000..c9205230c0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-in.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.transparent.destination-in +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,0,96, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-out.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-out.html new file mode 100644 index 0000000000..a1abe3eed9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-out.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.transparent.destination-out + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.transparent.destination-out

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-out.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-out.worker.js new file mode 100644 index 0000000000..1a5409589b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-out.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.transparent.destination-out +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-out'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,0,32, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-over.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-over.html new file mode 100644 index 0000000000..4f0305f27f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-over.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.transparent.destination-over + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.transparent.destination-over

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-over.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-over.worker.js new file mode 100644 index 0000000000..37eb785d67 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-over.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.transparent.destination-over +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-over'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,146,109,223, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.lighter.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.lighter.html new file mode 100644 index 0000000000..6a2f5df71f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.lighter.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.transparent.lighter + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.transparent.lighter

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.lighter.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.lighter.worker.js new file mode 100644 index 0000000000..3d890affd9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.lighter.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.transparent.lighter +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'lighter'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,128,191,255, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-atop.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-atop.html new file mode 100644 index 0000000000..bac035cea3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-atop.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.transparent.source-atop + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.transparent.source-atop

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-atop.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-atop.worker.js new file mode 100644 index 0000000000..d56ef6e2e4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-atop.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.transparent.source-atop +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-atop'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,64,191,128, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-in.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-in.html new file mode 100644 index 0000000000..5dd67046ed --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-in.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.transparent.source-in + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.transparent.source-in

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-in.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-in.worker.js new file mode 100644 index 0000000000..58ad13bc5e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-in.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.transparent.source-in +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,255,96, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-out.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-out.html new file mode 100644 index 0000000000..56b1d4ad46 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-out.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.transparent.source-out + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.transparent.source-out

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-out.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-out.worker.js new file mode 100644 index 0000000000..62ec895955 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-out.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.transparent.source-out +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,255,96, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-over.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-over.html new file mode 100644 index 0000000000..f038d44a54 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-over.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.transparent.source-over + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.transparent.source-over

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-over.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-over.worker.js new file mode 100644 index 0000000000..494a45f848 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-over.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.transparent.source-over +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-over'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,36,219,223, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.xor.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.xor.html new file mode 100644 index 0000000000..bbab8a086c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.xor.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.transparent.xor + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.transparent.xor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.xor.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.xor.worker.js new file mode 100644 index 0000000000..4b65667ed8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.transparent.xor.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.transparent.xor +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,64,191,128, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.copy.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.copy.html new file mode 100644 index 0000000000..0ff9d851dd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.copy.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.composite.uncovered.fill.copy + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.uncovered.fill.copy

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.copy.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.copy.worker.js new file mode 100644 index 0000000000..50f3ed0f22 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.copy.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.uncovered.fill.copy +// Description:fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.translate(0, 25); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-atop.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-atop.html new file mode 100644 index 0000000000..2d2f92edb5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-atop.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.composite.uncovered.fill.destination-atop + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.uncovered.fill.destination-atop

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-atop.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-atop.worker.js new file mode 100644 index 0000000000..9a84b0894a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-atop.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.uncovered.fill.destination-atop +// Description:fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.translate(0, 25); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-in.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-in.html new file mode 100644 index 0000000000..5670b321a6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-in.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.composite.uncovered.fill.destination-in + + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.uncovered.fill.destination-in

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-in.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-in.worker.js new file mode 100644 index 0000000000..aa24ba97a6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-in.worker.js @@ -0,0 +1,29 @@ +// META: timeout=long +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.uncovered.fill.destination-in +// Description:fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.translate(0, 25); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-in.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-in.html new file mode 100644 index 0000000000..58347442bd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-in.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.composite.uncovered.fill.source-in + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.uncovered.fill.source-in

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-in.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-in.worker.js new file mode 100644 index 0000000000..33e326d1f4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-in.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.uncovered.fill.source-in +// Description:fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.translate(0, 25); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-out.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-out.html new file mode 100644 index 0000000000..ea44ca4f04 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-out.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.composite.uncovered.fill.source-out + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.uncovered.fill.source-out

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-out.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-out.worker.js new file mode 100644 index 0000000000..1d39b364b0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-out.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.uncovered.fill.source-out +// Description:fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.translate(0, 25); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.copy.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.copy.html new file mode 100644 index 0000000000..0ecb5ed01d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.copy.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.composite.uncovered.image.copy + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.uncovered.image.copy

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.copy.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.copy.worker.js new file mode 100644 index 0000000000..0e56b4f71d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.copy.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.uncovered.image.copy +// Description:drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-atop.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-atop.html new file mode 100644 index 0000000000..00a4465d0b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-atop.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.composite.uncovered.image.destination-atop + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.uncovered.image.destination-atop

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-atop.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-atop.worker.js new file mode 100644 index 0000000000..4c4a0a4c95 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-atop.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.uncovered.image.destination-atop +// Description:drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-in.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-in.html new file mode 100644 index 0000000000..f5f8c68c51 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-in.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.composite.uncovered.image.destination-in + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.uncovered.image.destination-in

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-in.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-in.worker.js new file mode 100644 index 0000000000..af1dc50c9b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-in.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.uncovered.image.destination-in +// Description:drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-in.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-in.html new file mode 100644 index 0000000000..2e1fe84b60 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-in.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.composite.uncovered.image.source-in + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.uncovered.image.source-in

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-in.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-in.worker.js new file mode 100644 index 0000000000..490ce4d001 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-in.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.uncovered.image.source-in +// Description:drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-out.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-out.html new file mode 100644 index 0000000000..1f5be066ee --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-out.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.composite.uncovered.image.source-out + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.uncovered.image.source-out

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-out.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-out.worker.js new file mode 100644 index 0000000000..3647e34574 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-out.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.uncovered.image.source-out +// Description:drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.copy.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.copy.html new file mode 100644 index 0000000000..10a9960559 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.copy.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.uncovered.nocontext.copy + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.uncovered.nocontext.copy

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.copy.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.copy.worker.js new file mode 100644 index 0000000000..1f285eae4c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.copy.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.uncovered.nocontext.copy +// Description:drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-atop.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-atop.html new file mode 100644 index 0000000000..ead1299cf0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-atop.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.uncovered.nocontext.destination-atop + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.uncovered.nocontext.destination-atop

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-atop.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-atop.worker.js new file mode 100644 index 0000000000..a9beb0f27e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-atop.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.uncovered.nocontext.destination-atop +// Description:drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-in.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-in.html new file mode 100644 index 0000000000..0322bfe258 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-in.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.uncovered.nocontext.destination-in + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.uncovered.nocontext.destination-in

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-in.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-in.worker.js new file mode 100644 index 0000000000..e146e2e91a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-in.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.uncovered.nocontext.destination-in +// Description:drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-in.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-in.html new file mode 100644 index 0000000000..0d93a0362e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-in.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.uncovered.nocontext.source-in + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.uncovered.nocontext.source-in

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-in.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-in.worker.js new file mode 100644 index 0000000000..cce4b54bd5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-in.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.uncovered.nocontext.source-in +// Description:drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-out.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-out.html new file mode 100644 index 0000000000..b6ab8cbda4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-out.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.composite.uncovered.nocontext.source-out + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.uncovered.nocontext.source-out

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-out.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-out.worker.js new file mode 100644 index 0000000000..501a84f7e7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-out.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.uncovered.nocontext.source-out +// Description:drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.copy.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.copy.html new file mode 100644 index 0000000000..c698c2517c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.copy.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.composite.uncovered.pattern.copy + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.uncovered.pattern.copy

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.copy.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.copy.worker.js new file mode 100644 index 0000000000..a5944be695 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.copy.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.uncovered.pattern.copy +// Description:Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-atop.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-atop.html new file mode 100644 index 0000000000..887570fad7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-atop.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.composite.uncovered.pattern.destination-atop + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.uncovered.pattern.destination-atop

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-atop.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-atop.worker.js new file mode 100644 index 0000000000..c34c748059 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-atop.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.uncovered.pattern.destination-atop +// Description:Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-in.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-in.html new file mode 100644 index 0000000000..7aa9e662f6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-in.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.composite.uncovered.pattern.destination-in + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.uncovered.pattern.destination-in

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-in.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-in.worker.js new file mode 100644 index 0000000000..10042455a7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-in.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.uncovered.pattern.destination-in +// Description:Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-in.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-in.html new file mode 100644 index 0000000000..3830e92f69 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-in.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.composite.uncovered.pattern.source-in + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.uncovered.pattern.source-in

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-in.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-in.worker.js new file mode 100644 index 0000000000..c658da8c99 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-in.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.uncovered.pattern.source-in +// Description:Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-out.html b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-out.html new file mode 100644 index 0000000000..3c202dd556 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-out.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.composite.uncovered.pattern.source-out + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.composite.uncovered.pattern.source-out

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-out.worker.js b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-out.worker.js new file mode 100644 index 0000000000..86baf476fe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-out.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.composite.uncovered.pattern.source-out +// Description:Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }); + }).then(t_pass, t_fail); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.basics.html b/testing/web-platform/tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.basics.html new file mode 100644 index 0000000000..e754e6c6ba --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.basics.html @@ -0,0 +1,62 @@ + + +OffscreenCanvas test: 2d.conformance.requirements.basics + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.conformance.requirements.basics

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  void methods return undefined

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in "Web IDL" (draft) + diff --git a/testing/web-platform/tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.basics.worker.js b/testing/web-platform/tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.basics.worker.js new file mode 100644 index 0000000000..b16a39fd3c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.basics.worker.js @@ -0,0 +1,57 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.conformance.requirements.basics +// Description:void methods return undefined +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in "Web IDL" (draft) + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("void methods return undefined"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.save(), undefined, "ctx.save()", "undefined"); + _assertSame(ctx.restore(), undefined, "ctx.restore()", "undefined"); + _assertSame(ctx.scale(1, 1), undefined, "ctx.scale(1, 1)", "undefined"); + _assertSame(ctx.rotate(0), undefined, "ctx.rotate(0)", "undefined"); + _assertSame(ctx.translate(0, 0), undefined, "ctx.translate(0, 0)", "undefined"); + if (ctx.transform) { // (avoid spurious failures, since the aim here is not to test that all features are supported) + _assertSame(ctx.transform(1, 0, 0, 1, 0, 0), undefined, "ctx.transform(1, 0, 0, 1, 0, 0)", "undefined"); + } + if (ctx.setTransform) { + _assertSame(ctx.setTransform(1, 0, 0, 1, 0, 0), undefined, "ctx.setTransform(1, 0, 0, 1, 0, 0)", "undefined"); + _assertSame(ctx.setTransform(), undefined, "ctx.setTransform()", "undefined"); + } + _assertSame(ctx.clearRect(0, 0, 0, 0), undefined, "ctx.clearRect(0, 0, 0, 0)", "undefined"); + _assertSame(ctx.fillRect(0, 0, 0, 0), undefined, "ctx.fillRect(0, 0, 0, 0)", "undefined"); + _assertSame(ctx.strokeRect(0, 0, 0, 0), undefined, "ctx.strokeRect(0, 0, 0, 0)", "undefined"); + _assertSame(ctx.beginPath(), undefined, "ctx.beginPath()", "undefined"); + _assertSame(ctx.closePath(), undefined, "ctx.closePath()", "undefined"); + _assertSame(ctx.moveTo(0, 0), undefined, "ctx.moveTo(0, 0)", "undefined"); + _assertSame(ctx.lineTo(0, 0), undefined, "ctx.lineTo(0, 0)", "undefined"); + _assertSame(ctx.quadraticCurveTo(0, 0, 0, 0), undefined, "ctx.quadraticCurveTo(0, 0, 0, 0)", "undefined"); + _assertSame(ctx.bezierCurveTo(0, 0, 0, 0, 0, 0), undefined, "ctx.bezierCurveTo(0, 0, 0, 0, 0, 0)", "undefined"); + _assertSame(ctx.arcTo(0, 0, 0, 0, 1), undefined, "ctx.arcTo(0, 0, 0, 0, 1)", "undefined"); + _assertSame(ctx.rect(0, 0, 0, 0), undefined, "ctx.rect(0, 0, 0, 0)", "undefined"); + _assertSame(ctx.arc(0, 0, 1, 0, 0, true), undefined, "ctx.arc(0, 0, 1, 0, 0, true)", "undefined"); + _assertSame(ctx.fill(), undefined, "ctx.fill()", "undefined"); + _assertSame(ctx.stroke(), undefined, "ctx.stroke()", "undefined"); + _assertSame(ctx.clip(), undefined, "ctx.clip()", "undefined"); + if (ctx.fillText) { + _assertSame(ctx.fillText('test', 0, 0), undefined, "ctx.fillText('test', 0, 0)", "undefined"); + _assertSame(ctx.strokeText('test', 0, 0), undefined, "ctx.strokeText('test', 0, 0)", "undefined"); + } + if (ctx.putImageData) { + _assertSame(ctx.putImageData(ctx.getImageData(0, 0, 1, 1), 0, 0), undefined, "ctx.putImageData(ctx.getImageData(0, 0, 1, 1), 0, 0)", "undefined"); + } + _assertSame(ctx.drawImage(canvas, 0, 0, 1, 1, 0, 0, 0, 0), undefined, "ctx.drawImage(canvas, 0, 0, 1, 1, 0, 0, 0, 0)", "undefined"); + _assertSame(ctx.createLinearGradient(0, 0, 0, 0).addColorStop(0, 'white'), undefined, "ctx.createLinearGradient(0, 0, 0, 0).addColorStop(0, 'white')", "undefined"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.missingargs.html b/testing/web-platform/tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.missingargs.html new file mode 100644 index 0000000000..fe28a68e90 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.missingargs.html @@ -0,0 +1,141 @@ + + +OffscreenCanvas test: 2d.conformance.requirements.missingargs + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.conformance.requirements.missingargs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Missing arguments cause TypeError

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.missingargs.worker.js b/testing/web-platform/tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.missingargs.worker.js new file mode 100644 index 0000000000..f249fcb881 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.missingargs.worker.js @@ -0,0 +1,136 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.conformance.requirements.missingargs +// Description:Missing arguments cause TypeError +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Missing arguments cause TypeError"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_js(TypeError, function() { ctx.scale(); }); + assert_throws_js(TypeError, function() { ctx.scale(1); }); + assert_throws_js(TypeError, function() { ctx.rotate(); }); + assert_throws_js(TypeError, function() { ctx.translate(); }); + assert_throws_js(TypeError, function() { ctx.translate(0); }); + if (ctx.transform) { // (avoid spurious failures, since the aim here is not to test that all features are supported) + assert_throws_js(TypeError, function() { ctx.transform(); }); + assert_throws_js(TypeError, function() { ctx.transform(1); }); + assert_throws_js(TypeError, function() { ctx.transform(1, 0); }); + assert_throws_js(TypeError, function() { ctx.transform(1, 0, 0); }); + assert_throws_js(TypeError, function() { ctx.transform(1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.transform(1, 0, 0, 1, 0); }); + } + if (ctx.setTransform) { + assert_throws_js(TypeError, function() { ctx.setTransform(1); }); + assert_throws_js(TypeError, function() { ctx.setTransform(1, 0); }); + assert_throws_js(TypeError, function() { ctx.setTransform(1, 0, 0); }); + assert_throws_js(TypeError, function() { ctx.setTransform(1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.setTransform(1, 0, 0, 1, 0); }); + } + assert_throws_js(TypeError, function() { ctx.createLinearGradient(); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0); }); + assert_throws_js(TypeError, function() { ctx.createPattern(canvas); }); + assert_throws_js(TypeError, function() { ctx.clearRect(); }); + assert_throws_js(TypeError, function() { ctx.clearRect(0); }); + assert_throws_js(TypeError, function() { ctx.clearRect(0, 0); }); + assert_throws_js(TypeError, function() { ctx.clearRect(0, 0, 0); }); + assert_throws_js(TypeError, function() { ctx.fillRect(); }); + assert_throws_js(TypeError, function() { ctx.fillRect(0); }); + assert_throws_js(TypeError, function() { ctx.fillRect(0, 0); }); + assert_throws_js(TypeError, function() { ctx.fillRect(0, 0, 0); }); + assert_throws_js(TypeError, function() { ctx.strokeRect(); }); + assert_throws_js(TypeError, function() { ctx.strokeRect(0); }); + assert_throws_js(TypeError, function() { ctx.strokeRect(0, 0); }); + assert_throws_js(TypeError, function() { ctx.strokeRect(0, 0, 0); }); + assert_throws_js(TypeError, function() { ctx.moveTo(); }); + assert_throws_js(TypeError, function() { ctx.moveTo(0); }); + assert_throws_js(TypeError, function() { ctx.lineTo(); }); + assert_throws_js(TypeError, function() { ctx.lineTo(0); }); + assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(); }); + assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(0); }); + assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(0, 0); }); + assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(0, 0, 0); }); + assert_throws_js(TypeError, function() { ctx.bezierCurveTo(); }); + assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0); }); + assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0); }); + assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0, 0); }); + assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0, 0, 0); }); + assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0, 0, 0, 0); }); + assert_throws_js(TypeError, function() { ctx.arcTo(); }); + assert_throws_js(TypeError, function() { ctx.arcTo(0); }); + assert_throws_js(TypeError, function() { ctx.arcTo(0, 0); }); + assert_throws_js(TypeError, function() { ctx.arcTo(0, 0, 0); }); + assert_throws_js(TypeError, function() { ctx.arcTo(0, 0, 0, 0); }); + assert_throws_js(TypeError, function() { ctx.rect(); }); + assert_throws_js(TypeError, function() { ctx.rect(0); }); + assert_throws_js(TypeError, function() { ctx.rect(0, 0); }); + assert_throws_js(TypeError, function() { ctx.rect(0, 0, 0); }); + assert_throws_js(TypeError, function() { ctx.arc(); }); + assert_throws_js(TypeError, function() { ctx.arc(0); }); + assert_throws_js(TypeError, function() { ctx.arc(0, 0); }); + assert_throws_js(TypeError, function() { ctx.arc(0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.arc(0, 0, 1, 0); }); + // (6th argument to arc is optional) + if (ctx.isPointInPath) { + assert_throws_js(TypeError, function() { ctx.isPointInPath(); }); + assert_throws_js(TypeError, function() { ctx.isPointInPath(0); }); + } + if (ctx.drawFocusRing) { + assert_throws_js(TypeError, function() { ctx.drawFocusRing(); }); + assert_throws_js(TypeError, function() { ctx.drawFocusRing(canvas); }); + assert_throws_js(TypeError, function() { ctx.drawFocusRing(canvas, 0); }); + } + if (ctx.fillText) { + assert_throws_js(TypeError, function() { ctx.fillText(); }); + assert_throws_js(TypeError, function() { ctx.fillText('test'); }); + assert_throws_js(TypeError, function() { ctx.fillText('test', 0); }); + assert_throws_js(TypeError, function() { ctx.strokeText(); }); + assert_throws_js(TypeError, function() { ctx.strokeText('test'); }); + assert_throws_js(TypeError, function() { ctx.strokeText('test', 0); }); + assert_throws_js(TypeError, function() { ctx.measureText(); }); + } + assert_throws_js(TypeError, function() { ctx.drawImage(); }); + assert_throws_js(TypeError, function() { ctx.drawImage(canvas); }); + assert_throws_js(TypeError, function() { ctx.drawImage(canvas, 0); }); + // TODO: n >= 3 args on drawImage could be either a valid overload, + // or too few for another overload, or too many for another + // overload - what should happen? + if (ctx.createImageData) { + assert_throws_js(TypeError, function() { ctx.createImageData(); }); + assert_throws_js(TypeError, function() { ctx.createImageData(1); }); + } + if (ctx.getImageData) { + assert_throws_js(TypeError, function() { ctx.getImageData(); }); + assert_throws_js(TypeError, function() { ctx.getImageData(0); }); + assert_throws_js(TypeError, function() { ctx.getImageData(0, 0); }); + assert_throws_js(TypeError, function() { ctx.getImageData(0, 0, 1); }); + } + if (ctx.putImageData) { + var imgdata = ctx.getImageData(0, 0, 1, 1); + assert_throws_js(TypeError, function() { ctx.putImageData(); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 0); }); + } + var g = ctx.createLinearGradient(0, 0, 0, 0); + assert_throws_js(TypeError, function() { g.addColorStop(); }); + assert_throws_js(TypeError, function() { g.addColorStop(0); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.3arg.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.3arg.html new file mode 100644 index 0000000000..7f1f66654d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.3arg.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.drawImage.3arg + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.drawImage.3arg

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.3arg.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.3arg.worker.js new file mode 100644 index 0000000000..b2f860bc60 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.3arg.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.drawImage.3arg +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const response_red = await fetch('/images/red.png'); + const blob_red = await response_red.blob(); + const bitmap_red = await createImageBitmap(blob_red); + + const response_green = await fetch('/images/green.png'); + const blob_green = await response_green.blob(); + const bitmap_green = await createImageBitmap(blob_green); + + ctx.drawImage(bitmap_green, 0, 0); + ctx.drawImage(bitmap_red, -100, 0); + ctx.drawImage(bitmap_red, 100, 0); + ctx.drawImage(bitmap_red, 0, -50); + ctx.drawImage(bitmap_red, 0, 50); + _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2); + _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2); + _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2); + _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.5arg.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.5arg.html new file mode 100644 index 0000000000..f7bf0568c4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.5arg.html @@ -0,0 +1,38 @@ + + +OffscreenCanvas test: 2d.drawImage.5arg + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.drawImage.5arg

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.5arg.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.5arg.worker.js new file mode 100644 index 0000000000..f725acf011 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.5arg.worker.js @@ -0,0 +1,34 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.drawImage.5arg +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + const response_red = await fetch('/images/red.png'); + const blob_red = await response_red.blob(); + const bitmap_red = await createImageBitmap(blob_red); + + const response_green = await fetch('/images/green.png'); + const blob_green = await response_green.blob(); + const bitmap_green = await createImageBitmap(blob_green); + + ctx.drawImage(bitmap_green, 50, 0, 50, 50); + ctx.drawImage(bitmap_red, 0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50); + _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2); + _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2); + _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2); + _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html new file mode 100644 index 0000000000..47e442e23e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.drawImage.9arg.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.drawImage.9arg.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.worker.js new file mode 100644 index 0000000000..b2d6f7d860 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.drawImage.9arg.basic +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + const response = await fetch('/images/green.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + + ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, 50); + _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2); + _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2); + _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2); + _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.html new file mode 100644 index 0000000000..5e0f3f1088 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.drawImage.9arg.destpos + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.drawImage.9arg.destpos

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.worker.js new file mode 100644 index 0000000000..380d526f9b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.drawImage.9arg.destpos +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const response_red = await fetch('/images/red.png'); + const blob_red = await response_red.blob(); + const bitmap_red = await createImageBitmap(blob_red); + + const response_green = await fetch('/images/green.png'); + const blob_green = await response_green.blob(); + const bitmap_green = await createImageBitmap(blob_green); + + ctx.drawImage(bitmap_green, 0, 0, 100, 50, 0, 0, 100, 50); + ctx.drawImage(bitmap_green, 0, 0, 100, 50, -100, 0, 100, 50); + ctx.drawImage(bitmap_red, 0, 0, 100, 50, 100, 0, 100, 50); + ctx.drawImage(bitmap_red, 0, 0, 100, 50, 0, -50, 100, 50); + ctx.drawImage(bitmap_red, 0, 0, 100, 50, 0, 50, 100, 50); + _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2); + _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2); + _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2); + _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.html new file mode 100644 index 0000000000..93b587a44f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.html @@ -0,0 +1,39 @@ + + +OffscreenCanvas test: 2d.drawImage.9arg.destsize + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.drawImage.9arg.destsize

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.worker.js new file mode 100644 index 0000000000..76e3e8baaf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.worker.js @@ -0,0 +1,35 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.drawImage.9arg.destsize +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const response_red = await fetch('/images/red.png'); + const blob_red = await response_red.blob(); + const bitmap_red = await createImageBitmap(blob_red); + + const response_green = await fetch('/images/green.png'); + const blob_green = await response_green.blob(); + const bitmap_green = await createImageBitmap(blob_green); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.drawImage(bitmap_green, 1, 1, 1, 1, 0, 0, 100, 50); + ctx.drawImage(bitmap_red, 0, 0, 100, 50, -50, 0, 50, 50); + ctx.drawImage(bitmap_red, 0, 0, 100, 50, 100, 0, 50, 50); + ctx.drawImage(bitmap_red, 0, 0, 100, 50, 0, -25, 100, 25); + ctx.drawImage(bitmap_red, 0, 0, 100, 50, 0, 50, 100, 25); + _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2); + _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2); + _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2); + _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html new file mode 100644 index 0000000000..e822ab43fa --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.drawImage.9arg.sourcepos + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.drawImage.9arg.sourcepos

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.worker.js new file mode 100644 index 0000000000..d3525435fa --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.drawImage.9arg.sourcepos +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + const response = await fetch('/images/rgrg-256x256.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + ctx.drawImage(bitmap, 140, 20, 100, 50, 0, 0, 100, 50); + _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2); + _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2); + _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2); + _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html new file mode 100644 index 0000000000..b99ca58768 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.drawImage.9arg.sourcesize + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.drawImage.9arg.sourcesize

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.worker.js new file mode 100644 index 0000000000..aa15efb705 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.drawImage.9arg.sourcesize +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + const response = await fetch('/images/rgrg-256x256.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + ctx.drawImage(bitmap, 0, 0, 256, 256, 0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 51, 26); + ctx.fillRect(49, 24, 51, 26); + _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2); + _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2); + _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2); + _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2); + _assertPixelApprox(canvas, 20,20, 0,255,0,255, 2); + _assertPixelApprox(canvas, 80,20, 0,255,0,255, 2); + _assertPixelApprox(canvas, 20,30, 0,255,0,255, 2); + _assertPixelApprox(canvas, 80,30, 0,255,0,255, 2); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.alpha.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.alpha.html new file mode 100644 index 0000000000..a95f3ece7a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.alpha.html @@ -0,0 +1,29 @@ + + +OffscreenCanvas test: 2d.drawImage.alpha + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.drawImage.alpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.alpha.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.alpha.worker.js new file mode 100644 index 0000000000..958a2431b6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.alpha.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.drawImage.alpha +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalAlpha = 0; + const response = await fetch('/images/red.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.broken.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.broken.html new file mode 100644 index 0000000000..a2afa05f01 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.broken.html @@ -0,0 +1,24 @@ + + +OffscreenCanvas test: 2d.drawImage.broken + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.drawImage.broken

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.broken.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.broken.worker.js new file mode 100644 index 0000000000..dc695b5459 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.broken.worker.js @@ -0,0 +1,20 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.drawImage.broken +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const response = await fetch('/images/broken.png'); + const blob = await response.blob(); + + await promise_rejects_dom(t, 'InvalidStateError', createImageBitmap(blob), 'The source image could not be decoded.'); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.canvas.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.canvas.html new file mode 100644 index 0000000000..e5eeedea6e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.canvas.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.drawImage.canvas + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.drawImage.canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.canvas.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.canvas.worker.js new file mode 100644 index 0000000000..1f18cd7723 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.canvas.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.drawImage.canvas +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var ctx2 = offscreenCanvas2.getContext('2d'); + ctx2.fillStyle = '#0f0'; + ctx2.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2); + _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2); + _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2); + _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.clip.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.clip.html new file mode 100644 index 0000000000..a828039b7b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.clip.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.drawImage.clip + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.drawImage.clip

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.clip.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.clip.worker.js new file mode 100644 index 0000000000..fea2a7bac7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.clip.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.drawImage.clip +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.rect(-10, -10, 1, 1); + ctx.clip(); + const response = await fetch('/images/red.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.rect(-10, -10, 1, 1); + ctx.clip(); + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.composite.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.composite.html new file mode 100644 index 0000000000..b32b5a12ed --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.composite.html @@ -0,0 +1,29 @@ + + +OffscreenCanvas test: 2d.drawImage.composite + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.drawImage.composite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.composite.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.composite.worker.js new file mode 100644 index 0000000000..0b17673b68 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.composite.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.drawImage.composite +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-over'; + const response = await fetch('/images/red.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.floatsource.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.floatsource.html new file mode 100644 index 0000000000..e201082e35 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.floatsource.html @@ -0,0 +1,25 @@ + + +OffscreenCanvas test: 2d.drawImage.floatsource + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.drawImage.floatsource

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.floatsource.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.floatsource.worker.js new file mode 100644 index 0000000000..1efc17d04d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.floatsource.worker.js @@ -0,0 +1,21 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.drawImage.floatsource +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const response = await fetch('/images/green.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + ctx.drawImage(bitmap, 10.1, 10.1, 0.1, 0.1, 0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedest.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedest.html new file mode 100644 index 0000000000..3e43a772c6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedest.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.drawImage.negativedest + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.drawImage.negativedest

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Negative destination width/height represents the correct rectangle

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedest.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedest.worker.js new file mode 100644 index 0000000000..ce5cf5efad --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedest.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.drawImage.negativedest +// Description:Negative destination width/height represents the correct rectangle +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + const response = await fetch('/images/ggrr-256x256.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + ctx.drawImage(bitmap, 100, 78, 50, 50, 0, 50, 50, -50); + ctx.drawImage(bitmap, 100, 128, 50, -50, 100, 50, -50, -50); + _assertPixelApprox(canvas, 1,1, 0,255,0,255, 2); + _assertPixelApprox(canvas, 1,48, 0,255,0,255, 2); + _assertPixelApprox(canvas, 98,1, 0,255,0,255, 2); + _assertPixelApprox(canvas, 98,48, 0,255,0,255, 2); + _assertPixelApprox(canvas, 48,1, 0,255,0,255, 2); + _assertPixelApprox(canvas, 48,48, 0,255,0,255, 2); + _assertPixelApprox(canvas, 51,1, 0,255,0,255, 2); + _assertPixelApprox(canvas, 51,48, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + t.done(); +}, "Negative destination width/height represents the correct rectangle"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedir.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedir.html new file mode 100644 index 0000000000..347b634cfd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedir.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.drawImage.negativedir + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.drawImage.negativedir

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Negative dimensions do not affect the direction of the image

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedir.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedir.worker.js new file mode 100644 index 0000000000..c82b9ba1be --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedir.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.drawImage.negativedir +// Description:Negative dimensions do not affect the direction of the image +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + const response = await fetch('/images/ggrr-256x256.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + ctx.drawImage(bitmap, 0, 178, 50, -100, 0, 0, 50, 100); + ctx.drawImage(bitmap, 0, 78, 50, 100, 50, 100, 50, -100); + _assertPixelApprox(canvas, 1,1, 0,255,0,255, 2); + _assertPixelApprox(canvas, 1,48, 0,255,0,255, 2); + _assertPixelApprox(canvas, 98,1, 0,255,0,255, 2); + _assertPixelApprox(canvas, 98,48, 0,255,0,255, 2); + _assertPixelApprox(canvas, 48,1, 0,255,0,255, 2); + _assertPixelApprox(canvas, 48,48, 0,255,0,255, 2); + _assertPixelApprox(canvas, 51,1, 0,255,0,255, 2); + _assertPixelApprox(canvas, 51,48, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + t.done(); +}, "Negative dimensions do not affect the direction of the image"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativesource.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativesource.html new file mode 100644 index 0000000000..3e18725720 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativesource.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.drawImage.negativesource + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.drawImage.negativesource

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Negative source width/height represents the correct rectangle

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativesource.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativesource.worker.js new file mode 100644 index 0000000000..f92d15774d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativesource.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.drawImage.negativesource +// Description:Negative source width/height represents the correct rectangle +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + const response = await fetch('/images/ggrr-256x256.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + ctx.drawImage(bitmap, 100, 78, -100, 50, 0, 0, 50, 50); + ctx.drawImage(bitmap, 100, 128, -100, -50, 50, 0, 50, 50); + _assertPixelApprox(canvas, 1,1, 0,255,0,255, 2); + _assertPixelApprox(canvas, 1,48, 0,255,0,255, 2); + _assertPixelApprox(canvas, 98,1, 0,255,0,255, 2); + _assertPixelApprox(canvas, 98,48, 0,255,0,255, 2); + _assertPixelApprox(canvas, 48,1, 0,255,0,255, 2); + _assertPixelApprox(canvas, 48,48, 0,255,0,255, 2); + _assertPixelApprox(canvas, 51,1, 0,255,0,255, 2); + _assertPixelApprox(canvas, 51,48, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + t.done(); +}, "Negative source width/height represents the correct rectangle"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html new file mode 100644 index 0000000000..93dccd3d4e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html @@ -0,0 +1,328 @@ + + +OffscreenCanvas test: 2d.drawImage.nonfinite + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.drawImage.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  drawImage() with Infinity/NaN is ignored

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nonfinite.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nonfinite.worker.js new file mode 100644 index 0000000000..a56f09e0b2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nonfinite.worker.js @@ -0,0 +1,324 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.drawImage.nonfinite +// Description:drawImage() with Infinity/NaN is ignored +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + const response = await fetch('/images/redtransparent.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + + ctx.drawImage(bitmap, Infinity, 0); + ctx.drawImage(bitmap, -Infinity, 0); + ctx.drawImage(bitmap, NaN, 0); + ctx.drawImage(bitmap, 0, Infinity); + ctx.drawImage(bitmap, 0, -Infinity); + ctx.drawImage(bitmap, 0, NaN); + ctx.drawImage(bitmap, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, 0, 100, 50); + ctx.drawImage(bitmap, -Infinity, 0, 100, 50); + ctx.drawImage(bitmap, NaN, 0, 100, 50); + ctx.drawImage(bitmap, 0, Infinity, 100, 50); + ctx.drawImage(bitmap, 0, -Infinity, 100, 50); + ctx.drawImage(bitmap, 0, NaN, 100, 50); + ctx.drawImage(bitmap, 0, 0, Infinity, 50); + ctx.drawImage(bitmap, 0, 0, -Infinity, 50); + ctx.drawImage(bitmap, 0, 0, NaN, 50); + ctx.drawImage(bitmap, 0, 0, 100, Infinity); + ctx.drawImage(bitmap, 0, 0, 100, -Infinity); + ctx.drawImage(bitmap, 0, 0, 100, NaN); + ctx.drawImage(bitmap, Infinity, Infinity, 100, 50); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity); + ctx.drawImage(bitmap, Infinity, 0, Infinity, 50); + ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, 0, 100, Infinity); + ctx.drawImage(bitmap, 0, Infinity, Infinity, 50); + ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, 0, Infinity, 100, Infinity); + ctx.drawImage(bitmap, 0, 0, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, 100, 50); + ctx.drawImage(bitmap, -Infinity, 0, 100, 50, 0, 0, 100, 50); + ctx.drawImage(bitmap, NaN, 0, 100, 50, 0, 0, 100, 50); + ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, 100, 50); + ctx.drawImage(bitmap, 0, -Infinity, 100, 50, 0, 0, 100, 50); + ctx.drawImage(bitmap, 0, NaN, 100, 50, 0, 0, 100, 50); + ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, 100, 50); + ctx.drawImage(bitmap, 0, 0, -Infinity, 50, 0, 0, 100, 50); + ctx.drawImage(bitmap, 0, 0, NaN, 50, 0, 0, 100, 50); + ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, 100, 50); + ctx.drawImage(bitmap, 0, 0, 100, -Infinity, 0, 0, 100, 50); + ctx.drawImage(bitmap, 0, 0, 100, NaN, 0, 0, 100, 50); + ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, 100, 50); + ctx.drawImage(bitmap, 0, 0, 100, 50, -Infinity, 0, 100, 50); + ctx.drawImage(bitmap, 0, 0, 100, 50, NaN, 0, 100, 50); + ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, 100, 50); + ctx.drawImage(bitmap, 0, 0, 100, 50, 0, -Infinity, 100, 50); + ctx.drawImage(bitmap, 0, 0, 100, 50, 0, NaN, 100, 50); + ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, Infinity, 50); + ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, -Infinity, 50); + ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, NaN, 50); + ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, Infinity); + ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, -Infinity); + ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, NaN); + ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, 100, 50); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, 100, 50); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, 100, 50); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, 100, 50); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 100, 50); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 50); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 100, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 50); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, 100, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 100, 50); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity, 50); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 100, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, Infinity, 50); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, 100, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, 100, 50); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, 100, 50); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, Infinity, 50); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, 100, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, Infinity, 50); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, 100, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, 100, 50); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, Infinity, 50); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, 100, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, Infinity, 50); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, 100, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, 100, 50); + ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, 100, 50); + ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, 100, 50); + ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, Infinity, 50); + ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, 100, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, Infinity, 50); + ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, 100, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, 100, 50); + ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, Infinity, 50); + ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, 100, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, Infinity, 50); + ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, 100, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, 100, 50); + ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, 100, 50); + ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, Infinity, 50); + ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, 100, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, Infinity, 50); + ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, 100, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, 100, 50); + ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, Infinity, 50); + ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, 100, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, Infinity, 50); + ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, 100, Infinity); + ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, 100, 50); + ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, 100, 50); + ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, 100, 50); + ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, 100, 50); + ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 50); + ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, 100, Infinity); + ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, Infinity, 50); + ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, 100, Infinity); + ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, 100, 50); + ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, Infinity, 50); + ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, 100, Infinity); + ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, Infinity, 50); + ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, 100, Infinity); + ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, 100, 50); + ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, 100, 50); + ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, Infinity, 50); + ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, 100, Infinity); + ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, Infinity, 50); + ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, 100, Infinity); + ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, 100, 50); + ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, Infinity, 50); + ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, 100, Infinity); + ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, Infinity, 50); + ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, 100, Infinity); + ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, 100, 50); + ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, 100, 50); + ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, 100, 50); + ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, Infinity, 50); + ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, 100, Infinity); + ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, Infinity, 50); + ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, 100, Infinity); + ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, 100, 50); + ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, Infinity, 50); + ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, 100, Infinity); + ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, Infinity, 50); + ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, 100, Infinity); + ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, 100, 50); + ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, 100, 50); + ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, Infinity, 50); + ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, 100, Infinity); + ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, Infinity, 50); + ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, 100, Infinity); + ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, 100, 50); + ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, Infinity, 50); + ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, 100, Infinity); + ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, Infinity, 50); + ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, 100, Infinity); + ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, 100, 50); + ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, 100, 50); + ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, 100, 50); + ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 100, 50); + ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 50); + ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 100, Infinity); + ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 50); + ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity); + ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, 100, Infinity); + ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, 100, 50); + ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity, 50); + ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, 100, Infinity); + ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, Infinity, 50); + ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, Infinity, Infinity); + ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, 100, Infinity); + ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, 100, 50); + ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, 100, 50); + ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, Infinity, 50); + ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, 100, Infinity); + ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, Infinity, 50); + ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, Infinity, Infinity); + ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, 100, Infinity); + ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, 100, 50); + ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, Infinity, 50); + ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, 100, Infinity); + ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, Infinity, 50); + ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, Infinity, Infinity); + ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, 100, Infinity); + ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, 100, 50); + ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, 100, 50); + ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, 100, 50); + ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, Infinity, 50); + ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, 100, Infinity); + ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, Infinity, 50); + ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, Infinity, Infinity); + ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, 100, Infinity); + ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, 100, 50); + ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, Infinity, 50); + ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, 100, Infinity); + ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, Infinity, 50); + ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, Infinity, Infinity); + ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, 100, Infinity); + ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, 100, 50); + ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, 100, 50); + ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, Infinity, 50); + ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, 100, Infinity); + ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, Infinity, 50); + ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, Infinity, Infinity); + ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, 100, Infinity); + ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, 100, 50); + ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, Infinity, 50); + ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, 100, Infinity); + ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, Infinity, 50); + ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, Infinity, Infinity); + ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, 100, Infinity); + ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, 100, 50); + ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, 100, 50); + ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, 100, 50); + ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 50); + ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, 100, Infinity); + ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, Infinity, 50); + ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity); + ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, 100, Infinity); + ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, 100, 50); + ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, Infinity, 50); + ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, 100, Infinity); + ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, Infinity, 50); + ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, Infinity, Infinity); + ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, 100, Infinity); + ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, 100, 50); + ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, 100, 50); + ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, Infinity, 50); + ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, 100, Infinity); + ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, Infinity, 50); + ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, Infinity, Infinity); + ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, 100, Infinity); + ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, 100, 50); + ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, Infinity, 50); + ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, 100, Infinity); + ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, Infinity, 50); + ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, Infinity, Infinity); + ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, 100, Infinity); + ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, 100, 50); + ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, 100, 50); + ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, Infinity, 50); + ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, 100, Infinity); + ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, Infinity, 50); + ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, Infinity, Infinity); + ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, 100, Infinity); + ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, 100, 50); + ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, Infinity, 50); + ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, 100, Infinity); + ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, Infinity, 50); + ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, Infinity, Infinity); + ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, 100, Infinity); + ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, 100, 50); + ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, Infinity, 50); + ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, 100, Infinity); + ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, Infinity, 50); + ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, Infinity, Infinity); + ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, 100, Infinity); + ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, Infinity, 50); + ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, Infinity, Infinity); + ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, 100, Infinity); + ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, Infinity, Infinity); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}, "drawImage() with Infinity/NaN is ignored"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.html new file mode 100644 index 0000000000..1182baec3b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.drawImage.nowrap + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.drawImage.nowrap

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Stretched images do not get pixels wrapping around the edges

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.worker.js new file mode 100644 index 0000000000..47a77834c0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.drawImage.nowrap +// Description:Stretched images do not get pixels wrapping around the edges +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + const response = await fetch('/images/redtransparent.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + + ctx.drawImage(bitmap, -1950, 0, 2000, 50); + _assertPixelApprox(canvas, 45,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 55,25, 0,255,0,255, 2); + t.done(); +}, "Stretched images do not get pixels wrapping around the edges"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.null.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.null.html new file mode 100644 index 0000000000..7a8338b353 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.null.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.drawImage.null + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.drawImage.null

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.null.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.null.worker.js new file mode 100644 index 0000000000..329abd2221 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.null.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.drawImage.null +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_js(TypeError, function() { ctx.drawImage(null, 0, 0); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.path.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.path.html new file mode 100644 index 0000000000..063353c11f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.path.html @@ -0,0 +1,29 @@ + + +OffscreenCanvas test: 2d.drawImage.path + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.drawImage.path

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.path.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.path.worker.js new file mode 100644 index 0000000000..3259ff0258 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.path.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.drawImage.path +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.rect(0, 0, 100, 50); + const response = await fetch('/images/red.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + + ctx.drawImage(bitmap, 0, 0); + ctx.fill(); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.1.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.1.html new file mode 100644 index 0000000000..c5e51c2772 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.1.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.drawImage.self.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.drawImage.self.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.1.worker.js new file mode 100644 index 0000000000..a9af88d13a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.1.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.drawImage.self.1 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + ctx.drawImage(canvas, 50, 0); + + _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2); + _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2); + _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2); + _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.2.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.2.html new file mode 100644 index 0000000000..ac67476966 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.2.html @@ -0,0 +1,38 @@ + + +OffscreenCanvas test: 2d.drawImage.self.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.drawImage.self.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.2.worker.js new file mode 100644 index 0000000000..802d2d8c52 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.2.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.drawImage.self.2 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 1, 100, 49); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 1); + ctx.drawImage(canvas, 0, 1); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 2); + + _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2); + _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2); + _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2); + _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.html new file mode 100644 index 0000000000..c2ebd265cf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.drawImage.svg + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.drawImage.svg

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  drawImage() of an SVG image

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.transform.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.transform.html new file mode 100644 index 0000000000..ca148c1a68 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.transform.html @@ -0,0 +1,29 @@ + + +OffscreenCanvas test: 2d.drawImage.transform + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.drawImage.transform

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.transform.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.transform.worker.js new file mode 100644 index 0000000000..4a4cd07be9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.transform.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.drawImage.transform +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.translate(100, 0); + const response = await fetch('/images/red.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.wrongtype.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.wrongtype.html new file mode 100644 index 0000000000..96906e8fc3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.wrongtype.html @@ -0,0 +1,29 @@ + + +OffscreenCanvas test: 2d.drawImage.wrongtype + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.drawImage.wrongtype

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Incorrect image types in drawImage do not match any defined overloads, so WebIDL throws a TypeError

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.wrongtype.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.wrongtype.worker.js new file mode 100644 index 0000000000..176e418d64 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.wrongtype.worker.js @@ -0,0 +1,24 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.drawImage.wrongtype +// Description:Incorrect image types in drawImage do not match any defined overloads, so WebIDL throws a TypeError +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Incorrect image types in drawImage do not match any defined overloads, so WebIDL throws a TypeError"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_js(TypeError, function() { ctx.drawImage(undefined, 0, 0); }); + assert_throws_js(TypeError, function() { ctx.drawImage(0, 0, 0); }); + assert_throws_js(TypeError, function() { ctx.drawImage("", 0, 0); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.html new file mode 100644 index 0000000000..a30c300730 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.drawImage.zerocanvas + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.drawImage.zerocanvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.worker.js new file mode 100644 index 0000000000..41346ad328 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.drawImage.zerocanvas +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var offscreenCanvas2 = new OffscreenCanvas(0, 10); + assert_throws_dom("INVALID_STATE_ERR", function() { ctx.drawImage(offscreenCanvas2, 0, 0); }); + + offscreenCanvas2.width = 10; + offscreenCanvas2.height = 0; + assert_throws_dom("INVALID_STATE_ERR", function() { ctx.drawImage(offscreenCanvas2, 0, 0); }); + + offscreenCanvas2.width = 0; + offscreenCanvas2.height = 0; + assert_throws_dom("INVALID_STATE_ERR", function() { ctx.drawImage(offscreenCanvas2, 0, 0); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.html new file mode 100644 index 0000000000..0239c5356d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.html @@ -0,0 +1,29 @@ + + +OffscreenCanvas test: 2d.drawImage.zerosource + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.drawImage.zerosource

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  drawImage with zero-sized source rectangle draws nothing without exception

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html new file mode 100644 index 0000000000..77182242d4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html @@ -0,0 +1,39 @@ + + +OffscreenCanvas test: 2d.drawImage.zerosource.image + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.drawImage.zerosource.image

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  drawImage with zero-sized source rectangle from image draws nothing without exception

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.worker.js new file mode 100644 index 0000000000..a80bfff562 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.drawImage.zerosource +// Description:drawImage with zero-sized source rectangle draws nothing without exception +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + const response = await fetch('/images/red.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + ctx.drawImage(bitmap, 10, 10, 0, 1, 0, 0, 100, 50); + ctx.drawImage(bitmap, 10, 10, 1, 0, 0, 0, 100, 50); + ctx.drawImage(bitmap, 10, 10, 0, 0, 0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); +}, "drawImage with zero-sized source rectangle draws nothing without exception"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.basic.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.basic.html new file mode 100644 index 0000000000..02a9cb37ca --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.basic.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.clearRect.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.clearRect.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  clearRect clears to transparent black

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.basic.worker.js new file mode 100644 index 0000000000..8f3a7e46de --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.basic.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.clearRect.basic +// Description:clearRect clears to transparent black +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("clearRect clears to transparent black"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.clearRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,0,0,0); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.clip.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.clip.html new file mode 100644 index 0000000000..2f0f171601 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.clip.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.clearRect.clip + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.clearRect.clip

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  clearRect is affected by clipping regions

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.clip.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.clip.worker.js new file mode 100644 index 0000000000..3d3caedbb1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.clip.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.clearRect.clip +// Description:clearRect is affected by clipping regions +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("clearRect is affected by clipping regions"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.beginPath(); + ctx.rect(0, 0, 16, 16); + ctx.clip(); + ctx.clearRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 16, 16); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.html new file mode 100644 index 0000000000..45875c5270 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.clearRect.globalalpha + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.clearRect.globalalpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  clearRect is not affected by globalAlpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.worker.js new file mode 100644 index 0000000000..1b07b66cb3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.clearRect.globalalpha +// Description:clearRect is not affected by globalAlpha +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("clearRect is not affected by globalAlpha"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalAlpha = 0.1; + ctx.clearRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,0,0,0); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.html new file mode 100644 index 0000000000..b57be641ca --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.clearRect.globalcomposite + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.clearRect.globalcomposite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  clearRect is not affected by globalCompositeOperation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.worker.js new file mode 100644 index 0000000000..e8c1c9b27c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.clearRect.globalcomposite +// Description:clearRect is not affected by globalCompositeOperation +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("clearRect is not affected by globalCompositeOperation"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.clearRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,0,0,0); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.negative.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.negative.html new file mode 100644 index 0000000000..12126dfe87 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.negative.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.clearRect.negative + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.clearRect.negative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  clearRect of negative sizes works

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.negative.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.negative.worker.js new file mode 100644 index 0000000000..62846aec8e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.negative.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.clearRect.negative +// Description:clearRect of negative sizes works +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("clearRect of negative sizes works"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.clearRect(0, 0, 50, 25); + ctx.clearRect(100, 0, -50, 25); + ctx.clearRect(0, 50, 50, -25); + ctx.clearRect(100, 50, -50, -25); + _assertPixel(canvas, 25,12, 0,0,0,0); + _assertPixel(canvas, 75,12, 0,0,0,0); + _assertPixel(canvas, 25,37, 0,0,0,0); + _assertPixel(canvas, 75,37, 0,0,0,0); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.html new file mode 100644 index 0000000000..3327834146 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.html @@ -0,0 +1,52 @@ + + +OffscreenCanvas test: 2d.clearRect.nonfinite + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.clearRect.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  clearRect() with Infinity/NaN is ignored

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.worker.js new file mode 100644 index 0000000000..e2525df3be --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.worker.js @@ -0,0 +1,47 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.clearRect.nonfinite +// Description:clearRect() with Infinity/NaN is ignored +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("clearRect() with Infinity/NaN is ignored"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.clearRect(Infinity, 0, 100, 50); + ctx.clearRect(-Infinity, 0, 100, 50); + ctx.clearRect(NaN, 0, 100, 50); + ctx.clearRect(0, Infinity, 100, 50); + ctx.clearRect(0, -Infinity, 100, 50); + ctx.clearRect(0, NaN, 100, 50); + ctx.clearRect(0, 0, Infinity, 50); + ctx.clearRect(0, 0, -Infinity, 50); + ctx.clearRect(0, 0, NaN, 50); + ctx.clearRect(0, 0, 100, Infinity); + ctx.clearRect(0, 0, 100, -Infinity); + ctx.clearRect(0, 0, 100, NaN); + ctx.clearRect(Infinity, Infinity, 100, 50); + ctx.clearRect(Infinity, Infinity, Infinity, 50); + ctx.clearRect(Infinity, Infinity, Infinity, Infinity); + ctx.clearRect(Infinity, Infinity, 100, Infinity); + ctx.clearRect(Infinity, 0, Infinity, 50); + ctx.clearRect(Infinity, 0, Infinity, Infinity); + ctx.clearRect(Infinity, 0, 100, Infinity); + ctx.clearRect(0, Infinity, Infinity, 50); + ctx.clearRect(0, Infinity, Infinity, Infinity); + ctx.clearRect(0, Infinity, 100, Infinity); + ctx.clearRect(0, 0, Infinity, Infinity); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.path.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.path.html new file mode 100644 index 0000000000..25ad954d06 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.path.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.clearRect.path + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.clearRect.path

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  clearRect does not affect the current path

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.path.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.path.worker.js new file mode 100644 index 0000000000..40f51f9f0e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.path.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.clearRect.path +// Description:clearRect does not affect the current path +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("clearRect does not affect the current path"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.beginPath(); + ctx.rect(0, 0, 100, 50); + ctx.clearRect(0, 0, 16, 16); + ctx.fill(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.html new file mode 100644 index 0000000000..3b3e41c19c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.clearRect.shadow + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.clearRect.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  clearRect does not draw shadows

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.worker.js new file mode 100644 index 0000000000..a1ec8ac7ae --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.clearRect.shadow +// Description:clearRect does not draw shadows +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("clearRect does not draw shadows"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#f00'; + ctx.shadowBlur = 0; + ctx.shadowOffsetX = 0; + ctx.shadowOffsetY = 50; + ctx.clearRect(0, -50, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.transform.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.transform.html new file mode 100644 index 0000000000..8208b6f657 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.transform.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.clearRect.transform + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.clearRect.transform

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  clearRect is affected by transforms

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.transform.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.transform.worker.js new file mode 100644 index 0000000000..f176f3da8a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.transform.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.clearRect.transform +// Description:clearRect is affected by transforms +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("clearRect is affected by transforms"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.scale(10, 10); + ctx.translate(0, 5); + ctx.clearRect(0, -5, 10, 5); + _assertPixel(canvas, 50,25, 0,0,0,0); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.zero.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.zero.html new file mode 100644 index 0000000000..461c318d24 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.zero.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.clearRect.zero + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.clearRect.zero

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  clearRect of zero pixels has no effect

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.zero.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.zero.worker.js new file mode 100644 index 0000000000..b6f42551a2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.zero.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.clearRect.zero +// Description:clearRect of zero pixels has no effect +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("clearRect of zero pixels has no effect"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.clearRect(0, 0, 100, 0); + ctx.clearRect(0, 0, 0, 50); + ctx.clearRect(0, 0, 0, 0); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.basic.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.basic.html new file mode 100644 index 0000000000..3e65472b83 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.basic.html @@ -0,0 +1,29 @@ + + +OffscreenCanvas test: 2d.fillRect.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillRect.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fillRect works

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.basic.worker.js new file mode 100644 index 0000000000..69918278e4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.basic.worker.js @@ -0,0 +1,24 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillRect.basic +// Description:fillRect works +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fillRect works"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.clip.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.clip.html new file mode 100644 index 0000000000..3b26960e24 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.clip.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.fillRect.clip + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillRect.clip

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fillRect is affected by clipping regions

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.clip.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.clip.worker.js new file mode 100644 index 0000000000..890b31e342 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.clip.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillRect.clip +// Description:fillRect is affected by clipping regions +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fillRect is affected by clipping regions"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.beginPath(); + ctx.rect(0, 0, 16, 16); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 16, 16); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.negative.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.negative.html new file mode 100644 index 0000000000..2a1942811f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.negative.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.fillRect.negative + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillRect.negative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fillRect of negative sizes works

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.negative.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.negative.worker.js new file mode 100644 index 0000000000..5df1652331 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.negative.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillRect.negative +// Description:fillRect of negative sizes works +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fillRect of negative sizes works"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 25); + ctx.fillRect(100, 0, -50, 25); + ctx.fillRect(0, 50, 50, -25); + ctx.fillRect(100, 50, -50, -25); + _assertPixel(canvas, 25,12, 0,255,0,255); + _assertPixel(canvas, 75,12, 0,255,0,255); + _assertPixel(canvas, 25,37, 0,255,0,255); + _assertPixel(canvas, 75,37, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.html new file mode 100644 index 0000000000..e44a9d4b78 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.html @@ -0,0 +1,53 @@ + + +OffscreenCanvas test: 2d.fillRect.nonfinite + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillRect.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fillRect() with Infinity/NaN is ignored

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.worker.js new file mode 100644 index 0000000000..bc0170918c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.worker.js @@ -0,0 +1,48 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillRect.nonfinite +// Description:fillRect() with Infinity/NaN is ignored +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fillRect() with Infinity/NaN is ignored"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(Infinity, 0, 100, 50); + ctx.fillRect(-Infinity, 0, 100, 50); + ctx.fillRect(NaN, 0, 100, 50); + ctx.fillRect(0, Infinity, 100, 50); + ctx.fillRect(0, -Infinity, 100, 50); + ctx.fillRect(0, NaN, 100, 50); + ctx.fillRect(0, 0, Infinity, 50); + ctx.fillRect(0, 0, -Infinity, 50); + ctx.fillRect(0, 0, NaN, 50); + ctx.fillRect(0, 0, 100, Infinity); + ctx.fillRect(0, 0, 100, -Infinity); + ctx.fillRect(0, 0, 100, NaN); + ctx.fillRect(Infinity, Infinity, 100, 50); + ctx.fillRect(Infinity, Infinity, Infinity, 50); + ctx.fillRect(Infinity, Infinity, Infinity, Infinity); + ctx.fillRect(Infinity, Infinity, 100, Infinity); + ctx.fillRect(Infinity, 0, Infinity, 50); + ctx.fillRect(Infinity, 0, Infinity, Infinity); + ctx.fillRect(Infinity, 0, 100, Infinity); + ctx.fillRect(0, Infinity, Infinity, 50); + ctx.fillRect(0, Infinity, Infinity, Infinity); + ctx.fillRect(0, Infinity, 100, Infinity); + ctx.fillRect(0, 0, Infinity, Infinity); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.path.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.path.html new file mode 100644 index 0000000000..bcf7ee5a97 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.path.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.fillRect.path + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillRect.path

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fillRect does not affect the current path

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.path.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.path.worker.js new file mode 100644 index 0000000000..ddbfc4a96d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.path.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillRect.path +// Description:fillRect does not affect the current path +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fillRect does not affect the current path"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.beginPath(); + ctx.rect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 16, 16); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.html new file mode 100644 index 0000000000..8a8e38070c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.fillRect.shadow + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillRect.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fillRect draws shadows

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.worker.js new file mode 100644 index 0000000000..ff4ef0ca2d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillRect.shadow +// Description:fillRect draws shadows +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fillRect draws shadows"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowBlur = 0; + ctx.shadowOffsetX = 0; + ctx.shadowOffsetY = 50; + ctx.fillRect(0, -50, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.transform.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.transform.html new file mode 100644 index 0000000000..19cb6ac77a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.transform.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.fillRect.transform + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillRect.transform

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fillRect is affected by transforms

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.transform.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.transform.worker.js new file mode 100644 index 0000000000..a7f328955b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.transform.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillRect.transform +// Description:fillRect is affected by transforms +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fillRect is affected by transforms"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.scale(10, 10); + ctx.translate(0, 5); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, -5, 10, 5); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.zero.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.zero.html new file mode 100644 index 0000000000..3ec78ba18a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.zero.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.fillRect.zero + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillRect.zero

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fillRect of zero pixels has no effect

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.zero.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.zero.worker.js new file mode 100644 index 0000000000..a310d3ff28 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.zero.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillRect.zero +// Description:fillRect of zero pixels has no effect +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fillRect of zero pixels has no effect"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 0); + ctx.fillRect(0, 0, 0, 50); + ctx.fillRect(0, 0, 0, 0); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.html new file mode 100644 index 0000000000..79cc3934b4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.strokeRect.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.strokeRect.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  strokeRect works

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.worker.js new file mode 100644 index 0000000000..de7b13c8f9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.strokeRect.basic +// Description:strokeRect works +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("strokeRect works"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.strokeRect(25, 24, 50, 2); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.html new file mode 100644 index 0000000000..9990f2761e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.strokeRect.clip + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.strokeRect.clip

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  strokeRect is affected by clipping regions

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.worker.js new file mode 100644 index 0000000000..f70a421f1e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.strokeRect.clip +// Description:strokeRect is affected by clipping regions +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("strokeRect is affected by clipping regions"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.beginPath(); + ctx.rect(0, 0, 16, 16); + ctx.clip(); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 50; + ctx.strokeRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 16, 16); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.html new file mode 100644 index 0000000000..efc532f33f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.strokeRect.globalalpha + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.strokeRect.globalalpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  strokeRect is affected by globalAlpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.worker.js new file mode 100644 index 0000000000..2f938b3848 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.strokeRect.globalalpha +// Description:strokeRect is affected by globalAlpha +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("strokeRect is affected by globalAlpha"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.globalAlpha = 0; + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 50; + ctx.strokeRect(25, 24, 50, 2); + _assertPixel(canvas, 50,25, 0,0,0,0); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.html new file mode 100644 index 0000000000..4532604c9a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.strokeRect.globalcomposite + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.strokeRect.globalcomposite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  strokeRect is not affected by globalCompositeOperation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.worker.js new file mode 100644 index 0000000000..9de70c15a0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.strokeRect.globalcomposite +// Description:strokeRect is not affected by globalCompositeOperation +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("strokeRect is not affected by globalCompositeOperation"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.globalCompositeOperation = 'source-in'; + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 50; + ctx.strokeRect(25, 24, 50, 2); + _assertPixel(canvas, 50,25, 0,0,0,0); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.html new file mode 100644 index 0000000000..13af38e565 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.html @@ -0,0 +1,38 @@ + + +OffscreenCanvas test: 2d.strokeRect.negative + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.strokeRect.negative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  strokeRect of negative sizes works

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.worker.js new file mode 100644 index 0000000000..bc2aa0434b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.strokeRect.negative +// Description:strokeRect of negative sizes works +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("strokeRect of negative sizes works"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 25; + ctx.strokeRect(12, 12, 26, 1); + ctx.strokeRect(88, 12, -26, 1); + ctx.strokeRect(12, 38, 26, -1); + ctx.strokeRect(88, 38, -26, -1); + _assertPixel(canvas, 25,12, 0,255,0,255); + _assertPixel(canvas, 75,12, 0,255,0,255); + _assertPixel(canvas, 25,37, 0,255,0,255); + _assertPixel(canvas, 75,37, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.html new file mode 100644 index 0000000000..6393797464 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.html @@ -0,0 +1,54 @@ + + +OffscreenCanvas test: 2d.strokeRect.nonfinite + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.strokeRect.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  strokeRect() with Infinity/NaN is ignored

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.worker.js new file mode 100644 index 0000000000..1878e54c5f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.worker.js @@ -0,0 +1,49 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.strokeRect.nonfinite +// Description:strokeRect() with Infinity/NaN is ignored +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("strokeRect() with Infinity/NaN is ignored"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 150; + ctx.strokeRect(Infinity, 0, 100, 50); + ctx.strokeRect(-Infinity, 0, 100, 50); + ctx.strokeRect(NaN, 0, 100, 50); + ctx.strokeRect(0, Infinity, 100, 50); + ctx.strokeRect(0, -Infinity, 100, 50); + ctx.strokeRect(0, NaN, 100, 50); + ctx.strokeRect(0, 0, Infinity, 50); + ctx.strokeRect(0, 0, -Infinity, 50); + ctx.strokeRect(0, 0, NaN, 50); + ctx.strokeRect(0, 0, 100, Infinity); + ctx.strokeRect(0, 0, 100, -Infinity); + ctx.strokeRect(0, 0, 100, NaN); + ctx.strokeRect(Infinity, Infinity, 100, 50); + ctx.strokeRect(Infinity, Infinity, Infinity, 50); + ctx.strokeRect(Infinity, Infinity, Infinity, Infinity); + ctx.strokeRect(Infinity, Infinity, 100, Infinity); + ctx.strokeRect(Infinity, 0, Infinity, 50); + ctx.strokeRect(Infinity, 0, Infinity, Infinity); + ctx.strokeRect(Infinity, 0, 100, Infinity); + ctx.strokeRect(0, Infinity, Infinity, 50); + ctx.strokeRect(0, Infinity, Infinity, Infinity); + ctx.strokeRect(0, Infinity, 100, Infinity); + ctx.strokeRect(0, 0, Infinity, Infinity); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.path.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.path.html new file mode 100644 index 0000000000..da8e903f9c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.path.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.strokeRect.path + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.strokeRect.path

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  strokeRect does not affect the current path

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.path.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.path.worker.js new file mode 100644 index 0000000000..839b973b17 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.path.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.strokeRect.path +// Description:strokeRect does not affect the current path +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("strokeRect does not affect the current path"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.beginPath(); + ctx.rect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 5; + ctx.strokeRect(0, 0, 16, 16); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.html new file mode 100644 index 0000000000..2adf24e2b5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.strokeRect.shadow + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.strokeRect.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  strokeRect draws shadows

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.worker.js new file mode 100644 index 0000000000..36b3455016 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.strokeRect.shadow +// Description:strokeRect draws shadows +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("strokeRect draws shadows"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.shadowColor = '#0f0'; + ctx.shadowBlur = 0; + ctx.shadowOffsetX = 0; + ctx.shadowOffsetY = 50; + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 50; + ctx.strokeRect(0, -75, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.html new file mode 100644 index 0000000000..214ea14023 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.strokeRect.transform + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.strokeRect.transform

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fillRect is affected by transforms

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.worker.js new file mode 100644 index 0000000000..43aab18533 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.strokeRect.transform +// Description:fillRect is affected by transforms +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fillRect is affected by transforms"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.scale(10, 10); + ctx.translate(0, 5); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 5; + ctx.strokeRect(2.5, -2.6, 5, 0.2); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.html new file mode 100644 index 0000000000..2c63913fca --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.strokeRect.zero.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.strokeRect.zero.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  strokeRect of 0x0 pixels draws nothing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.worker.js new file mode 100644 index 0000000000..115017b3bf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.strokeRect.zero.1 +// Description:strokeRect of 0x0 pixels draws nothing +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("strokeRect of 0x0 pixels draws nothing"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 250; + ctx.strokeRect(50, 25, 0, 0); + _assertPixel(canvas, 50,25, 0,0,0,0); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.html new file mode 100644 index 0000000000..16bddea7ee --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.strokeRect.zero.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.strokeRect.zero.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  strokeRect of 0x0 pixels draws nothing, including caps and joins

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.worker.js new file mode 100644 index 0000000000..973ebec44a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.strokeRect.zero.2 +// Description:strokeRect of 0x0 pixels draws nothing, including caps and joins +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("strokeRect of 0x0 pixels draws nothing, including caps and joins"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 250; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + ctx.strokeRect(50, 25, 0, 0); + _assertPixel(canvas, 50,25, 0,0,0,0); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.html new file mode 100644 index 0000000000..8bf3e043db --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.strokeRect.zero.3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.strokeRect.zero.3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  strokeRect of Nx0 pixels draws a straight line

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.worker.js new file mode 100644 index 0000000000..2612e54fdb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.strokeRect.zero.3 +// Description:strokeRect of Nx0 pixels draws a straight line +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("strokeRect of Nx0 pixels draws a straight line"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.strokeRect(0, 25, 100, 0); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.html new file mode 100644 index 0000000000..87aeaf7c13 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.strokeRect.zero.4 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.strokeRect.zero.4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  strokeRect of Nx0 pixels draws a closed line with no caps

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.worker.js new file mode 100644 index 0000000000..3cec206313 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.strokeRect.zero.4 +// Description:strokeRect of Nx0 pixels draws a closed line with no caps +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("strokeRect of Nx0 pixels draws a closed line with no caps"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 250; + ctx.lineCap = 'round'; + ctx.strokeRect(100, 25, 100, 0); + _assertPixel(canvas, 50,25, 0,0,0,0); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.html b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.html new file mode 100644 index 0000000000..e03e7aa118 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.strokeRect.zero.5 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.strokeRect.zero.5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  strokeRect of Nx0 pixels draws a closed line with joins

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.worker.js b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.worker.js new file mode 100644 index 0000000000..8591409705 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.strokeRect.zero.5 +// Description:strokeRect of Nx0 pixels draws a closed line with joins +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("strokeRect of Nx0 pixels draws a closed line with joins"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 250; + ctx.lineJoin = 'round'; + ctx.strokeRect(100, 25, 100, 0); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.CSSHSL.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.CSSHSL.html new file mode 100644 index 0000000000..8e488a5a58 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.CSSHSL.html @@ -0,0 +1,51 @@ + + +OffscreenCanvas test: 2d.fillStyle.CSSHSL + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.CSSHSL

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  CSSHSL works as color input

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.CSSRGB.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.CSSRGB.html new file mode 100644 index 0000000000..1670d64295 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.CSSRGB.html @@ -0,0 +1,60 @@ + + +OffscreenCanvas test: 2d.fillStyle.CSSRGB + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.CSSRGB

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  CSSRGB works as color input

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.colormix.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.colormix.html new file mode 100644 index 0000000000..059c551e46 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.colormix.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.colormix + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.colormix

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  color-mix works as color input

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.colormix.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.colormix.worker.js new file mode 100644 index 0000000000..d015790ead --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.colormix.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.colormix +// Description:color-mix works as color input +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("color-mix works as color input"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = "color-mix(in srgb, red, blue)"; + _assertSame(ctx.fillStyle, 'color(srgb 0.5 0 0.5)', "ctx.fillStyle", "'color(srgb 0.5 0 0.5)'"); + ctx.fillStyle = "color-mix(in srgb, red, color(srgb 1 0 0))"; + _assertSame(ctx.fillStyle, 'color(srgb 1 0 0)', "ctx.fillStyle", "'color(srgb 1 0 0)'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.default.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.default.html new file mode 100644 index 0000000000..58075168e8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.default.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.fillStyle.default + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.default

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.default.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.default.worker.js new file mode 100644 index 0000000000..34a6f1276a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.default.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.default +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.fillStyle, '#000000', "ctx.fillStyle", "'#000000'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.halftransparent.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.halftransparent.html new file mode 100644 index 0000000000..cd0b0c2437 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.halftransparent.html @@ -0,0 +1,28 @@ + + +OffscreenCanvas test: 2d.fillStyle.get.halftransparent + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.get.halftransparent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.halftransparent.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.halftransparent.worker.js new file mode 100644 index 0000000000..7590816b32 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.halftransparent.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.get.halftransparent +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(255,255,255,0.5)'; + _assertSame(ctx.fillStyle, 'rgba(255, 255, 255, 0.5)', "ctx.fillStyle", "'rgba(255, 255, 255, 0.5)'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.semitransparent.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.semitransparent.html new file mode 100644 index 0000000000..6be295ae0b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.semitransparent.html @@ -0,0 +1,28 @@ + + +OffscreenCanvas test: 2d.fillStyle.get.semitransparent + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.get.semitransparent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.semitransparent.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.semitransparent.worker.js new file mode 100644 index 0000000000..1c25bc2ed5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.semitransparent.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.get.semitransparent +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(255,255,255,0.45)'; + assert_regexp_match(ctx.fillStyle, /^rgba\(255, 255, 255, 0\.4\d+\)$/); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.solid.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.solid.html new file mode 100644 index 0000000000..4d8ccc0ff4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.solid.html @@ -0,0 +1,28 @@ + + +OffscreenCanvas test: 2d.fillStyle.get.solid + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.get.solid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.solid.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.solid.worker.js new file mode 100644 index 0000000000..efec71ca9e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.solid.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.get.solid +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#fa0'; + _assertSame(ctx.fillStyle, '#ffaa00', "ctx.fillStyle", "'#ffaa00'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.transparent.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.transparent.html new file mode 100644 index 0000000000..8fe102f2b1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.transparent.html @@ -0,0 +1,28 @@ + + +OffscreenCanvas test: 2d.fillStyle.get.transparent + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.get.transparent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.transparent.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.transparent.worker.js new file mode 100644 index 0000000000..51542bad82 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.transparent.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.get.transparent +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0,0,0,0)'; + _assertSame(ctx.fillStyle, 'rgba(0, 0, 0, 0)', "ctx.fillStyle", "'rgba(0, 0, 0, 0)'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidstring.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidstring.html new file mode 100644 index 0000000000..a30bc4ac7c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidstring.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.fillStyle.invalidstring + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.invalidstring

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidstring.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidstring.worker.js new file mode 100644 index 0000000000..f2f5ccacce --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidstring.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.invalidstring +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillStyle = 'invalid'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidtype.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidtype.html new file mode 100644 index 0000000000..23814ae87c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidtype.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.fillStyle.invalidtype + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.invalidtype

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidtype.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidtype.worker.js new file mode 100644 index 0000000000..13e10e1254 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidtype.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.invalidtype +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillStyle = null; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.html new file mode 100644 index 0000000000..222d7f6077 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-hsl-1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-hsl-1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.worker.js new file mode 100644 index 0000000000..74137880b7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-hsl-1 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120 100.0% 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.html new file mode 100644 index 0000000000..b2c93c1e26 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-hsl-2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-hsl-2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.worker.js new file mode 100644 index 0000000000..3ccd75a400 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-hsl-2 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120 100.0% 50.0% / 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.html new file mode 100644 index 0000000000..fc8726904c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-hsl-3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-hsl-3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.worker.js new file mode 100644 index 0000000000..bfaba36446 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-hsl-3 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.html new file mode 100644 index 0000000000..71cb327c5f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-hsl-4 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-hsl-4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.worker.js new file mode 100644 index 0000000000..afe12657bc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-hsl-4 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 20%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.html new file mode 100644 index 0000000000..787d5e7644 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-hsl-5 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-hsl-5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.worker.js new file mode 100644 index 0000000000..05c77b0a1d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-hsl-5 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120deg, 100.0%, 50.0%, 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.html new file mode 100644 index 0000000000..8acc67f968 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-hsl-6 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-hsl-6

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.worker.js new file mode 100644 index 0000000000..8ff08394b7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-hsl-6 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120deg, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.html new file mode 100644 index 0000000000..dc295d070a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-hsl-7 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-hsl-7

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.worker.js new file mode 100644 index 0000000000..9d0513ffca --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-hsl-7 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(133.33333333grad, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.html new file mode 100644 index 0000000000..50970585ca --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-hsl-8 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-hsl-8

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.worker.js new file mode 100644 index 0000000000..ce56342cea --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-hsl-8 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(2.0943951024rad, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.html new file mode 100644 index 0000000000..47cd157c44 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-hsl-9 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-hsl-9

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.worker.js new file mode 100644 index 0000000000..e45f55930d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-hsl-9 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(0.3333333333turn, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.html new file mode 100644 index 0000000000..2d1e46f1a9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-hsla-1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-hsla-1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.worker.js new file mode 100644 index 0000000000..2a1157ed1f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-hsla-1 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120 100.0% 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.html new file mode 100644 index 0000000000..f5531f68e1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-hsla-2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-hsla-2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.worker.js new file mode 100644 index 0000000000..23cd58d1a0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-hsla-2 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120 100.0% 50.0% / 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.html new file mode 100644 index 0000000000..fde2328c43 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-hsla-3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-hsla-3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.worker.js new file mode 100644 index 0000000000..64577bc348 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-hsla-3 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.html new file mode 100644 index 0000000000..3b6e1f1347 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-hsla-4 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-hsla-4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.worker.js new file mode 100644 index 0000000000..05b08f0a0c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-hsla-4 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 20%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.html new file mode 100644 index 0000000000..b0677c16dc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-hsla-5 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-hsla-5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.worker.js new file mode 100644 index 0000000000..51484f3aef --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-hsla-5 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120deg, 100.0%, 50.0%, 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.html new file mode 100644 index 0000000000..809d11c4cd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-hsla-6 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-hsla-6

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.worker.js new file mode 100644 index 0000000000..7b224e5c93 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-hsla-6 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120deg, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.html new file mode 100644 index 0000000000..48c3c6927e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-hsla-7 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-hsla-7

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.worker.js new file mode 100644 index 0000000000..ed51a5df40 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-hsla-7 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(133.33333333grad, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.html new file mode 100644 index 0000000000..f49b313a1f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-hsla-8 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-hsla-8

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.worker.js new file mode 100644 index 0000000000..c61fb1a1fc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-hsla-8 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(2.0943951024rad, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.html new file mode 100644 index 0000000000..68c4e224a2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-hsla-9 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-hsla-9

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.worker.js new file mode 100644 index 0000000000..51541b7148 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-hsla-9 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(0.3333333333turn, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.html new file mode 100644 index 0000000000..c9d75ca5c6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-rgb-1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-rgb-1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.worker.js new file mode 100644 index 0000000000..f0a67250f1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-rgb-1 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0, 255.0, 0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.html new file mode 100644 index 0000000000..0acc23ef95 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-rgb-2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-rgb-2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.worker.js new file mode 100644 index 0000000000..eb6b952b4c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-rgb-2 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0, 255, 0, 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.html new file mode 100644 index 0000000000..85c2606c98 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-rgb-3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-rgb-3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.worker.js new file mode 100644 index 0000000000..9db5b7c33e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-rgb-3 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0, 255, 0, 20%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.html new file mode 100644 index 0000000000..e028260ee5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-rgb-4 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-rgb-4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.worker.js new file mode 100644 index 0000000000..fecb3ecb6e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-rgb-4 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0 255 0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-5.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-5.html new file mode 100644 index 0000000000..51ace916b1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-5.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-rgb-5 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-rgb-5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-5.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-5.worker.js new file mode 100644 index 0000000000..03948b0c69 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-5.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-rgb-5 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0 255 0 / 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.html new file mode 100644 index 0000000000..6df2f914e8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-rgb-6 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-rgb-6

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.worker.js new file mode 100644 index 0000000000..5f31d9a9f4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-rgb-6 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0 255 0 / 20%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.html new file mode 100644 index 0000000000..19d726ee3b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-rgba-1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-rgba-1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.worker.js new file mode 100644 index 0000000000..24f278221e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-rgba-1 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0, 255.0, 0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-2.html new file mode 100644 index 0000000000..1603ae93ab --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-2.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-rgba-2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-rgba-2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-2.worker.js new file mode 100644 index 0000000000..fcda86bae2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-2.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-rgba-2 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0, 255, 0, 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.html new file mode 100644 index 0000000000..53ad71781a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-rgba-3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-rgba-3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.worker.js new file mode 100644 index 0000000000..164f17f3d8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-rgba-3 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0, 255, 0, 20%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.html new file mode 100644 index 0000000000..3dc9f9c7a7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-rgba-4 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-rgba-4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.worker.js new file mode 100644 index 0000000000..da512a261e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-rgba-4 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0 255 0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.html new file mode 100644 index 0000000000..db0e891f22 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-rgba-5 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-rgba-5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.worker.js new file mode 100644 index 0000000000..7f10cba4d5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-rgba-5 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0 255 0 / 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.html new file mode 100644 index 0000000000..c4ec4622a5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.css-color-4-rgba-6 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.css-color-4-rgba-6

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.worker.js new file mode 100644 index 0000000000..2d81992eba --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-rgba-6 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0 255 0 / 20%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex3.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex3.html new file mode 100644 index 0000000000..90c4d4f5d7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex3.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.hex3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.hex3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex3.worker.js new file mode 100644 index 0000000000..7ee281b443 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex3.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.hex3 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex4.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex4.html new file mode 100644 index 0000000000..8a6260fa89 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex4.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.hex4 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.hex4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex4.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex4.worker.js new file mode 100644 index 0000000000..53001f9580 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex4.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.hex4 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = '#0f0f'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex6.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex6.html new file mode 100644 index 0000000000..02f698ea30 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex6.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.hex6 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.hex6

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex6.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex6.worker.js new file mode 100644 index 0000000000..e9420b62e1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex6.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.hex6 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = '#00fF00'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex8.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex8.html new file mode 100644 index 0000000000..1563bab113 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex8.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.hex8 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.hex8

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex8.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex8.worker.js new file mode 100644 index 0000000000..35cdc5c292 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex8.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.hex8 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = '#00ff00ff'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-1.html new file mode 100644 index 0000000000..96e6515a61 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-1.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.hsl-1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.hsl-1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-1.worker.js new file mode 100644 index 0000000000..204df1a35f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-1.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.hsl-1 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120, 100%, 50%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-2.html new file mode 100644 index 0000000000..b6f8f2bb76 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-2.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.hsl-2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.hsl-2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-2.worker.js new file mode 100644 index 0000000000..f282d3ca1f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-2.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.hsl-2 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl( -240 , 100% , 50% )'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-3.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-3.html new file mode 100644 index 0000000000..5ed3b96b9b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-3.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.hsl-3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.hsl-3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-3.worker.js new file mode 100644 index 0000000000..a4abd304a8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-3.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.hsl-3 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(360120, 100%, 50%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-4.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-4.html new file mode 100644 index 0000000000..f91edd75bf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-4.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.hsl-4 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.hsl-4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-4.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-4.worker.js new file mode 100644 index 0000000000..19cbfd08cf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-4.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.hsl-4 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(-360240, 100%, 50%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-5.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-5.html new file mode 100644 index 0000000000..c4624da0c9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-5.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.hsl-5 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.hsl-5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-5.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-5.worker.js new file mode 100644 index 0000000000..49689b8274 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-5.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.hsl-5 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120.0, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.html new file mode 100644 index 0000000000..5baa5b3b00 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.hsl-6 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.hsl-6

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.worker.js new file mode 100644 index 0000000000..9f99d96403 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.hsl-6 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(+120, +100%, +50%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-1.html new file mode 100644 index 0000000000..db43c45dc8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-1.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.hsl-clamp-1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.hsl-clamp-1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-1.worker.js new file mode 100644 index 0000000000..868beda764 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-1.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.hsl-clamp-1 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120, 200%, 50%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-2.html new file mode 100644 index 0000000000..a5b399a748 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-2.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.hsl-clamp-2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.hsl-clamp-2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-2.worker.js new file mode 100644 index 0000000000..2f1d2d72e6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-2.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.hsl-clamp-2 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120, -200%, 49.9%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 127,127,127,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.html new file mode 100644 index 0000000000..cfa6d82382 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.hsl-clamp-3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.hsl-clamp-3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.worker.js new file mode 100644 index 0000000000..4c71d6d140 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.hsl-clamp-3 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120, 100%, 200%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 255,255,255,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.html new file mode 100644 index 0000000000..a3bfd8c22f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.hsl-clamp-4 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.hsl-clamp-4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.worker.js new file mode 100644 index 0000000000..e4477f5cb8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.hsl-clamp-4 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120, 100%, -200%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,0,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.html new file mode 100644 index 0000000000..67a65da730 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.hsla-1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.hsla-1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.worker.js new file mode 100644 index 0000000000..c002368227 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.hsla-1 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla(120, 100%, 50%, 0.499)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,127); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.html new file mode 100644 index 0000000000..c63fac5dd6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.hsla-2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.hsla-2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.worker.js new file mode 100644 index 0000000000..aca5d8d916 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.hsla-2 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla( 120.0 , 100.0% , 50.0% , 1 )'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.html new file mode 100644 index 0000000000..ebd766165d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.hsla-clamp-1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.hsla-clamp-1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.worker.js new file mode 100644 index 0000000000..6a29123d95 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.hsla-clamp-1 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla(120, 200%, 50%, 1)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-2.html new file mode 100644 index 0000000000..91ec54841c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-2.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.hsla-clamp-2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.hsla-clamp-2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-2.worker.js new file mode 100644 index 0000000000..c27c9f8619 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-2.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.hsla-clamp-2 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla(120, -200%, 49.9%, 1)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 127,127,127,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.html new file mode 100644 index 0000000000..343bf8b2e2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.hsla-clamp-3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.hsla-clamp-3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.worker.js new file mode 100644 index 0000000000..64f459c23f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.hsla-clamp-3 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla(120, 100%, 200%, 1)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 255,255,255,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.html new file mode 100644 index 0000000000..c54d409934 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.hsla-clamp-4 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.hsla-clamp-4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.worker.js new file mode 100644 index 0000000000..b24163a786 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.hsla-clamp-4 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla(120, 100%, -200%, 1)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,0,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.html new file mode 100644 index 0000000000..d068ffa921 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.hsla-clamp-5 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.hsla-clamp-5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.worker.js new file mode 100644 index 0000000000..a10af90a0f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.hsla-clamp-5 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla(120, 100%, 50%, 2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.html new file mode 100644 index 0000000000..f8f0a78f21 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.hsla-clamp-6 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.hsla-clamp-6

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.worker.js new file mode 100644 index 0000000000..da6cd93e2a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.hsla-clamp-6 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla(120, 100%, 0%, -2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,0,0,0); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.html4.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.html4.html new file mode 100644 index 0000000000..fc1c1af18b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.html4.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.html4 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.html4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.html4.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.html4.worker.js new file mode 100644 index 0000000000..7430608f63 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.html4.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.html4 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'limE'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-1.html new file mode 100644 index 0000000000..3edffc6d93 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-1.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.css-color-4-hsl-1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.css-color-4-hsl-1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-1.worker.js new file mode 100644 index 0000000000..054568e1de --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-1.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.css-color-4-hsl-1 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0, 100%, 50% / 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-2.html new file mode 100644 index 0000000000..477b318f41 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-2.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.css-color-4-hsl-2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.css-color-4-hsl-2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-2.worker.js new file mode 100644 index 0000000000..74d6904f84 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-2.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.css-color-4-hsl-2 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0 100% 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-3.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-3.html new file mode 100644 index 0000000000..e2092666c6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-3.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.css-color-4-hsl-3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.css-color-4-hsl-3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-3.worker.js new file mode 100644 index 0000000000..7e930df400 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-3.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.css-color-4-hsl-3 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0, 100% 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-4.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-4.html new file mode 100644 index 0000000000..5bcc1755b0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-4.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.css-color-4-hsl-4 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.css-color-4-hsl-4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-4.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-4.worker.js new file mode 100644 index 0000000000..cca9d52ab1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-4.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.css-color-4-hsl-4 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0 100% 50% /)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-5.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-5.html new file mode 100644 index 0000000000..ba46540802 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-5.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.css-color-4-hsl-5 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.css-color-4-hsl-5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-5.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-5.worker.js new file mode 100644 index 0000000000..5c17b9eeb3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-5.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.css-color-4-hsl-5 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0, 100%, 50% /)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-1.html new file mode 100644 index 0000000000..a5f8f3fe9c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-1.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.css-color-4-hsla-1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.css-color-4-hsla-1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-1.worker.js new file mode 100644 index 0000000000..1ab7e713d0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-1.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.css-color-4-hsla-1 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsla(0, 100%, 50% / 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-2.html new file mode 100644 index 0000000000..bd543220d0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-2.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.css-color-4-hsla-2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.css-color-4-hsla-2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-2.worker.js new file mode 100644 index 0000000000..9f1aeed563 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-2.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.css-color-4-hsla-2 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsla(0 100% 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-3.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-3.html new file mode 100644 index 0000000000..e33b9415b2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-3.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.css-color-4-hsla-3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.css-color-4-hsla-3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-3.worker.js new file mode 100644 index 0000000000..c06a31941b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-3.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.css-color-4-hsla-3 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsla(0, 100% 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-1.html new file mode 100644 index 0000000000..8fbbc7ae51 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-1.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.css-color-4-rgb-1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.css-color-4-rgb-1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-1.worker.js new file mode 100644 index 0000000000..a728e8d358 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-1.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.css-color-4-rgb-1 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(255, 0, 0 / 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-2.html new file mode 100644 index 0000000000..adc8297488 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-2.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.css-color-4-rgb-2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.css-color-4-rgb-2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-2.worker.js new file mode 100644 index 0000000000..da9b95c191 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-2.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.css-color-4-rgb-2 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(255 0 0, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-3.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-3.html new file mode 100644 index 0000000000..4d385d56cc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-3.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.css-color-4-rgb-3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.css-color-4-rgb-3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-3.worker.js new file mode 100644 index 0000000000..eee7fb92fd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-3.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.css-color-4-rgb-3 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(255, 0 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-4.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-4.html new file mode 100644 index 0000000000..6b855b4357 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-4.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.css-color-4-rgb-4 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.css-color-4-rgb-4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-4.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-4.worker.js new file mode 100644 index 0000000000..2b25416de7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-4.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.css-color-4-rgb-4 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(0 0 0 /)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-5.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-5.html new file mode 100644 index 0000000000..13fadb9a24 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-5.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.css-color-4-rgb-5 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.css-color-4-rgb-5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-5.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-5.worker.js new file mode 100644 index 0000000000..7932932d93 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-5.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.css-color-4-rgb-5 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(0, 0, 0 /)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-1.html new file mode 100644 index 0000000000..5353f77b8f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-1.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.css-color-4-rgba-1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.css-color-4-rgba-1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-1.worker.js new file mode 100644 index 0000000000..ef559c45f0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-1.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.css-color-4-rgba-1 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(255, 0, 0 / 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-2.html new file mode 100644 index 0000000000..aaa555aa05 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-2.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.css-color-4-rgba-2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.css-color-4-rgba-2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-2.worker.js new file mode 100644 index 0000000000..7a06f832e8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-2.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.css-color-4-rgba-2 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(255 0 0, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-3.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-3.html new file mode 100644 index 0000000000..e8c0588851 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-3.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.css-color-4-rgba-3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.css-color-4-rgba-3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-3.worker.js new file mode 100644 index 0000000000..65ed246a39 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-3.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.css-color-4-rgba-3 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(255, 0 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex1.html new file mode 100644 index 0000000000..28a7ff4739 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex1.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.hex1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.hex1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex1.worker.js new file mode 100644 index 0000000000..0cb79048c5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex1.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.hex1 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#f'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex2.html new file mode 100644 index 0000000000..0dcf0f8282 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex2.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.hex2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.hex2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex2.worker.js new file mode 100644 index 0000000000..d2dd193748 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex2.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.hex2 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#f0'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex3.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex3.html new file mode 100644 index 0000000000..8e1bd9fa0f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex3.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.hex3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.hex3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex3.worker.js new file mode 100644 index 0000000000..805becb3b8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex3.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.hex3 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#g00'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex4.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex4.html new file mode 100644 index 0000000000..f59991d317 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex4.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.hex4 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.hex4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex4.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex4.worker.js new file mode 100644 index 0000000000..1499fb7e13 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex4.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.hex4 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#fg00'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex5.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex5.html new file mode 100644 index 0000000000..9567114a13 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex5.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.hex5 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.hex5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex5.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex5.worker.js new file mode 100644 index 0000000000..d50daeb4c4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex5.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.hex5 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#ff000'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex6.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex6.html new file mode 100644 index 0000000000..b36d0c8654 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex6.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.hex6 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.hex6

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex6.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex6.worker.js new file mode 100644 index 0000000000..606aa4f458 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex6.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.hex6 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#fg0000'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex7.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex7.html new file mode 100644 index 0000000000..5b38e7873f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex7.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.hex7 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.hex7

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex7.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex7.worker.js new file mode 100644 index 0000000000..92ff04a530 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex7.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.hex7 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#ff0000f'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex8.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex8.html new file mode 100644 index 0000000000..1eda0c74a1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex8.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.hex8 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.hex8

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex8.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex8.worker.js new file mode 100644 index 0000000000..4508cc567c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex8.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.hex8 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#fg0000ff'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-1.html new file mode 100644 index 0000000000..9ff3c68fe2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-1.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.hsl-1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.hsl-1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-1.worker.js new file mode 100644 index 0000000000..e3cbe474b2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-1.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.hsl-1 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0%, 100%, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-2.html new file mode 100644 index 0000000000..46fac5fd40 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-2.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.hsl-2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.hsl-2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-2.worker.js new file mode 100644 index 0000000000..56c36f3688 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-2.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.hsl-2 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(z, 100%, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-3.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-3.html new file mode 100644 index 0000000000..1f05e8d944 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-3.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.hsl-3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.hsl-3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-3.worker.js new file mode 100644 index 0000000000..491b5bdf49 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-3.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.hsl-3 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0, 0, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-4.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-4.html new file mode 100644 index 0000000000..dd2cec7977 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-4.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.hsl-4 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.hsl-4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-4.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-4.worker.js new file mode 100644 index 0000000000..fef0f0aee2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-4.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.hsl-4 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0, 100%, 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-5.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-5.html new file mode 100644 index 0000000000..909e230b16 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-5.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.hsl-5 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.hsl-5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-5.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-5.worker.js new file mode 100644 index 0000000000..635e0bf72e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-5.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.hsl-5 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0, 100.%, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-6.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-6.html new file mode 100644 index 0000000000..9bb652c076 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-6.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.hsl-6 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.hsl-6

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-6.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-6.worker.js new file mode 100644 index 0000000000..efe1aa7ded --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-6.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.hsl-6 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0, 100%, 50%,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-1.html new file mode 100644 index 0000000000..9b553c669d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-1.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.hsla-1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.hsla-1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-1.worker.js new file mode 100644 index 0000000000..757ca911fb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-1.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.hsla-1 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsla(0%, 100%, 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-2.html new file mode 100644 index 0000000000..d894bc42fd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-2.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.hsla-2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.hsla-2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-2.worker.js new file mode 100644 index 0000000000..be2b2ddf00 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-2.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.hsla-2 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsla(0, 0, 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-3.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-3.html new file mode 100644 index 0000000000..8901a112b2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-3.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.hsla-3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.hsla-3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-3.worker.js new file mode 100644 index 0000000000..52d3707f70 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-3.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.hsla-3 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsla(0, 0, 50%, 1,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-1.html new file mode 100644 index 0000000000..ceb6c53a83 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-1.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.name-1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.name-1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-1.worker.js new file mode 100644 index 0000000000..6331a2dfb2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-1.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.name-1 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'darkbrown'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-2.html new file mode 100644 index 0000000000..684a665574 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-2.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.name-2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.name-2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-2.worker.js new file mode 100644 index 0000000000..101646c995 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-2.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.name-2 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'firebrick1'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-3.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-3.html new file mode 100644 index 0000000000..ebf508f464 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-3.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.name-3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.name-3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-3.worker.js new file mode 100644 index 0000000000..61e43e03d8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-3.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.name-3 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'red blue'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-4.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-4.html new file mode 100644 index 0000000000..ba1f71b123 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-4.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.name-4 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.name-4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-4.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-4.worker.js new file mode 100644 index 0000000000..b1efecdc57 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-4.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.name-4 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '"red"'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-5.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-5.html new file mode 100644 index 0000000000..a889a387af --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-5.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.name-5 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.name-5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-5.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-5.worker.js new file mode 100644 index 0000000000..e519fff426 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-5.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.name-5 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '"red'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-1.html new file mode 100644 index 0000000000..e1fb32a179 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-1.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.rgb-1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.rgb-1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-1.worker.js new file mode 100644 index 0000000000..8255f35478 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-1.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.rgb-1 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(255.0, 0, 0,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-2.html new file mode 100644 index 0000000000..54d7daf999 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-2.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.rgb-2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.rgb-2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-2.worker.js new file mode 100644 index 0000000000..c0787e32cb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-2.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.rgb-2 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(100%, 0, 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-3.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-3.html new file mode 100644 index 0000000000..9874fc6f74 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-3.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.rgb-3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.rgb-3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-3.worker.js new file mode 100644 index 0000000000..62365ac17a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-3.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.rgb-3 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(255, - 1, 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-1.html new file mode 100644 index 0000000000..fbfa4baef2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-1.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.rgba-1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.rgba-1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-1.worker.js new file mode 100644 index 0000000000..53063fd9b5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-1.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.rgba-1 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(100%, 0, 0, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-2.html new file mode 100644 index 0000000000..43cd1763c1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-2.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.rgba-2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.rgba-2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-2.worker.js new file mode 100644 index 0000000000..df7079284c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-2.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.rgba-2 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(255, 0, 0, 1. 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-3.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-3.html new file mode 100644 index 0000000000..96955226a5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-3.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.rgba-3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.rgba-3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-3.worker.js new file mode 100644 index 0000000000..8f45ef582f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-3.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.rgba-3 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(255, 0, 0, 1.)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-4.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-4.html new file mode 100644 index 0000000000..9334d693ab --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-4.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.rgba-4 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.rgba-4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-4.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-4.worker.js new file mode 100644 index 0000000000..47549bea5e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-4.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.rgba-4 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(255, 0, 0, '; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-5.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-5.html new file mode 100644 index 0000000000..7b53652a94 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-5.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.invalid.rgba-5 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.invalid.rgba-5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-5.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-5.worker.js new file mode 100644 index 0000000000..562b9661ec --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-5.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.rgba-5 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(255, 0, 0, 1,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.html new file mode 100644 index 0000000000..c9e9e4c413 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.rgb-clamp-1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.rgb-clamp-1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Assumes colors are clamped to [0,255]. + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.worker.js new file mode 100644 index 0000000000..51b81c5bba --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.rgb-clamp-1 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Assumes colors are clamped to [0,255]. + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(-1000, 1000, -1000)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-2.html new file mode 100644 index 0000000000..98df8d67e4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-2.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.rgb-clamp-2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.rgb-clamp-2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Assumes colors are clamped to [0,255]. + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-2.worker.js new file mode 100644 index 0000000000..bfe9102f99 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-2.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.rgb-clamp-2 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Assumes colors are clamped to [0,255]. + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(-200%, 200%, -200%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-3.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-3.html new file mode 100644 index 0000000000..70f5ed05f6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-3.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.rgb-clamp-3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.rgb-clamp-3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Assumes colors are clamped to [0,255]. + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-3.worker.js new file mode 100644 index 0000000000..809d209348 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-3.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.rgb-clamp-3 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Assumes colors are clamped to [0,255]. + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(-2147483649, 4294967298, -18446744073709551619)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-4.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-4.html new file mode 100644 index 0000000000..1f387998e0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-4.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.rgb-clamp-4 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.rgb-clamp-4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Assumes colors are clamped to [0,255]. + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-4.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-4.worker.js new file mode 100644 index 0000000000..c0ec5ec921 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-4.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.rgb-clamp-4 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Assumes colors are clamped to [0,255]. + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(-1000000000000000000000000000000000000000, 1000000000000000000000000000000000000000, -1000000000000000000000000000000000000000)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-5.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-5.html new file mode 100644 index 0000000000..c2ac0b94d2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-5.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.rgb-clamp-5 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.rgb-clamp-5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Assumes colors are clamped to [0,255]. + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-5.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-5.worker.js new file mode 100644 index 0000000000..ac2692ec4b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-5.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.rgb-clamp-5 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Assumes colors are clamped to [0,255]. + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(-10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, -10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-eof.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-eof.html new file mode 100644 index 0000000000..2979d7da98 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-eof.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.rgb-eof + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.rgb-eof

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-eof.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-eof.worker.js new file mode 100644 index 0000000000..997df7b03f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-eof.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.rgb-eof +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0, 255, 0'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-num.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-num.html new file mode 100644 index 0000000000..67ba77f3e3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-num.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.rgb-num + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.rgb-num

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-num.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-num.worker.js new file mode 100644 index 0000000000..1d54b1f189 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-num.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.rgb-num +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0,255,0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-percent.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-percent.html new file mode 100644 index 0000000000..8fe3be55ed --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-percent.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.rgb-percent + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.rgb-percent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  CSS3 Color says "The integer value 255 corresponds to 100%". (In particular, it is not 254...) + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-percent.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-percent.worker.js new file mode 100644 index 0000000000..824376083e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-percent.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.rgb-percent +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  CSS3 Color says "The integer value 255 corresponds to 100%". (In particular, it is not 254...) + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0% ,100% ,0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-1.html new file mode 100644 index 0000000000..af3acb95e9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-1.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.rgba-clamp-1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.rgba-clamp-1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-1.worker.js new file mode 100644 index 0000000000..e3a5bf56ea --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-1.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.rgba-clamp-1 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0, 255, 0, -2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,0,0,0); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.html new file mode 100644 index 0000000000..32ee979894 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.rgba-clamp-2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.rgba-clamp-2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.worker.js new file mode 100644 index 0000000000..612c40b675 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.rgba-clamp-2 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0, 255, 0, 2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-eof.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-eof.html new file mode 100644 index 0000000000..baa42cde18 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-eof.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.rgba-eof + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.rgba-eof

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-eof.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-eof.worker.js new file mode 100644 index 0000000000..73e0b4fd43 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-eof.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.rgba-eof +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0, 255, 0, 1'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-1.html new file mode 100644 index 0000000000..eaa83e1801 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-1.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.rgba-num-1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.rgba-num-1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-1.worker.js new file mode 100644 index 0000000000..bb1a97fbe7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-1.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.rgba-num-1 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba( 0 , 255 , 0 , .499 )'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,127); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.html new file mode 100644 index 0000000000..47bf3ddced --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.rgba-num-2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.rgba-num-2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.worker.js new file mode 100644 index 0000000000..5629ca5cb2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.rgba-num-2 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba( 0 , 255 , 0 , 0.499 )'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,127); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.html new file mode 100644 index 0000000000..068befd9b4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.rgba-percent + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.rgba-percent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.worker.js new file mode 100644 index 0000000000..6d90415325 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.rgba-percent +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0%,100%,0%,0.499)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,127); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.html new file mode 100644 index 0000000000..0e58836e5d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.rgba-solid-1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.rgba-solid-1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.worker.js new file mode 100644 index 0000000000..cddedb7d59 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.rgba-solid-1 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba( 0 , 255 , 0 , 1 )'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-2.html new file mode 100644 index 0000000000..8da29eeffb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-2.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.rgba-solid-2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.rgba-solid-2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-2.worker.js new file mode 100644 index 0000000000..126cbb9269 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-2.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.rgba-solid-2 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba( 0 , 255 , 0 , 1.0 )'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.html new file mode 100644 index 0000000000..e67374c541 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.rgba-solid-3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.rgba-solid-3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.worker.js new file mode 100644 index 0000000000..d8d1513c90 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.rgba-solid-3 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba( 0 , 255 , 0 , +1 )'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-4.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-4.html new file mode 100644 index 0000000000..777aacea70 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-4.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.rgba-solid-4 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.rgba-solid-4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-4.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-4.worker.js new file mode 100644 index 0000000000..aa516a2d7f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-4.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.rgba-solid-4 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba( -0 , 255 , +0 , 1 )'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-1.html new file mode 100644 index 0000000000..8dc6844ae9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-1.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.svg-1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.svg-1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-1.worker.js new file mode 100644 index 0000000000..e8660caf6d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-1.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.svg-1 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'gray'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 128,128,128,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.html new file mode 100644 index 0000000000..2833565006 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.svg-2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.svg-2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.worker.js new file mode 100644 index 0000000000..3488200d86 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.svg-2 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'grey'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 128,128,128,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.system.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.system.html new file mode 100644 index 0000000000..6e124062b1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.system.html @@ -0,0 +1,29 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.system + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.system

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.system.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.system.worker.js new file mode 100644 index 0000000000..cf62855af9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.system.worker.js @@ -0,0 +1,24 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.system +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'ThreeDDarkShadow'; + assert_regexp_match(ctx.fillStyle, /^#(?!(FF0000|ff0000|f00)$)/); // test that it's not red + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.html new file mode 100644 index 0000000000..a595d70bc0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.transparent-1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.transparent-1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.worker.js new file mode 100644 index 0000000000..7f9a975bc1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.transparent-1 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'transparent'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,0,0,0); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.html new file mode 100644 index 0000000000..0f2a7e0609 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.fillStyle.parse.transparent-2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.parse.transparent-2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.worker.js new file mode 100644 index 0000000000..794ca926dd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.parse.transparent-2 +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'TrAnSpArEnT'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,0,0,0); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.toStringFunctionCallback.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.toStringFunctionCallback.html new file mode 100644 index 0000000000..3e56bd2b62 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.toStringFunctionCallback.html @@ -0,0 +1,40 @@ + + +OffscreenCanvas test: 2d.fillStyle.toStringFunctionCallback + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.fillStyle.toStringFunctionCallback

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Passing a function in to ctx.fillStyle or ctx.strokeStyle with a toString callback works as specified

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.toStringFunctionCallback.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.toStringFunctionCallback.worker.js new file mode 100644 index 0000000000..3ae93092b8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.toStringFunctionCallback.worker.js @@ -0,0 +1,35 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.fillStyle.toStringFunctionCallback +// Description:Passing a function in to ctx.fillStyle or ctx.strokeStyle with a toString callback works as specified +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Passing a function in to ctx.fillStyle or ctx.strokeStyle with a toString callback works as specified"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = { toString: function() { return "#008000"; } }; + _assertSame(ctx.fillStyle, "#008000", "ctx.fillStyle", "\"#008000\""); + ctx.fillStyle = {}; + _assertSame(ctx.fillStyle, "#008000", "ctx.fillStyle", "\"#008000\""); + ctx.fillStyle = 800000; + _assertSame(ctx.fillStyle, "#008000", "ctx.fillStyle", "\"#008000\""); + assert_throws_js(TypeError, function() { ctx.fillStyle = { toString: function() { throw new TypeError; } }; }); + ctx.strokeStyle = { toString: function() { return "#008000"; } }; + _assertSame(ctx.strokeStyle, "#008000", "ctx.strokeStyle", "\"#008000\""); + ctx.strokeStyle = {}; + _assertSame(ctx.strokeStyle, "#008000", "ctx.strokeStyle", "\"#008000\""); + ctx.strokeStyle = 800000; + _assertSame(ctx.strokeStyle, "#008000", "ctx.strokeStyle", "\"#008000\""); + assert_throws_js(TypeError, function() { ctx.strokeStyle = { toString: function() { throw new TypeError; } }; }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.invalid.inputs.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.invalid.inputs.html new file mode 100644 index 0000000000..5ccb19e09c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.invalid.inputs.html @@ -0,0 +1,45 @@ + + +OffscreenCanvas test: 2d.gradient.conic.invalid.inputs + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.conic.invalid.inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Conic gradient function with invalid inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.invalid.inputs.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.invalid.inputs.worker.js new file mode 100644 index 0000000000..19b603ea75 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.invalid.inputs.worker.js @@ -0,0 +1,40 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.conic.invalid.inputs +// Description:Conic gradient function with invalid inputs +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Conic gradient function with invalid inputs"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_js(TypeError, function() { ctx.createConicGradient(Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(-Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(NaN, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(0, -Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(0, NaN, 1); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(0, 0, -Infinity); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(0, 0, NaN); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(0, Infinity, Infinity); }); + + const g = ctx.createConicGradient(0, 0, 25); + assert_throws_js(TypeError, function() { g.addColorStop(-Infinity, '#f00'); }); + assert_throws_js(TypeError, function() { g.addColorStop(NaN, '#f00'); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, -Infinity); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, NaN); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.negative.rotation.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.negative.rotation.html new file mode 100644 index 0000000000..848f1496ea --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.negative.rotation.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.gradient.conic.negative.rotation + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.conic.negative.rotation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Conic gradient with negative rotation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.negative.rotation.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.negative.rotation.worker.js new file mode 100644 index 0000000000..1f9735ee08 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.negative.rotation.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.conic.negative.rotation +// Description:Conic gradient with negative rotation +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Conic gradient with negative rotation"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const g = ctx.createConicGradient(-Math.PI/2, 50, 25); + // It's red in the upper right region and green on the lower left region + g.addColorStop(0, "#f00"); + g.addColorStop(0.25, "#0f0"); + g.addColorStop(0.50, "#0f0"); + g.addColorStop(0.75, "#f00"); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 25,15, 255,0,0,255, 3); + _assertPixelApprox(canvas, 75,40, 0,255,0,255, 3); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.positive.rotation.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.positive.rotation.html new file mode 100644 index 0000000000..06b593904f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.positive.rotation.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.gradient.conic.positive.rotation + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.conic.positive.rotation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Conic gradient with positive rotation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.positive.rotation.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.positive.rotation.worker.js new file mode 100644 index 0000000000..45bbf40313 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.positive.rotation.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.conic.positive.rotation +// Description:Conic gradient with positive rotation +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Conic gradient with positive rotation"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const g = ctx.createConicGradient(3*Math.PI/2, 50, 25); + // It's red in the upper right region and green on the lower left region + g.addColorStop(0, "#f00"); + g.addColorStop(0.25, "#0f0"); + g.addColorStop(0.50, "#0f0"); + g.addColorStop(0.75, "#f00"); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 25,15, 255,0,0,255, 3); + _assertPixelApprox(canvas, 75,40, 0,255,0,255, 3); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.empty.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.empty.html new file mode 100644 index 0000000000..bad1ff4767 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.empty.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.gradient.empty + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.empty

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.empty.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.empty.worker.js new file mode 100644 index 0000000000..225de25823 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.empty.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.empty +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createLinearGradient(0, 0, 0, 50); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.alpha.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.alpha.html new file mode 100644 index 0000000000..525cb79e03 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.alpha.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.gradient.interpolate.alpha + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.interpolate.alpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.alpha.png b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.alpha.png new file mode 100644 index 0000000000..af5ac0f07d Binary files /dev/null and b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.alpha.png differ diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.alpha.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.alpha.worker.js new file mode 100644 index 0000000000..5c2f7e07b6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.alpha.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.interpolate.alpha +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#ff0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, 'rgba(0,0,255, 0)'); + g.addColorStop(1, 'rgba(0,0,255, 1)'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 25,25, 191,191,63,255, 3); + _assertPixelApprox(canvas, 50,25, 127,127,127,255, 3); + _assertPixelApprox(canvas, 75,25, 63,63,191,255, 3); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.color.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.color.html new file mode 100644 index 0000000000..c742eff2f9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.color.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.gradient.interpolate.color + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.interpolate.color

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.color.png b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.color.png new file mode 100644 index 0000000000..af5ac0f07d Binary files /dev/null and b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.color.png differ diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.color.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.color.worker.js new file mode 100644 index 0000000000..6d273b7b43 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.color.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.interpolate.color +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var g = ctx.createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, '#ff0'); + g.addColorStop(1, '#00f'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 25,25, 191,191,63,255, 3); + _assertPixelApprox(canvas, 50,25, 127,127,127,255, 3); + _assertPixelApprox(canvas, 75,25, 63,63,191,255, 3); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.html new file mode 100644 index 0000000000..00575c399a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.gradient.interpolate.coloralpha + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.interpolate.coloralpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.png b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.png new file mode 100644 index 0000000000..552e6ee44b Binary files /dev/null and b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.png differ diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.worker.js new file mode 100644 index 0000000000..1462cb59e2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.interpolate.coloralpha +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var g = ctx.createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, 'rgba(255,255,0, 0)'); + g.addColorStop(1, 'rgba(0,0,255, 1)'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 25,25, 190,190,65,65, 3); + _assertPixelApprox(canvas, 50,25, 126,126,128,128, 3); + _assertPixelApprox(canvas, 75,25, 62,62,192,192, 3); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.multiple.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.multiple.html new file mode 100644 index 0000000000..3f2594f2cb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.multiple.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.gradient.interpolate.multiple + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.interpolate.multiple

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.multiple.png b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.multiple.png new file mode 100644 index 0000000000..86122450d3 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.multiple.png differ diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.multiple.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.multiple.worker.js new file mode 100644 index 0000000000..ebfcddca9f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.multiple.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.interpolate.multiple +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = 200; + var g = ctx.createLinearGradient(0, 0, 200, 0); + g.addColorStop(0, '#ff0'); + g.addColorStop(0.5, '#0ff'); + g.addColorStop(1, '#f0f'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 200, 50); + _assertPixelApprox(canvas, 50,25, 127,255,127,255, 3); + _assertPixelApprox(canvas, 100,25, 0,255,255,255, 3); + _assertPixelApprox(canvas, 150,25, 127,127,255,255, 3); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.outside.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.outside.html new file mode 100644 index 0000000000..02ca008518 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.outside.html @@ -0,0 +1,38 @@ + + +OffscreenCanvas test: 2d.gradient.interpolate.outside + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.interpolate.outside

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.outside.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.outside.worker.js new file mode 100644 index 0000000000..d6c8961661 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.outside.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.interpolate.outside +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createLinearGradient(25, 0, 75, 0); + g.addColorStop(0.4, '#0f0'); + g.addColorStop(0.6, '#0f0'); + + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 20,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 80,25, 0,255,0,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap.html new file mode 100644 index 0000000000..0139da177a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap.html @@ -0,0 +1,52 @@ + + +OffscreenCanvas test: 2d.gradient.interpolate.overlap + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.interpolate.overlap

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap.png b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap.png new file mode 100644 index 0000000000..5c2bb964e0 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap.png differ diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap.worker.js new file mode 100644 index 0000000000..d404deab26 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap.worker.js @@ -0,0 +1,47 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.interpolate.overlap +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = 200; + var g = ctx.createLinearGradient(0, 0, 200, 0); + g.addColorStop(0, '#f00'); + g.addColorStop(0, '#ff0'); + g.addColorStop(0.25, '#00f'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.25, '#ff0'); + g.addColorStop(0.5, '#00f'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.75, '#00f'); + g.addColorStop(0.75, '#f00'); + g.addColorStop(0.75, '#ff0'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.5, '#ff0'); + g.addColorStop(1, '#00f'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 200, 50); + _assertPixelApprox(canvas, 49,25, 0,0,255,255, 16); + _assertPixelApprox(canvas, 51,25, 255,255,0,255, 16); + _assertPixelApprox(canvas, 99,25, 0,0,255,255, 16); + _assertPixelApprox(canvas, 101,25, 255,255,0,255, 16); + _assertPixelApprox(canvas, 149,25, 0,0,255,255, 16); + _assertPixelApprox(canvas, 151,25, 255,255,0,255, 16); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap2.html new file mode 100644 index 0000000000..c26c8ecb78 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap2.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.gradient.interpolate.overlap2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.interpolate.overlap2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap2.worker.js new file mode 100644 index 0000000000..3938081cef --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap2.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.interpolate.overlap2 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var g = ctx.createLinearGradient(0, 0, 100, 0); + var ps = [ 0, 1/10, 1/4, 1/3, 1/2, 3/4, 1 ]; + for (var p = 0; p < ps.length; ++p) + { + g.addColorStop(ps[p], '#0f0'); + for (var i = 0; i < 15; ++i) + g.addColorStop(ps[p], '#f00'); + g.addColorStop(ps[p], '#0f0'); + } + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 30,25, 0,255,0,255); + _assertPixel(canvas, 40,25, 0,255,0,255); + _assertPixel(canvas, 60,25, 0,255,0,255); + _assertPixel(canvas, 80,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.solid.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.solid.html new file mode 100644 index 0000000000..dd369ae5e3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.solid.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.gradient.interpolate.solid + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.interpolate.solid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.solid.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.solid.worker.js new file mode 100644 index 0000000000..387aab0ab7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.solid.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.interpolate.solid +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var g = ctx.createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.vertical.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.vertical.html new file mode 100644 index 0000000000..dff5708f05 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.vertical.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.gradient.interpolate.vertical + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.interpolate.vertical

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.vertical.png b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.vertical.png new file mode 100644 index 0000000000..37d6a00c62 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.vertical.png differ diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.vertical.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.vertical.worker.js new file mode 100644 index 0000000000..61cf9b6d8e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.vertical.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.interpolate.vertical +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var g = ctx.createLinearGradient(0, 0, 0, 50); + g.addColorStop(0, '#ff0'); + g.addColorStop(1, '#00f'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,12, 191,191,63,255, 10); + _assertPixelApprox(canvas, 50,25, 127,127,127,255, 5); + _assertPixelApprox(canvas, 50,37, 63,63,191,255, 10); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fill.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fill.html new file mode 100644 index 0000000000..27579fc829 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fill.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.gradient.interpolate.zerosize.fill + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.interpolate.zerosize.fill

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fill.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fill.worker.js new file mode 100644 index 0000000000..916b1cb977 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fill.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.interpolate.zerosize.fill +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.rect(0, 0, 100, 50); + ctx.fill(); + _assertPixel(canvas, 40,20, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillRect.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillRect.html new file mode 100644 index 0000000000..9cf2c7350f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillRect.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.gradient.interpolate.zerosize.fillRect + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.interpolate.zerosize.fillRect

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillRect.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillRect.worker.js new file mode 100644 index 0000000000..607ad85ae7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillRect.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.interpolate.zerosize.fillRect +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 40,20, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillText.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillText.html new file mode 100644 index 0000000000..59f0964461 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillText.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.gradient.interpolate.zerosize.fillText + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.interpolate.zerosize.fillText

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillText.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillText.worker.js new file mode 100644 index 0000000000..417b564e6d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillText.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.interpolate.zerosize.fillText +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.font = '100px sans-serif'; + ctx.fillText("AA", 0, 50); + _assertGreen(ctx, 100, 50); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.stroke.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.stroke.html new file mode 100644 index 0000000000..562f46796c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.stroke.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.gradient.interpolate.zerosize.stroke + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.interpolate.zerosize.stroke

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.stroke.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.stroke.worker.js new file mode 100644 index 0000000000..b969be6f85 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.stroke.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.interpolate.zerosize.stroke +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.strokeStyle = g; + ctx.rect(20, 20, 60, 10); + ctx.stroke(); + _assertPixel(canvas, 19,19, 0,255,0,255); + _assertPixel(canvas, 20,19, 0,255,0,255); + _assertPixel(canvas, 21,19, 0,255,0,255); + _assertPixel(canvas, 19,20, 0,255,0,255); + _assertPixel(canvas, 20,20, 0,255,0,255); + _assertPixel(canvas, 21,20, 0,255,0,255); + _assertPixel(canvas, 19,21, 0,255,0,255); + _assertPixel(canvas, 20,21, 0,255,0,255); + _assertPixel(canvas, 21,21, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeRect.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeRect.html new file mode 100644 index 0000000000..de1e57bbcc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeRect.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.gradient.interpolate.zerosize.strokeRect + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.interpolate.zerosize.strokeRect

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeRect.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeRect.worker.js new file mode 100644 index 0000000000..b9884d4adf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeRect.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.interpolate.zerosize.strokeRect +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.strokeStyle = g; + ctx.strokeRect(20, 20, 60, 10); + _assertPixel(canvas, 19,19, 0,255,0,255); + _assertPixel(canvas, 20,19, 0,255,0,255); + _assertPixel(canvas, 21,19, 0,255,0,255); + _assertPixel(canvas, 19,20, 0,255,0,255); + _assertPixel(canvas, 20,20, 0,255,0,255); + _assertPixel(canvas, 21,20, 0,255,0,255); + _assertPixel(canvas, 19,21, 0,255,0,255); + _assertPixel(canvas, 20,21, 0,255,0,255); + _assertPixel(canvas, 21,21, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeText.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeText.html new file mode 100644 index 0000000000..153ec102ac --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeText.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.gradient.interpolate.zerosize.strokeText + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.interpolate.zerosize.strokeText

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeText.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeText.worker.js new file mode 100644 index 0000000000..f0d7192627 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeText.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.interpolate.zerosize.strokeText +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.strokeStyle = g; + ctx.font = '100px sans-serif'; + ctx.strokeText("AA", 0, 50); + _assertGreen(ctx, 100, 50); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.nonfinite.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.nonfinite.html new file mode 100644 index 0000000000..6c8f8ec38a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.nonfinite.html @@ -0,0 +1,49 @@ + + +OffscreenCanvas test: 2d.gradient.linear.nonfinite + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.linear.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  createLinearGradient() throws TypeError if arguments are not finite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in "Web IDL" (draft) + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.nonfinite.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.nonfinite.worker.js new file mode 100644 index 0000000000..9fd4949d7d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.nonfinite.worker.js @@ -0,0 +1,44 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.linear.nonfinite +// Description:createLinearGradient() throws TypeError if arguments are not finite +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in "Web IDL" (draft) + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("createLinearGradient() throws TypeError if arguments are not finite"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, 0, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(-Infinity, 0, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(NaN, 0, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, Infinity, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, -Infinity, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, NaN, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, Infinity, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, -Infinity, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, NaN, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1, -Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1, NaN); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, Infinity, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, Infinity, Infinity, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, Infinity, 1, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, 0, Infinity, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, 0, 1, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, Infinity, Infinity, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, Infinity, 1, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, Infinity, Infinity); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.1.html new file mode 100644 index 0000000000..69fc52cedd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.1.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.gradient.linear.transform.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.linear.transform.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Linear gradient coordinates are relative to the coordinate space at the time of filling

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.1.worker.js new file mode 100644 index 0000000000..79cdc96da8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.1.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.linear.transform.1 +// Description:Linear gradient coordinates are relative to the coordinate space at the time of filling +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Linear gradient coordinates are relative to the coordinate space at the time of filling"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var g = ctx.createLinearGradient(0, 0, 200, 0); + g.addColorStop(0, '#f00'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.75, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.translate(-50, 0); + ctx.fillRect(50, 0, 100, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.2.html new file mode 100644 index 0000000000..5cf27f1d8e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.2.html @@ -0,0 +1,38 @@ + + +OffscreenCanvas test: 2d.gradient.linear.transform.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.linear.transform.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Linear gradient coordinates are relative to the coordinate space at the time of filling

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.2.worker.js new file mode 100644 index 0000000000..a2b532d1f9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.2.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.linear.transform.2 +// Description:Linear gradient coordinates are relative to the coordinate space at the time of filling +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Linear gradient coordinates are relative to the coordinate space at the time of filling"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.translate(100, 0); + var g = ctx.createLinearGradient(0, 0, 200, 0); + g.addColorStop(0, '#f00'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.75, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.translate(-150, 0); + ctx.fillRect(50, 0, 100, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.3.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.3.html new file mode 100644 index 0000000000..074722a49b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.3.html @@ -0,0 +1,38 @@ + + +OffscreenCanvas test: 2d.gradient.linear.transform.3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.linear.transform.3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Linear gradient transforms do not experience broken caching effects

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.3.worker.js new file mode 100644 index 0000000000..77df9495c3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.3.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.linear.transform.3 +// Description:Linear gradient transforms do not experience broken caching effects +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Linear gradient transforms do not experience broken caching effects"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var g = ctx.createLinearGradient(0, 0, 200, 0); + g.addColorStop(0, '#f00'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.75, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + ctx.translate(-50, 0); + ctx.fillRect(50, 0, 100, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.compare.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.compare.html new file mode 100644 index 0000000000..d923a2f552 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.compare.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.gradient.object.compare + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.object.compare

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.compare.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.compare.worker.js new file mode 100644 index 0000000000..f6d45d259f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.compare.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.object.compare +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var g1 = ctx.createLinearGradient(0, 0, 100, 0); + var g2 = ctx.createLinearGradient(0, 0, 100, 0); + _assertDifferent(g1, g2, "g1", "g2"); + ctx.fillStyle = g1; + _assertSame(ctx.fillStyle, g1, "ctx.fillStyle", "g1"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.crosscanvas.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.crosscanvas.html new file mode 100644 index 0000000000..6d229ea3d5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.crosscanvas.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.gradient.object.crosscanvas + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.object.crosscanvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.crosscanvas.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.crosscanvas.worker.js new file mode 100644 index 0000000000..1afebdea1b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.crosscanvas.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.object.crosscanvas +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var g = new OffscreenCanvas(100, 50).getContext('2d').createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidcolor.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidcolor.html new file mode 100644 index 0000000000..3db5afeeb5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidcolor.html @@ -0,0 +1,41 @@ + + +OffscreenCanvas test: 2d.gradient.object.invalidcolor + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.object.invalidcolor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidcolor.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidcolor.worker.js new file mode 100644 index 0000000000..33b524fbed --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidcolor.worker.js @@ -0,0 +1,36 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.object.invalidcolor +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var g = ctx.createLinearGradient(0, 0, 100, 0); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, ""); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, 'rgb(NaN%, NaN%, NaN%)'); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, 'null'); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, 'undefined'); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, null); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, undefined); }); + + var g = ctx.createRadialGradient(0, 0, 0, 100, 0, 0); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, ""); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, 'rgb(NaN%, NaN%, NaN%)'); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, 'null'); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, 'undefined'); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, null); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, undefined); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidoffset.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidoffset.html new file mode 100644 index 0000000000..b9f1104254 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidoffset.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.gradient.object.invalidoffset + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.object.invalidoffset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidoffset.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidoffset.worker.js new file mode 100644 index 0000000000..80be64235b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidoffset.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.object.invalidoffset +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var g = ctx.createLinearGradient(0, 0, 100, 0); + assert_throws_dom("INDEX_SIZE_ERR", function() { g.addColorStop(-1, '#000'); }); + assert_throws_dom("INDEX_SIZE_ERR", function() { g.addColorStop(2, '#000'); }); + assert_throws_js(TypeError, function() { g.addColorStop(Infinity, '#000'); }); + assert_throws_js(TypeError, function() { g.addColorStop(-Infinity, '#000'); }); + assert_throws_js(TypeError, function() { g.addColorStop(NaN, '#000'); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.return.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.return.html new file mode 100644 index 0000000000..779b941d20 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.return.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.gradient.object.return + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.object.return

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  createLinearGradient() and createRadialGradient() returns objects implementing CanvasGradient

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.return.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.return.worker.js new file mode 100644 index 0000000000..a279eed4f3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.return.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.object.return +// Description:createLinearGradient() and createRadialGradient() returns objects implementing CanvasGradient +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("createLinearGradient() and createRadialGradient() returns objects implementing CanvasGradient"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + self.CanvasGradient.prototype.thisImplementsCanvasGradient = true; + + var g1 = ctx.createLinearGradient(0, 0, 100, 0); + _assertDifferent(g1.addColorStop, undefined, "g1.addColorStop", "undefined"); + _assertSame(g1.thisImplementsCanvasGradient, true, "g1.thisImplementsCanvasGradient", "true"); + + var g2 = ctx.createRadialGradient(0, 0, 10, 0, 0, 20); + _assertDifferent(g2.addColorStop, undefined, "g2.addColorStop", "undefined"); + _assertSame(g2.thisImplementsCanvasGradient, true, "g2.thisImplementsCanvasGradient", "true"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.type.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.type.html new file mode 100644 index 0000000000..aa72183ca5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.type.html @@ -0,0 +1,28 @@ + + +OffscreenCanvas test: 2d.gradient.object.type + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.object.type

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  window.CanvasGradient exists and has the right properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in "Web IDL" (draft) + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.type.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.type.worker.js new file mode 100644 index 0000000000..e0101dfca4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.type.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.object.type +// Description:window.CanvasGradient exists and has the right properties +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in "Web IDL" (draft) + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("window.CanvasGradient exists and has the right properties"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertDifferent(self.CanvasGradient, undefined, "self.CanvasGradient", "undefined"); + _assertDifferent(self.CanvasGradient.prototype.addColorStop, undefined, "self.CanvasGradient.prototype.addColorStop", "undefined"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.update.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.update.html new file mode 100644 index 0000000000..00c60041e7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.update.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.gradient.object.update + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.object.update

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.update.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.update.worker.js new file mode 100644 index 0000000000..db79ebfa2f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.update.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.object.update +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var g = ctx.createLinearGradient(-100, 0, 200, 0); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + g.addColorStop(0.1, '#0f0'); + g.addColorStop(0.9, '#0f0'); + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.behind.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.behind.html new file mode 100644 index 0000000000..c270a75175 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.behind.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.gradient.radial.cone.behind + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.radial.cone.behind

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.behind.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.behind.worker.js new file mode 100644 index 0000000000..07ea409ad8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.behind.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.radial.cone.behind +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(120, 25, 10, 211, 25, 100); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixelApprox(canvas, 98,25, 0,255,0,255, 1); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixelApprox(canvas, 50,48, 0,255,0,255, 1); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.beside.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.beside.html new file mode 100644 index 0000000000..89d8757bde --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.beside.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.gradient.radial.cone.beside + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.radial.cone.beside

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.beside.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.beside.worker.js new file mode 100644 index 0000000000..686721cbc6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.beside.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.radial.cone.beside +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(0, 100, 40, 100, 100, 50); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixelApprox(canvas, 98,25, 0,255,0,255, 1); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixelApprox(canvas, 50,48, 0,255,0,255, 1); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.bottom.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.bottom.html new file mode 100644 index 0000000000..cda6743f66 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.bottom.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.gradient.radial.cone.bottom + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.radial.cone.bottom

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.bottom.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.bottom.worker.js new file mode 100644 index 0000000000..c96b9c59f2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.bottom.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.radial.cone.bottom +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(210, 25, 100, 230, 25, 101); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixelApprox(canvas, 98,25, 0,255,0,255, 1); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixelApprox(canvas, 50,48, 0,255,0,255, 1); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.cylinder.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.cylinder.html new file mode 100644 index 0000000000..a6f1d67619 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.cylinder.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.gradient.radial.cone.cylinder + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.radial.cone.cylinder

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.cylinder.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.cylinder.worker.js new file mode 100644 index 0000000000..22e6cb49ce --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.cylinder.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.radial.cone.cylinder +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(210, 25, 100, 230, 25, 100); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixelApprox(canvas, 98,25, 0,255,0,255, 1); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixelApprox(canvas, 50,48, 0,255,0,255, 1); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.front.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.front.html new file mode 100644 index 0000000000..5cda039e94 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.front.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.gradient.radial.cone.front + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.radial.cone.front

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.front.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.front.worker.js new file mode 100644 index 0000000000..c4e70f53c9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.front.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.radial.cone.front +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(311, 25, 10, 210, 25, 100); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixelApprox(canvas, 98,25, 0,255,0,255, 1); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixelApprox(canvas, 50,48, 0,255,0,255, 1); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape1.html new file mode 100644 index 0000000000..290923b5e5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape1.html @@ -0,0 +1,53 @@ + + +OffscreenCanvas test: 2d.gradient.radial.cone.shape1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.radial.cone.shape1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape1.worker.js new file mode 100644 index 0000000000..d03c0db23c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape1.worker.js @@ -0,0 +1,48 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.radial.cone.shape1 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var tol = 1; // tolerance to avoid antialiasing artifacts + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(30+tol, 40); + ctx.lineTo(110, -20+tol); + ctx.lineTo(110, 100-tol); + ctx.fill(); + + var g = ctx.createRadialGradient(30+10*5/2, 40, 10*3/2, 30+10*15/4, 40, 10*9/4); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixelApprox(canvas, 98,25, 0,255,0,255, 1); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixelApprox(canvas, 50,48, 0,255,0,255, 1); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape2.html new file mode 100644 index 0000000000..edf1909ac1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape2.html @@ -0,0 +1,53 @@ + + +OffscreenCanvas test: 2d.gradient.radial.cone.shape2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.radial.cone.shape2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape2.worker.js new file mode 100644 index 0000000000..8788954a3c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape2.worker.js @@ -0,0 +1,48 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.radial.cone.shape2 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var tol = 1; // tolerance to avoid antialiasing artifacts + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(30+10*5/2, 40, 10*3/2, 30+10*15/4, 40, 10*9/4); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(30-tol, 40); + ctx.lineTo(110, -20-tol); + ctx.lineTo(110, 100+tol); + ctx.fill(); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixelApprox(canvas, 98,25, 0,255,0,255, 1); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixelApprox(canvas, 50,48, 0,255,0,255, 1); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.top.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.top.html new file mode 100644 index 0000000000..9487c8c931 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.top.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.gradient.radial.cone.top + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.radial.cone.top

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.top.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.top.worker.js new file mode 100644 index 0000000000..6fc834373a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.top.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.radial.cone.top +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(230, 25, 100, 100, 25, 101); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixelApprox(canvas, 98,25, 0,255,0,255, 1); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixelApprox(canvas, 50,48, 0,255,0,255, 1); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.equal.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.equal.html new file mode 100644 index 0000000000..b14b44fe30 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.equal.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.gradient.radial.equal + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.radial.equal

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.equal.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.equal.worker.js new file mode 100644 index 0000000000..c8e6095805 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.equal.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.radial.equal +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(50, 25, 20, 50, 25, 20); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixelApprox(canvas, 98,25, 0,255,0,255, 1); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixelApprox(canvas, 50,48, 0,255,0,255, 1); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside1.html new file mode 100644 index 0000000000..a55f0a1104 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside1.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.gradient.radial.inside1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.radial.inside1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside1.worker.js new file mode 100644 index 0000000000..5da290a7ce --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside1.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.radial.inside1 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(50, 25, 100, 50, 25, 200); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixelApprox(canvas, 98,25, 0,255,0,255, 1); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixelApprox(canvas, 50,48, 0,255,0,255, 1); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside2.html new file mode 100644 index 0000000000..3a7af0658b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside2.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.gradient.radial.inside2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.radial.inside2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside2.worker.js new file mode 100644 index 0000000000..dd49fa3771 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside2.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.radial.inside2 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(50, 25, 200, 50, 25, 100); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixelApprox(canvas, 98,25, 0,255,0,255, 1); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixelApprox(canvas, 50,48, 0,255,0,255, 1); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside3.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside3.html new file mode 100644 index 0000000000..3a539e6b63 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside3.html @@ -0,0 +1,45 @@ + + +OffscreenCanvas test: 2d.gradient.radial.inside3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.radial.inside3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside3.worker.js new file mode 100644 index 0000000000..0d05bf4d5b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside3.worker.js @@ -0,0 +1,40 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.radial.inside3 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(50, 25, 200, 50, 25, 100); + g.addColorStop(0, '#f00'); + g.addColorStop(0.993, '#f00'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixelApprox(canvas, 98,25, 0,255,0,255, 1); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixelApprox(canvas, 50,48, 0,255,0,255, 1); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.negative.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.negative.html new file mode 100644 index 0000000000..b6dcaf175e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.negative.html @@ -0,0 +1,29 @@ + + +OffscreenCanvas test: 2d.gradient.radial.negative + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.radial.negative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  createRadialGradient() throws INDEX_SIZE_ERR if either radius is negative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.negative.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.negative.worker.js new file mode 100644 index 0000000000..72ad3f803e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.negative.worker.js @@ -0,0 +1,24 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.radial.negative +// Description:createRadialGradient() throws INDEX_SIZE_ERR if either radius is negative +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("createRadialGradient() throws INDEX_SIZE_ERR if either radius is negative"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createRadialGradient(0, 0, -0.1, 0, 0, 1); }); + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createRadialGradient(0, 0, 1, 0, 0, -0.1); }); + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createRadialGradient(0, 0, -0.1, 0, 0, -0.1); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.nonfinite.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.nonfinite.html new file mode 100644 index 0000000000..4f068bbda5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.nonfinite.html @@ -0,0 +1,101 @@ + + +OffscreenCanvas test: 2d.gradient.radial.nonfinite + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.radial.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  createRadialGradient() throws TypeError if arguments are not finite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in "Web IDL" (draft) + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.nonfinite.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.nonfinite.worker.js new file mode 100644 index 0000000000..641a341ecc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.nonfinite.worker.js @@ -0,0 +1,96 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.radial.nonfinite +// Description:createRadialGradient() throws TypeError if arguments are not finite +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in "Web IDL" (draft) + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("createRadialGradient() throws TypeError if arguments are not finite"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(-Infinity, 0, 1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(NaN, 0, 1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, -Infinity, 1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, NaN, 1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, -Infinity, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, NaN, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, -Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, NaN, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, -Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, NaN, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0, -Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0, NaN); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, Infinity, Infinity); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside1.html new file mode 100644 index 0000000000..2643c67170 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside1.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.gradient.radial.outside1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.radial.outside1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside1.worker.js new file mode 100644 index 0000000000..52d45093ba --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside1.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.radial.outside1 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(200, 25, 10, 200, 25, 20); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixelApprox(canvas, 98,25, 0,255,0,255, 1); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixelApprox(canvas, 50,48, 0,255,0,255, 1); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside2.html new file mode 100644 index 0000000000..423de4491d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside2.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.gradient.radial.outside2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.radial.outside2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside2.worker.js new file mode 100644 index 0000000000..861dcccbe3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside2.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.radial.outside2 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(200, 25, 20, 200, 25, 10); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixelApprox(canvas, 98,25, 0,255,0,255, 1); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixelApprox(canvas, 50,48, 0,255,0,255, 1); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside3.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside3.html new file mode 100644 index 0000000000..61df3dccfe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside3.html @@ -0,0 +1,45 @@ + + +OffscreenCanvas test: 2d.gradient.radial.outside3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.radial.outside3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside3.worker.js new file mode 100644 index 0000000000..db65ea1b8b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside3.worker.js @@ -0,0 +1,40 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.radial.outside3 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(200, 25, 20, 200, 25, 10); + g.addColorStop(0, '#0f0'); + g.addColorStop(0.001, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixelApprox(canvas, 98,25, 0,255,0,255, 1); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixelApprox(canvas, 50,48, 0,255,0,255, 1); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch1.html new file mode 100644 index 0000000000..86e2af1428 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch1.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.gradient.radial.touch1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.radial.touch1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch1.worker.js new file mode 100644 index 0000000000..dd8d727209 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch1.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.radial.touch1 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(150, 25, 50, 200, 25, 100); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixelApprox(canvas, 98,25, 0,255,0,255, 1); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixelApprox(canvas, 50,48, 0,255,0,255, 1); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch2.html new file mode 100644 index 0000000000..b0ff86ad05 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch2.html @@ -0,0 +1,46 @@ + + +OffscreenCanvas test: 2d.gradient.radial.touch2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.radial.touch2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch2.worker.js new file mode 100644 index 0000000000..ad6bc9d897 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch2.worker.js @@ -0,0 +1,41 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.radial.touch2 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(-80, 25, 70, 0, 25, 150); + g.addColorStop(0, '#f00'); + g.addColorStop(0.01, '#0f0'); + g.addColorStop(0.99, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixelApprox(canvas, 98,25, 0,255,0,255, 1); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixelApprox(canvas, 50,48, 0,255,0,255, 1); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch3.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch3.html new file mode 100644 index 0000000000..5e085fd998 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch3.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.gradient.radial.touch3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.radial.touch3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch3.worker.js new file mode 100644 index 0000000000..540e9a7ed4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch3.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.radial.touch3 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(120, -15, 25, 140, -30, 50); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixelApprox(canvas, 98,25, 0,255,0,255, 1); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixelApprox(canvas, 50,48, 0,255,0,255, 1); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.1.html new file mode 100644 index 0000000000..517c9e3288 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.1.html @@ -0,0 +1,38 @@ + + +OffscreenCanvas test: 2d.gradient.radial.transform.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.radial.transform.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Radial gradient coordinates are relative to the coordinate space at the time of filling

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.1.worker.js new file mode 100644 index 0000000000..198dab1fce --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.1.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.radial.transform.1 +// Description:Radial gradient coordinates are relative to the coordinate space at the time of filling +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Radial gradient coordinates are relative to the coordinate space at the time of filling"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2); + g.addColorStop(0, '#0f0'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.51, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.translate(50, 25); + ctx.scale(10, 10); + ctx.fillRect(-5, -2.5, 10, 5); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.2.html new file mode 100644 index 0000000000..f7f4120a92 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.2.html @@ -0,0 +1,39 @@ + + +OffscreenCanvas test: 2d.gradient.radial.transform.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.radial.transform.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Radial gradient coordinates are relative to the coordinate space at the time of filling

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.2.worker.js new file mode 100644 index 0000000000..27793b90ab --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.2.worker.js @@ -0,0 +1,34 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.radial.transform.2 +// Description:Radial gradient coordinates are relative to the coordinate space at the time of filling +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Radial gradient coordinates are relative to the coordinate space at the time of filling"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.translate(100, 0); + var g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2); + g.addColorStop(0, '#0f0'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.51, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.translate(-50, 25); + ctx.scale(10, 10); + ctx.fillRect(-5, -2.5, 10, 5); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.3.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.3.html new file mode 100644 index 0000000000..e0ac17fa82 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.3.html @@ -0,0 +1,39 @@ + + +OffscreenCanvas test: 2d.gradient.radial.transform.3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.gradient.radial.transform.3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Radial gradient transforms do not experience broken caching effects

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.3.worker.js new file mode 100644 index 0000000000..1b74d8b4d7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.3.worker.js @@ -0,0 +1,34 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.gradient.radial.transform.3 +// Description:Radial gradient transforms do not experience broken caching effects +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Radial gradient transforms do not experience broken caching effects"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2); + g.addColorStop(0, '#0f0'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.51, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + ctx.translate(50, 25); + ctx.scale(10, 10); + ctx.fillRect(-5, -2.5, 10, 5); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.canvas.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.canvas.html new file mode 100644 index 0000000000..f82a259e43 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.canvas.html @@ -0,0 +1,47 @@ + + +OffscreenCanvas test: 2d.pattern.basic.canvas + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.basic.canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.canvas.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.canvas.worker.js new file mode 100644 index 0000000000..510723f009 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.canvas.worker.js @@ -0,0 +1,42 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.basic.canvas +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var canvas2 = new OffscreenCanvas(100, 50); + var ctx2 = canvas2.getContext('2d'); + ctx2.fillStyle = '#0f0'; + ctx2.fillRect(0, 0, 100, 50); + + var pattern = ctx.createPattern(canvas2, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,25, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 50,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.image.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.image.html new file mode 100644 index 0000000000..ab7b7bbeb5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.image.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.pattern.basic.image + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.basic.image

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.image.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.image.worker.js new file mode 100644 index 0000000000..14cfcbc993 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.image.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.basic.image +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var response = await fetch('/images/green.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + var pattern = ctx.createPattern(img, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.nocontext.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.nocontext.html new file mode 100644 index 0000000000..66e301a002 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.nocontext.html @@ -0,0 +1,39 @@ + + +OffscreenCanvas test: 2d.pattern.basic.nocontext + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.basic.nocontext

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.nocontext.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.nocontext.worker.js new file mode 100644 index 0000000000..f6c24c82ca --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.nocontext.worker.js @@ -0,0 +1,34 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.basic.nocontext +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var canvas2 = new OffscreenCanvas(100, 50); + var pattern = ctx.createPattern(canvas2, 'no-repeat'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.type.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.type.html new file mode 100644 index 0000000000..1edb4fd227 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.type.html @@ -0,0 +1,29 @@ + + +OffscreenCanvas test: 2d.pattern.basic.type + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.basic.type

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.type.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.type.worker.js new file mode 100644 index 0000000000..56a8a7d23c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.type.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.basic.type +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertDifferent(self.CanvasPattern, undefined, "self.CanvasPattern", "undefined"); + + self.CanvasPattern.prototype.thisImplementsCanvasPattern = true; + + var response = await fetch('/images/green.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + var pattern = ctx.createPattern(img, 'no-repeat'); + _assert(pattern.thisImplementsCanvasPattern, "pattern.thisImplementsCanvasPattern"); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.zerocanvas.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.zerocanvas.html new file mode 100644 index 0000000000..7100c8313f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.zerocanvas.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.pattern.basic.zerocanvas + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.basic.zerocanvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.zerocanvas.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.zerocanvas.worker.js new file mode 100644 index 0000000000..9bf487cf74 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.zerocanvas.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.basic.zerocanvas +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = 0; + canvas.height = 10; + _assertSame(canvas.width, 0, "canvas.width", "0"); + _assertSame(canvas.height, 10, "canvas.height", "10"); + assert_throws_dom("INVALID_STATE_ERR", function() { ctx.createPattern(canvas, 'repeat'); }); + + canvas.width = 10; + canvas.height = 0; + _assertSame(canvas.width, 10, "canvas.width", "10"); + _assertSame(canvas.height, 0, "canvas.height", "0"); + assert_throws_dom("INVALID_STATE_ERR", function() { ctx.createPattern(canvas, 'repeat'); }); + + canvas.width = 0; + canvas.height = 0; + _assertSame(canvas.width, 0, "canvas.width", "0"); + _assertSame(canvas.height, 0, "canvas.height", "0"); + assert_throws_dom("INVALID_STATE_ERR", function() { ctx.createPattern(canvas, 'repeat'); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.crosscanvas.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.crosscanvas.html new file mode 100644 index 0000000000..bdf89021bb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.crosscanvas.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.pattern.crosscanvas + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.crosscanvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.crosscanvas.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.crosscanvas.worker.js new file mode 100644 index 0000000000..d9004fc028 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.crosscanvas.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.crosscanvas +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var response = await fetch('/images/green.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + + var pattern = new OffscreenCanvas(100, 50).getContext('2d').createPattern(img, 'no-repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.null.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.null.html new file mode 100644 index 0000000000..fbec25862d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.null.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.pattern.image.null + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.image.null

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in "Web IDL" (draft) + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.null.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.null.worker.js new file mode 100644 index 0000000000..a68ddfdbd7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.null.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.image.null +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in "Web IDL" (draft) + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_js(TypeError, function() { ctx.createPattern(null, 'repeat'); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.string.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.string.html new file mode 100644 index 0000000000..ff7355d2a4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.string.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.pattern.image.string + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.image.string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in "Web IDL" (draft) + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.string.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.string.worker.js new file mode 100644 index 0000000000..dc53d82292 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.string.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.image.string +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in "Web IDL" (draft) + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_js(TypeError, function() { ctx.createPattern('../images/red.png', 'repeat'); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.undefined.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.undefined.html new file mode 100644 index 0000000000..845f823e7f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.undefined.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.pattern.image.undefined + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.image.undefined

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in "Web IDL" (draft) + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.undefined.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.undefined.worker.js new file mode 100644 index 0000000000..32f5749493 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.undefined.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.image.undefined +// Description: +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in "Web IDL" (draft) + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_js(TypeError, function() { ctx.createPattern(undefined, 'repeat'); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas1.html new file mode 100644 index 0000000000..ebeb92c7f5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas1.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.pattern.modify.canvas1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.modify.canvas1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas1.worker.js new file mode 100644 index 0000000000..8e4f9ed447 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas1.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.modify.canvas1 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var canvas2 = new OffscreenCanvas(100, 50); + var ctx2 = canvas2.getContext('2d'); + ctx2.fillStyle = '#0f0'; + ctx2.fillRect(0, 0, 100, 50); + + var pattern = ctx.createPattern(canvas2, 'no-repeat'); + + ctx2.fillStyle = '#f00'; + ctx2.fillRect(0, 0, 100, 50); + + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas2.html new file mode 100644 index 0000000000..042ebba3b7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas2.html @@ -0,0 +1,47 @@ + + +OffscreenCanvas test: 2d.pattern.modify.canvas2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.modify.canvas2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas2.worker.js new file mode 100644 index 0000000000..ed17db8127 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas2.worker.js @@ -0,0 +1,42 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.modify.canvas2 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var canvas2 = new OffscreenCanvas(100, 50); + var ctx2 = canvas2.getContext('2d'); + ctx2.fillStyle = '#0f0'; + ctx2.fillRect(0, 0, 100, 50); + + var pattern = ctx.createPattern(canvas2, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx2.fillStyle = '#f00'; + ctx2.fillRect(0, 0, 100, 50); + + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.html new file mode 100644 index 0000000000..8ab1c8eb40 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.pattern.paint.norepeat.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.paint.norepeat.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.worker.js new file mode 100644 index 0000000000..9ac4e1605c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.paint.norepeat.basic +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var response = await fetch('/images/green.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + var pattern = ctx.createPattern(img, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.html new file mode 100644 index 0000000000..4bdd356df7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.pattern.paint.norepeat.coord1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.paint.norepeat.coord1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.worker.js new file mode 100644 index 0000000000..6c4a1409b7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.paint.norepeat.coord1 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + + var response = await fetch('/images/green.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + var pattern = ctx.createPattern(img, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.translate(50, 0); + ctx.fillRect(-50, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html new file mode 100644 index 0000000000..b9164ec6a9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html @@ -0,0 +1,38 @@ + + +OffscreenCanvas test: 2d.pattern.paint.norepeat.coord2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.paint.norepeat.coord2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.worker.js new file mode 100644 index 0000000000..d2fdd86022 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.worker.js @@ -0,0 +1,34 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.paint.norepeat.coord2 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var response = await fetch('/images/green.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + var pattern = ctx.createPattern(img, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 50, 50); + + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + + ctx.fillStyle = pattern; + ctx.translate(50, 0); + ctx.fillRect(-50, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.html new file mode 100644 index 0000000000..e2983948c2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.html @@ -0,0 +1,38 @@ + + +OffscreenCanvas test: 2d.pattern.paint.norepeat.coord3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.paint.norepeat.coord3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.worker.js new file mode 100644 index 0000000000..584a5d6cfd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.worker.js @@ -0,0 +1,34 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.paint.norepeat.coord3 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var response = await fetch('/images/red.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + var pattern = ctx.createPattern(img, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.translate(50, 25); + ctx.fillRect(-50, -25, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 25); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.html new file mode 100644 index 0000000000..43a718d44a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.html @@ -0,0 +1,40 @@ + + +OffscreenCanvas test: 2d.pattern.paint.norepeat.outside + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.paint.norepeat.outside

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.worker.js new file mode 100644 index 0000000000..0b5fef95ce --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.worker.js @@ -0,0 +1,36 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.paint.norepeat.outside +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var response = await fetch('/images/red.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + var pattern = ctx.createPattern(img, 'no-repeat'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + ctx.fillRect(-100, 0, 100, 50); + ctx.fillRect(0, 50, 100, 50); + ctx.fillRect(100, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas.html new file mode 100644 index 0000000000..b63535c706 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas.html @@ -0,0 +1,46 @@ + + +OffscreenCanvas test: 2d.pattern.paint.orientation.canvas + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.paint.orientation.canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Canvas patterns do not get flipped when painted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas.worker.js new file mode 100644 index 0000000000..2fbe52af73 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas.worker.js @@ -0,0 +1,41 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.paint.orientation.canvas +// Description:Canvas patterns do not get flipped when painted +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Canvas patterns do not get flipped when painted"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var canvas2 = new OffscreenCanvas(100, 50); + var ctx2 = canvas2.getContext('2d'); + ctx2.fillStyle = '#f00'; + ctx2.fillRect(0, 0, 100, 25); + ctx2.fillStyle = '#0f0'; + ctx2.fillRect(0, 25, 100, 25); + + var pattern = ctx.createPattern(canvas2, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 25); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.image.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.image.html new file mode 100644 index 0000000000..0b3645981e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.image.html @@ -0,0 +1,40 @@ + + +OffscreenCanvas test: 2d.pattern.paint.orientation.image + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.paint.orientation.image

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Image patterns do not get flipped when painted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.image.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.image.worker.js new file mode 100644 index 0000000000..b303b2d813 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.image.worker.js @@ -0,0 +1,36 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.paint.orientation.image +// Description:Image patterns do not get flipped when painted +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var response = await fetch('/images/rrgg-256x256.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + var pattern = ctx.createPattern(img, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.save(); + ctx.translate(0, -103); + ctx.fillRect(0, 103, 100, 50); + ctx.restore(); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 25); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}, "Image patterns do not get flipped when painted"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.html new file mode 100644 index 0000000000..b6647f776e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.pattern.paint.repeat.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.paint.repeat.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.worker.js new file mode 100644 index 0000000000..37f4c04228 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.paint.repeat.basic +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var response = await fetch('/images/green-16x16.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + var pattern = ctx.createPattern(img, 'repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.html new file mode 100644 index 0000000000..54b24ac705 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.pattern.paint.repeat.coord1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.paint.repeat.coord1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.worker.js new file mode 100644 index 0000000000..efbd1c5846 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.paint.repeat.coord1 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var response = await fetch('/images/rgrg-256x256.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + var pattern = ctx.createPattern(img, 'repeat'); + ctx.fillStyle = pattern; + ctx.translate(-128, -78); + ctx.fillRect(128, 78, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html new file mode 100644 index 0000000000..a77ce2c696 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.pattern.paint.repeat.coord2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.paint.repeat.coord2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.worker.js new file mode 100644 index 0000000000..db707ecb0a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.paint.repeat.coord2 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var response = await fetch('/images/ggrr-256x256.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + var pattern = ctx.createPattern(img, 'repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.html new file mode 100644 index 0000000000..10f380fed3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.pattern.paint.repeat.coord3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.paint.repeat.coord3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.worker.js new file mode 100644 index 0000000000..e58cddccfe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.paint.repeat.coord3 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var response = await fetch('/images/rgrg-256x256.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + var pattern = ctx.createPattern(img, 'repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + ctx.translate(-128, -78); + ctx.fillRect(128, 78, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.html new file mode 100644 index 0000000000..6558e07c5b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.pattern.paint.repeat.outside + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.paint.repeat.outside

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.worker.js new file mode 100644 index 0000000000..4a173af0b4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.paint.repeat.outside +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var response = await fetch('/images/green-16x16.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + var pattern = ctx.createPattern(img, 'repeat'); + ctx.fillStyle = pattern; + ctx.translate(50, 25); + ctx.fillRect(-50, -25, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.html new file mode 100644 index 0000000000..494b72cfb9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.pattern.paint.repeatx.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.paint.repeatx.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.worker.js new file mode 100644 index 0000000000..e776f7a008 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.paint.repeatx.basic +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 16); + + var response = await fetch('/images/green-16x16.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + var pattern = ctx.createPattern(img, 'repeat-x'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.html new file mode 100644 index 0000000000..6caef0cb1f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.html @@ -0,0 +1,40 @@ + + +OffscreenCanvas test: 2d.pattern.paint.repeatx.coord1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.paint.repeatx.coord1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.worker.js new file mode 100644 index 0000000000..57c2102cc8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.worker.js @@ -0,0 +1,36 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.paint.repeatx.coord1 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var response = await fetch('/images/red-16x16.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + var pattern = ctx.createPattern(img, 'repeat-x'); + ctx.fillStyle = pattern; + ctx.translate(0, 16); + ctx.fillRect(0, -16, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 16); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 98,25, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.html new file mode 100644 index 0000000000..b3229c8d87 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.pattern.paint.repeatx.outside + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.paint.repeatx.outside

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.worker.js new file mode 100644 index 0000000000..e40f6aa207 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.paint.repeatx.outside +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var response = await fetch('/images/red-16x16.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + var pattern = ctx.createPattern(img, 'repeat-x'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 16); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.html new file mode 100644 index 0000000000..d88f3a0ab6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.pattern.paint.repeaty.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.paint.repeaty.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.worker.js new file mode 100644 index 0000000000..6a53b5dc4d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.paint.repeaty.basic +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 16, 50); + + var response = await fetch('/images/green-16x16.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + var pattern = ctx.createPattern(img, 'repeat-y'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.html new file mode 100644 index 0000000000..59bfeb2abf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.html @@ -0,0 +1,40 @@ + + +OffscreenCanvas test: 2d.pattern.paint.repeaty.coord1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.paint.repeaty.coord1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.worker.js new file mode 100644 index 0000000000..d59abb6e07 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.worker.js @@ -0,0 +1,36 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.paint.repeaty.coord1 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var response = await fetch('/images/red-16x16.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + var pattern = ctx.createPattern(img, 'repeat-y'); + ctx.fillStyle = pattern; + ctx.translate(48, 0); + ctx.fillRect(-48, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 16, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 50,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.html new file mode 100644 index 0000000000..ad2bd3383f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.pattern.paint.repeaty.outside + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.paint.repeaty.outside

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.worker.js new file mode 100644 index 0000000000..c4feba10ca --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.paint.repeaty.outside +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var response = await fetch('/images/red-16x16.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + var pattern = ctx.createPattern(img, 'repeat-y'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 16, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.case.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.case.html new file mode 100644 index 0000000000..377ae3edc4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.case.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.pattern.repeat.case + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.repeat.case

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.case.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.case.worker.js new file mode 100644 index 0000000000..8073f47ed0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.case.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.repeat.case +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, "Repeat"); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.empty.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.empty.html new file mode 100644 index 0000000000..c2197893d7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.empty.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.pattern.repeat.empty + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.repeat.empty

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.empty.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.empty.worker.js new file mode 100644 index 0000000000..5aefc0dab3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.empty.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.repeat.empty +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var response = await fetch('/images/green-1x1.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + var pattern = ctx.createPattern(img, ""); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 200, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.null.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.null.html new file mode 100644 index 0000000000..d79551a302 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.null.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.pattern.repeat.null + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.repeat.null

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.null.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.null.worker.js new file mode 100644 index 0000000000..6ab4da9f8e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.null.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.repeat.null +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assert(ctx.createPattern(canvas, null) != null, "ctx.createPattern(canvas, null) != null"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix.html new file mode 100644 index 0000000000..2f4a35dedf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.pattern.repeat.nullsuffix + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.repeat.nullsuffix

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix.worker.js new file mode 100644 index 0000000000..83e7c62fe5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.repeat.nullsuffix +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, "repeat\0"); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.undefined.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.undefined.html new file mode 100644 index 0000000000..8ddd231985 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.undefined.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.pattern.repeat.undefined + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.repeat.undefined

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.undefined.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.undefined.worker.js new file mode 100644 index 0000000000..f4f25ae5a2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.undefined.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.repeat.undefined +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, undefined); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognised.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognised.html new file mode 100644 index 0000000000..3a37b46ab7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognised.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.pattern.repeat.unrecognised + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.repeat.unrecognised

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognised.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognised.worker.js new file mode 100644 index 0000000000..3114dde21a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognised.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.repeat.unrecognised +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, "invalid"); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull.html new file mode 100644 index 0000000000..58fb005d70 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.pattern.repeat.unrecognisednull + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.repeat.unrecognisednull

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull.worker.js new file mode 100644 index 0000000000..c8d18511f4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.repeat.unrecognisednull +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, "null"); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.transform.identity.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.transform.identity.html new file mode 100644 index 0000000000..2d73296395 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.transform.identity.html @@ -0,0 +1,40 @@ + + +OffscreenCanvas test: 2d.pattern.transform.identity + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.transform.identity

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.transform.identity.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.transform.identity.worker.js new file mode 100644 index 0000000000..a33c771346 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.transform.identity.worker.js @@ -0,0 +1,35 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.transform.identity +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var canvas2 = new OffscreenCanvas(100, 50); + var pattern = ctx.createPattern(canvas2, 'no-repeat'); + pattern.setTransform(new DOMMatrix()); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.transform.infinity.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.transform.infinity.html new file mode 100644 index 0000000000..aa58ad119f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.transform.infinity.html @@ -0,0 +1,40 @@ + + +OffscreenCanvas test: 2d.pattern.transform.infinity + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.transform.infinity

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.transform.infinity.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.transform.infinity.worker.js new file mode 100644 index 0000000000..999739b848 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.transform.infinity.worker.js @@ -0,0 +1,35 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.transform.infinity +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var canvas2 = new OffscreenCanvas(100, 50); + var pattern = ctx.createPattern(canvas2, 'no-repeat'); + pattern.setTransform({a: Infinity}); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.transform.invalid.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.transform.invalid.html new file mode 100644 index 0000000000..f2420d4a2b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.transform.invalid.html @@ -0,0 +1,29 @@ + + +OffscreenCanvas test: 2d.pattern.transform.invalid + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.pattern.transform.invalid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.transform.invalid.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.transform.invalid.worker.js new file mode 100644 index 0000000000..163951807f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.transform.invalid.worker.js @@ -0,0 +1,24 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.pattern.transform.invalid +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var canvas2 = new OffscreenCanvas(100, 50); + var pattern = ctx.createPattern(canvas2, 'no-repeat'); + assert_throws_js(TypeError, function() { pattern.setTransform({a: 1, m11: 2}); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.strokeStyle.colormix.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.strokeStyle.colormix.html new file mode 100644 index 0000000000..eba026619a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.strokeStyle.colormix.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.strokeStyle.colormix + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.strokeStyle.colormix

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  color-mix works as color input

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.strokeStyle.default.html b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.strokeStyle.default.html new file mode 100644 index 0000000000..cd7e424374 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.strokeStyle.default.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.strokeStyle.default + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.strokeStyle.default

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.strokeStyle.default.worker.js b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.strokeStyle.default.worker.js new file mode 100644 index 0000000000..9e0ac8be3e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.strokeStyle.default.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.strokeStyle.default +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.strokeStyle, '#000000', "ctx.strokeStyle", "'#000000'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.html new file mode 100644 index 0000000000..d8f14529c5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.filter.canvasFilterObject.blur.exceptions.tentative + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.blur.exceptions.tentative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test exceptions on CanvasFilter() blur.object

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.worker.js b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.worker.js new file mode 100644 index 0000000000..9b3fb3c04c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.filter.canvasFilterObject.blur.exceptions.tentative +// Description:Test exceptions on CanvasFilter() blur.object +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Test exceptions on CanvasFilter() blur.object"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({name: 'gaussianBlur'}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({name: 'gaussianBlur', stdDeviation: undefined}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({name: 'gaussianBlur', stdDeviation: 'foo'}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({name: 'gaussianBlur', stdDeviation: [1,2,3]}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({name: 'gaussianBlur', stdDeviation: NaN}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({name: 'gaussianBlur', stdDeviation: {}}); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.html new file mode 100644 index 0000000000..242094d9f9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.html @@ -0,0 +1,69 @@ + + +OffscreenCanvas test: 2d.filter.canvasFilterObject.colorMatrix.tentative + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.colorMatrix.tentative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test the functionality of ColorMatrix filters in CanvasFilter objects

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.worker.js b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.worker.js new file mode 100644 index 0000000000..d214e1d836 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.worker.js @@ -0,0 +1,64 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.filter.canvasFilterObject.colorMatrix.tentative +// Description:Test the functionality of ColorMatrix filters in CanvasFilter objects +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Test the functionality of ColorMatrix filters in CanvasFilter objects"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'colorMatrix', values: undefined}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'colorMatrix', values: 'foo'}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'colorMatrix', values: null}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'colorMatrix', values: [1, 2, 3]}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'colorMatrix', values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 'a']}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'colorMatrix', values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, Infinity]}); }); + ctx.fillStyle = '#f00'; + ctx.filter = new CanvasFilter({name: 'colorMatrix', type: 'hueRotate', values: 0}); + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 10,10, 255,0,0,255, 2); + ctx.filter = new CanvasFilter({name: 'colorMatrix', type: 'hueRotate', values: 90}); + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 10,10, 0,91,0,255, 2); + ctx.filter = new CanvasFilter({name: 'colorMatrix', type: 'hueRotate', values: 180}); + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 10,10, 0,109,109,255, 2); + ctx.filter = new CanvasFilter({name: 'colorMatrix', type: 'hueRotate', values: 270}); + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 10,10, 109,18,255,255, 2); + ctx.filter = new CanvasFilter({name: 'colorMatrix', type: 'saturate', values: 0.5}); + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 10,10, 155,27,27,255, 2); + ctx.clearRect(0, 0, 100, 50); + ctx.filter = new CanvasFilter({name: 'colorMatrix', type: 'luminanceToAlpha'}); + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 10,10, 0,0,0,54, 2); + ctx.filter = new CanvasFilter({name: 'colorMatrix', values: [ + 0, 0, 0, 0, 0, + 1, 1, 1, 1, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 1, 0 + ]}); + ctx.fillRect(0, 0, 50, 25); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 25); + ctx.fillStyle = '#00f'; + ctx.fillRect(0, 25, 50, 25); + ctx.fillStyle = '#fff'; + ctx.fillRect(50, 25, 50, 25); + _assertPixelApprox(canvas, 10,10, 0,255,0,255, 2); + _assertPixelApprox(canvas, 60,10, 0,255,0,255, 2); + _assertPixelApprox(canvas, 10,30, 0,255,0,255, 2); + _assertPixelApprox(canvas, 60,30, 0,255,0,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html new file mode 100644 index 0000000000..ff1de6bc9c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html @@ -0,0 +1,67 @@ + + +OffscreenCanvas test: 2d.filter.canvasFilterObject.componentTransfer.discrete.tentative + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.componentTransfer.discrete.tentative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test pixels on CanvasFilter() componentTransfer with discrete type

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.worker.js b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.worker.js new file mode 100644 index 0000000000..0e68f4899f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.worker.js @@ -0,0 +1,62 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.filter.canvasFilterObject.componentTransfer.discrete.tentative +// Description:Test pixels on CanvasFilter() componentTransfer with discrete type +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Test pixels on CanvasFilter() componentTransfer with discrete type"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + // From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement + function getTransformedValue(C, V) { + // Get the right interval + const n = V.length; + const k = C == 1 ? n - 1 : Math.floor(C * n); + return V[k]; + } + + function getColor(inputColor, tableValues) { + const result = [0, 0, 0]; + for (const i in inputColor) { + const C = inputColor[i]/255; + const Cprime = getTransformedValue(C, tableValues[i]); + result[i] = Math.max(0, Math.min(1, Cprime)) * 255; + } + return result; + } + + tableValuesR = [0, 0, 1, 1]; + tableValuesG = [2, 0, 0.5, 3]; + tableValuesB = [1, -1, 5, 0]; + ctx.filter = new CanvasFilter({name: 'componentTransfer', + funcR: {type: 'discrete', tableValues: tableValuesR}, + funcG: {type: 'discrete', tableValues: tableValuesG}, + funcB: {type: 'discrete', tableValues: tableValuesB}, + }); + + const inputColors = [ + [255, 255, 255], + [0, 0, 0], + [127, 0, 34], + [252, 186, 3], + [50, 68, 87], + ]; + + for (const color of inputColors) { + let outputColor = getColor(color, [tableValuesR, tableValuesG, tableValuesB]); + ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`; + ctx.fillRect(0, 0, 10, 10); + _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2); + } + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html new file mode 100644 index 0000000000..64c30fc417 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html @@ -0,0 +1,58 @@ + + +OffscreenCanvas test: 2d.filter.canvasFilterObject.componentTransfer.gamma.tentative + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.componentTransfer.gamma.tentative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test pixels on CanvasFilter() componentTransfer with gamma type

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.worker.js b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.worker.js new file mode 100644 index 0000000000..d59bc699df --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.worker.js @@ -0,0 +1,53 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.filter.canvasFilterObject.componentTransfer.gamma.tentative +// Description:Test pixels on CanvasFilter() componentTransfer with gamma type +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Test pixels on CanvasFilter() componentTransfer with gamma type"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + // From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement + function getColor(inputColor, amplitude, exponent, offset) { + return [ + Math.max(0, Math.min(1, Math.pow(inputColor[0]/255, exponent[0]) * amplitude[0] + offset[0])) * 255, + Math.max(0, Math.min(1, Math.pow(inputColor[1]/255, exponent[1]) * amplitude[1] + offset[1])) * 255, + Math.max(0, Math.min(1, Math.pow(inputColor[2]/255, exponent[2]) * amplitude[2] + offset[2])) * 255, + ]; + } + + const amplitudes = [2, 1.1, 0.5]; + const exponents = [5, 3, 1]; + const offsets = [0.25, 0, 0.5]; + ctx.filter = new CanvasFilter({name: 'componentTransfer', + funcR: {type: 'gamma', amplitude: amplitudes[0], exponent: exponents[0], offset: offsets[0]}, + funcG: {type: 'gamma', amplitude: amplitudes[1], exponent: exponents[1], offset: offsets[1]}, + funcB: {type: 'gamma', amplitude: amplitudes[2], exponent: exponents[2], offset: offsets[2]}, + }); + + const inputColors = [ + [255, 255, 255], + [0, 0, 0], + [127, 0, 34], + [252, 186, 3], + [50, 68, 87], + ]; + + for (const color of inputColors) { + let outputColor = getColor(color, amplitudes, exponents, offsets); + ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`; + ctx.fillRect(0, 0, 10, 10); + _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2); + } + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html new file mode 100644 index 0000000000..e0d628952e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html @@ -0,0 +1,45 @@ + + +OffscreenCanvas test: 2d.filter.canvasFilterObject.componentTransfer.identity.tentative + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.componentTransfer.identity.tentative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test pixels on CanvasFilter() componentTransfer with identity type

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.worker.js b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.worker.js new file mode 100644 index 0000000000..1b714b58ff --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.worker.js @@ -0,0 +1,40 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.filter.canvasFilterObject.componentTransfer.identity.tentative +// Description:Test pixels on CanvasFilter() componentTransfer with identity type +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Test pixels on CanvasFilter() componentTransfer with identity type"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.filter = new CanvasFilter({name: 'componentTransfer', + funcR: {type: 'identity'}, + funcG: {type: 'identity'}, + funcB: {type: 'identity'}, + }); + + const inputColors = [ + [255, 255, 255], + [0, 0, 0], + [127, 0, 34], + [252, 186, 3], + [50, 68, 87], + ]; + + for (const color of inputColors) { + ctx.fillStyle = `rgba(${color[0]}, ${color[1]}, ${color[2]}, 1)`, + ctx.fillRect(0, 0, 10, 10); + _assertPixel(canvas, 5, 5, color[0],color[1],color[2],255); + } + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html new file mode 100644 index 0000000000..adbe557fd9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html @@ -0,0 +1,57 @@ + + +OffscreenCanvas test: 2d.filter.canvasFilterObject.componentTransfer.linear.tentative + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.componentTransfer.linear.tentative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test pixels on CanvasFilter() componentTransfer with linear type

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.worker.js b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.worker.js new file mode 100644 index 0000000000..fb2e01876f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.worker.js @@ -0,0 +1,52 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.filter.canvasFilterObject.componentTransfer.linear.tentative +// Description:Test pixels on CanvasFilter() componentTransfer with linear type +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Test pixels on CanvasFilter() componentTransfer with linear type"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + // From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement + function getColor(inputColor, slopes, intercepts) { + return [ + Math.max(0, Math.min(1, inputColor[0]/255 * slopes[0] + intercepts[0])) * 255, + Math.max(0, Math.min(1, inputColor[1]/255 * slopes[1] + intercepts[1])) * 255, + Math.max(0, Math.min(1, inputColor[2]/255 * slopes[2] + intercepts[2])) * 255, + ]; + } + + const slopes = [0.5, 1.2, -0.2]; + const intercepts = [0.25, 0, 0.5]; + ctx.filter = new CanvasFilter({name: 'componentTransfer', + funcR: {type: 'linear', slope: slopes[0], intercept: intercepts[0]}, + funcG: {type: 'linear', slope: slopes[1], intercept: intercepts[1]}, + funcB: {type: 'linear', slope: slopes[2], intercept: intercepts[2]}, + }); + + const inputColors = [ + [255, 255, 255], + [0, 0, 0], + [127, 0, 34], + [252, 186, 3], + [50, 68, 87], + ]; + + for (const color of inputColors) { + let outputColor = getColor(color, slopes, intercepts); + ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`; + ctx.fillRect(0, 0, 10, 10); + _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2); + } + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.html new file mode 100644 index 0000000000..47048b68a1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.html @@ -0,0 +1,67 @@ + + +OffscreenCanvas test: 2d.filter.canvasFilterObject.componentTransfer.table.tentative + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.componentTransfer.table.tentative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test pixels on CanvasFilter() componentTransfer with table type

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.worker.js b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.worker.js new file mode 100644 index 0000000000..0799e73a58 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.worker.js @@ -0,0 +1,62 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.filter.canvasFilterObject.componentTransfer.table.tentative +// Description:Test pixels on CanvasFilter() componentTransfer with table type +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Test pixels on CanvasFilter() componentTransfer with table type"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + // From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement + function getTransformedValue(C, V) { + // Get the right interval + const n = V.length - 1; + const k = C == 1 ? n - 1 : Math.floor(C * n); + return V[k] + (C - k/n) * n * (V[k + 1] - V[k]); + } + + function getColor(inputColor, tableValues) { + const result = [0, 0, 0]; + for (const i in inputColor) { + const C = inputColor[i]/255; + const Cprime = getTransformedValue(C, tableValues[i]); + result[i] = Math.max(0, Math.min(1, Cprime)) * 255; + } + return result; + } + + tableValuesR = [0, 0, 1, 1]; + tableValuesG = [2, 0, 0.5, 3]; + tableValuesB = [1, -1, 5, 0]; + ctx.filter = new CanvasFilter({name: 'componentTransfer', + funcR: {type: 'table', tableValues: tableValuesR}, + funcG: {type: 'table', tableValues: tableValuesG}, + funcB: {type: 'table', tableValues: tableValuesB}, + }); + + const inputColors = [ + [255, 255, 255], + [0, 0, 0], + [127, 0, 34], + [252, 186, 3], + [50, 68, 87], + ]; + + for (const color of inputColors) { + let outputColor = getColor(color, [tableValuesR, tableValuesG, tableValuesB]); + ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`; + ctx.fillRect(0, 0, 10, 10); + _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2); + } + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html new file mode 100644 index 0000000000..301d11f888 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test exceptions on CanvasFilter() convolveMatrix

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.worker.js b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.worker.js new file mode 100644 index 0000000000..b4ce4d76b2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative +// Description:Test exceptions on CanvasFilter() convolveMatrix +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Test exceptions on CanvasFilter() convolveMatrix"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'convolveMatrix'}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'convolveMatrix', divisor: 2}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'convolveMatrix', kernelMatrix: null}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'convolveMatrix', kernelMatrix: 1}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'convolveMatrix', kernelMatrix: [[1, 0], [0]]}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'convolveMatrix', kernelMatrix: [[1, 'a'], [0]]}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'convolveMatrix', kernelMatrix: [[1, 0], 0]}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'convolveMatrix', kernelMatrix: [[1, 0], [0, Infinity]]}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'convolveMatrix', kernelMatrix: []}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'convolveMatrix', kernelMatrix: [1]}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'convolveMatrix', kernelMatrix: [1, 2, 3, 4]}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'convolveMatrix', kernelMatrix: [[], []]}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'convolveMatrix', kernelMatrix: [[1, 2], []]}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'convolveMatrix', kernelMatrix: [[], [1, 2]]}); }); + // This should not throw an error + ctx.filter = new CanvasFilter({name: 'convolveMatrix', kernelMatrix: [[]]}); + ctx.filter = new CanvasFilter({name: 'convolveMatrix', kernelMatrix: [[1]]}); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html new file mode 100644 index 0000000000..3e55e97e54 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html @@ -0,0 +1,124 @@ + + +OffscreenCanvas test: 2d.filter.canvasFilterObject.dropShadow.exceptions.tentative + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.dropShadow.exceptions.tentative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test exceptions on CanvasFilter() dropShadow object

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.worker.js b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.worker.js new file mode 100644 index 0000000000..bd18524f28 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.worker.js @@ -0,0 +1,119 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.filter.canvasFilterObject.dropShadow.exceptions.tentative +// Description:Test exceptions on CanvasFilter() dropShadow object +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Test exceptions on CanvasFilter() dropShadow object"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + // dx + _assert(new CanvasFilter({name: 'dropShadow', dx: 10}), "new CanvasFilter({name: 'dropShadow', dx: 10})"); + _assert(new CanvasFilter({name: 'dropShadow', dx: -1}), "new CanvasFilter({name: 'dropShadow', dx: -1})"); + _assert(new CanvasFilter({name: 'dropShadow', dx: 0.5}), "new CanvasFilter({name: 'dropShadow', dx: 0.5})"); + _assert(new CanvasFilter({name: 'dropShadow', dx: null}), "new CanvasFilter({name: 'dropShadow', dx: null})"); + _assert(new CanvasFilter({name: 'dropShadow', dx: true}), "new CanvasFilter({name: 'dropShadow', dx: true})"); + _assert(new CanvasFilter({name: 'dropShadow', dx: false}), "new CanvasFilter({name: 'dropShadow', dx: false})"); + _assert(new CanvasFilter({name: 'dropShadow', dx: []}), "new CanvasFilter({name: 'dropShadow', dx: []})"); + _assert(new CanvasFilter({name: 'dropShadow', dx: [20]}), "new CanvasFilter({name: 'dropShadow', dx: [\""+(20)+"\"]})"); + _assert(new CanvasFilter({name: 'dropShadow', dx: '30'}), "new CanvasFilter({name: 'dropShadow', dx: '30'})"); + // dy + _assert(new CanvasFilter({name: 'dropShadow', dy: 10}), "new CanvasFilter({name: 'dropShadow', dy: 10})"); + _assert(new CanvasFilter({name: 'dropShadow', dy: -1}), "new CanvasFilter({name: 'dropShadow', dy: -1})"); + _assert(new CanvasFilter({name: 'dropShadow', dy: 0.5}), "new CanvasFilter({name: 'dropShadow', dy: 0.5})"); + _assert(new CanvasFilter({name: 'dropShadow', dy: null}), "new CanvasFilter({name: 'dropShadow', dy: null})"); + _assert(new CanvasFilter({name: 'dropShadow', dy: true}), "new CanvasFilter({name: 'dropShadow', dy: true})"); + _assert(new CanvasFilter({name: 'dropShadow', dy: false}), "new CanvasFilter({name: 'dropShadow', dy: false})"); + _assert(new CanvasFilter({name: 'dropShadow', dy: []}), "new CanvasFilter({name: 'dropShadow', dy: []})"); + _assert(new CanvasFilter({name: 'dropShadow', dy: [20]}), "new CanvasFilter({name: 'dropShadow', dy: [\""+(20)+"\"]})"); + _assert(new CanvasFilter({name: 'dropShadow', dy: '30'}), "new CanvasFilter({name: 'dropShadow', dy: '30'})"); + // floodOpacity + _assert(new CanvasFilter({name: 'dropShadow', floodOpacity: 10}), "new CanvasFilter({name: 'dropShadow', floodOpacity: 10})"); + _assert(new CanvasFilter({name: 'dropShadow', floodOpacity: -1}), "new CanvasFilter({name: 'dropShadow', floodOpacity: -1})"); + _assert(new CanvasFilter({name: 'dropShadow', floodOpacity: 0.5}), "new CanvasFilter({name: 'dropShadow', floodOpacity: 0.5})"); + _assert(new CanvasFilter({name: 'dropShadow', floodOpacity: null}), "new CanvasFilter({name: 'dropShadow', floodOpacity: null})"); + _assert(new CanvasFilter({name: 'dropShadow', floodOpacity: true}), "new CanvasFilter({name: 'dropShadow', floodOpacity: true})"); + _assert(new CanvasFilter({name: 'dropShadow', floodOpacity: false}), "new CanvasFilter({name: 'dropShadow', floodOpacity: false})"); + _assert(new CanvasFilter({name: 'dropShadow', floodOpacity: []}), "new CanvasFilter({name: 'dropShadow', floodOpacity: []})"); + _assert(new CanvasFilter({name: 'dropShadow', floodOpacity: [20]}), "new CanvasFilter({name: 'dropShadow', floodOpacity: [\""+(20)+"\"]})"); + _assert(new CanvasFilter({name: 'dropShadow', floodOpacity: '30'}), "new CanvasFilter({name: 'dropShadow', floodOpacity: '30'})"); + // stdDeviation + _assert(new CanvasFilter({name: 'dropShadow', stdDeviation: 10}), "new CanvasFilter({name: 'dropShadow', stdDeviation: 10})"); + _assert(new CanvasFilter({name: 'dropShadow', stdDeviation: -1}), "new CanvasFilter({name: 'dropShadow', stdDeviation: -1})"); + _assert(new CanvasFilter({name: 'dropShadow', stdDeviation: 0.5}), "new CanvasFilter({name: 'dropShadow', stdDeviation: 0.5})"); + _assert(new CanvasFilter({name: 'dropShadow', stdDeviation: null}), "new CanvasFilter({name: 'dropShadow', stdDeviation: null})"); + _assert(new CanvasFilter({name: 'dropShadow', stdDeviation: true}), "new CanvasFilter({name: 'dropShadow', stdDeviation: true})"); + _assert(new CanvasFilter({name: 'dropShadow', stdDeviation: false}), "new CanvasFilter({name: 'dropShadow', stdDeviation: false})"); + _assert(new CanvasFilter({name: 'dropShadow', stdDeviation: []}), "new CanvasFilter({name: 'dropShadow', stdDeviation: []})"); + _assert(new CanvasFilter({name: 'dropShadow', stdDeviation: [20]}), "new CanvasFilter({name: 'dropShadow', stdDeviation: [\""+(20)+"\"]})"); + _assert(new CanvasFilter({name: 'dropShadow', stdDeviation: '30'}), "new CanvasFilter({name: 'dropShadow', stdDeviation: '30'})"); + _assert(new CanvasFilter({name: 'dropShadow', stdDeviation: [10, -1]}), "new CanvasFilter({name: 'dropShadow', stdDeviation: [10, -1]})"); + _assert(new CanvasFilter({name: 'dropShadow', stdDeviation: [0.5, null]}), "new CanvasFilter({name: 'dropShadow', stdDeviation: [0.5, null]})"); + _assert(new CanvasFilter({name: 'dropShadow', stdDeviation: [true, false]}), "new CanvasFilter({name: 'dropShadow', stdDeviation: [true, false]})"); + _assert(new CanvasFilter({name: 'dropShadow', stdDeviation: [[], [20]]}), "new CanvasFilter({name: 'dropShadow', stdDeviation: [[], [\""+(20)+"\"]]})"); + _assert(new CanvasFilter({name: 'dropShadow', stdDeviation: ['30', ['40']]}), "new CanvasFilter({name: 'dropShadow', stdDeviation: ['30', ['40']]})"); + // floodColor + _assert(new CanvasFilter({name: 'dropShadow', floodColor: 'red'}), "new CanvasFilter({name: 'dropShadow', floodColor: 'red'})"); + _assert(new CanvasFilter({name: 'dropShadow', floodColor: 'canvas'}), "new CanvasFilter({name: 'dropShadow', floodColor: 'canvas'})"); + _assert(new CanvasFilter({name: 'dropShadow', floodColor: 'rgba(4, -3, 0.5, 1)'}), "new CanvasFilter({name: 'dropShadow', floodColor: 'rgba(4, -3, 0.5, 1)'})"); + _assert(new CanvasFilter({name: 'dropShadow', floodColor: '#aabbccdd'}), "new CanvasFilter({name: 'dropShadow', floodColor: '#aabbccdd'})"); + _assert(new CanvasFilter({name: 'dropShadow', floodColor: '#abcd'}), "new CanvasFilter({name: 'dropShadow', floodColor: '#abcd'})"); + + // dx + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', dx: NaN}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', dx: Infinity}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', dx: -Infinity}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', dx: undefined}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', dx: 'test'}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', dx: {}}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', dx: [1, 2]}); }); + // dy + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', dy: NaN}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', dy: Infinity}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', dy: -Infinity}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', dy: undefined}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', dy: 'test'}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', dy: {}}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', dy: [1, 2]}); }); + // floodOpacity + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', floodOpacity: NaN}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', floodOpacity: Infinity}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', floodOpacity: -Infinity}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', floodOpacity: undefined}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', floodOpacity: 'test'}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', floodOpacity: {}}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', floodOpacity: [1, 2]}); }); + // stdDeviation + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', stdDeviation: NaN}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', stdDeviation: Infinity}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', stdDeviation: -Infinity}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', stdDeviation: undefined}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', stdDeviation: 'test'}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', stdDeviation: {}}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', stdDeviation: [1, 2, 3]}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', stdDeviation: [1, NaN]}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', stdDeviation: [1, Infinity]}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', stdDeviation: [1, -Infinity]}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', stdDeviation: [1, undefined]}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', stdDeviation: [1, 'test']}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', stdDeviation: [1, {}]}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', stdDeviation: [1, [2, 3]]}); }); + // floodColor + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', floodColor: 'test'}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', floodColor: 'rgba(NaN, 3, 2, 1)'}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', floodColor: 10}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', floodColor: undefined}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', floodColor: null}); }); + assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', floodColor: NaN}); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.tentative-expected.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.tentative-expected.html new file mode 100644 index 0000000000..86c5710132 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.tentative-expected.html @@ -0,0 +1,57 @@ + + +Canvas test: 2d.filter.canvasFilterObject.dropShadow.tentative +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.dropShadow.tentative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test CanvasFilter() dropShadow object.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.tentative.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.tentative.html new file mode 100644 index 0000000000..81eb1eae45 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.tentative.html @@ -0,0 +1,110 @@ + + + +Canvas test: 2d.filter.canvasFilterObject.dropShadow.tentative +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.dropShadow.tentative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test CanvasFilter() dropShadow object.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.tentative.w.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.tentative.w.html new file mode 100644 index 0000000000..fe9087244a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.tentative.w.html @@ -0,0 +1,124 @@ + + + + +Canvas test: 2d.filter.canvasFilterObject.dropShadow.tentative +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.dropShadow.tentative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test CanvasFilter() dropShadow object.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic-expected.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic-expected.html new file mode 100644 index 0000000000..f9571f208e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic-expected.html @@ -0,0 +1,15 @@ + + +Canvas test: 2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test CanvasFilter() with gaussianBlur.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic.html new file mode 100644 index 0000000000..4417a1917c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic.html @@ -0,0 +1,23 @@ + + + +Canvas test: 2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test CanvasFilter() with gaussianBlur.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic.w.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic.w.html new file mode 100644 index 0000000000..d2024ad205 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic.w.html @@ -0,0 +1,37 @@ + + + + +Canvas test: 2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.gaussianBlur.tentative.isotropic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test CanvasFilter() with gaussianBlur.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x-expected.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x-expected.html new file mode 100644 index 0000000000..e76613271f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x-expected.html @@ -0,0 +1,15 @@ + + +Canvas test: 2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test CanvasFilter() with gaussianBlur.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x.html new file mode 100644 index 0000000000..2ea26359fe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x.html @@ -0,0 +1,23 @@ + + + +Canvas test: 2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test CanvasFilter() with gaussianBlur.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x.w.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x.w.html new file mode 100644 index 0000000000..fa49ea4682 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x.w.html @@ -0,0 +1,37 @@ + + + + +Canvas test: 2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-x

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test CanvasFilter() with gaussianBlur.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y-expected.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y-expected.html new file mode 100644 index 0000000000..0f214fca9f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y-expected.html @@ -0,0 +1,15 @@ + + +Canvas test: 2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test CanvasFilter() with gaussianBlur.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y.html new file mode 100644 index 0000000000..a9783ccb6a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y.html @@ -0,0 +1,23 @@ + + + +Canvas test: 2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test CanvasFilter() with gaussianBlur.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y.w.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y.w.html new file mode 100644 index 0000000000..ab83f50ea0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y.w.html @@ -0,0 +1,37 @@ + + + + +Canvas test: 2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.gaussianBlur.tentative.mostly-y

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test CanvasFilter() with gaussianBlur.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only-expected.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only-expected.html new file mode 100644 index 0000000000..285a641726 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only-expected.html @@ -0,0 +1,15 @@ + + +Canvas test: 2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test CanvasFilter() with gaussianBlur.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only.html new file mode 100644 index 0000000000..3028c2a700 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only.html @@ -0,0 +1,23 @@ + + + +Canvas test: 2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test CanvasFilter() with gaussianBlur.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only.w.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only.w.html new file mode 100644 index 0000000000..e8482cf3ed --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only.w.html @@ -0,0 +1,37 @@ + + + + +Canvas test: 2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.gaussianBlur.tentative.x-only

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test CanvasFilter() with gaussianBlur.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only-expected.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only-expected.html new file mode 100644 index 0000000000..d59945b5da --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only-expected.html @@ -0,0 +1,15 @@ + + +Canvas test: 2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test CanvasFilter() with gaussianBlur.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only.html new file mode 100644 index 0000000000..fca324716b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only.html @@ -0,0 +1,23 @@ + + + +Canvas test: 2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test CanvasFilter() with gaussianBlur.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only.w.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only.w.html new file mode 100644 index 0000000000..50cfb3083a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only.w.html @@ -0,0 +1,37 @@ + + + + +Canvas test: 2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.gaussianBlur.tentative.y-only

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test CanvasFilter() with gaussianBlur.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.tentative.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.tentative.html new file mode 100644 index 0000000000..fb99ef7d1f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.tentative.html @@ -0,0 +1,49 @@ + + +OffscreenCanvas test: 2d.filter.canvasFilterObject.tentative + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.tentative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test CanvasFilter() object

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.tentative.worker.js b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.tentative.worker.js new file mode 100644 index 0000000000..db95e0b006 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.tentative.worker.js @@ -0,0 +1,44 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.filter.canvasFilterObject.tentative +// Description:Test CanvasFilter() object +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Test CanvasFilter() object"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assert(ctx.filter == 'none', "ctx.filter == 'none'"); + ctx.filter = 'blur(5px)'; + _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'"); + ctx.filter = new CanvasFilter({name: 'gaussianBlur', stdDeviation: 5}); + _assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'"); + ctx.filter = new CanvasFilter({name: 'gaussianBlur', stdDeviation: [1, 2]}); + _assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'"); + ctx.filter = new CanvasFilter([ + {name: 'gaussianBlur', stdDeviation: 5}, + {name: 'gaussianBlur', stdDeviation: 10} + ]); + _assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'"); + var canvas2 = new OffscreenCanvas(100, 50); + var ctx2 = canvas2.getContext('2d'); + ctx2.filter = ctx.filter; + _assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'"); + ctx.filter = 'blur(5px)'; + _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'"); + ctx.filter = 'none'; + _assert(ctx.filter == 'none', "ctx.filter == 'none'"); + ctx.filter = new CanvasFilter({name: 'gaussianBlur', stdDeviation: 5}); + ctx.filter = 'this string is not a filter and should do nothing'; + _assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html new file mode 100644 index 0000000000..040c62a96b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html @@ -0,0 +1,130 @@ + + +OffscreenCanvas test: 2d.filter.canvasFilterObject.turbulence.inputTypes.tentative + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.canvasFilterObject.turbulence.inputTypes.tentative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test exceptions on CanvasFilter() turbulence object

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.worker.js b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.worker.js new file mode 100644 index 0000000000..1a950a9207 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.worker.js @@ -0,0 +1,125 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.filter.canvasFilterObject.turbulence.inputTypes.tentative +// Description:Test exceptions on CanvasFilter() turbulence object +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Test exceptions on CanvasFilter() turbulence object"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const errorTestCases = [ + {baseFrequency: {}}, + {baseFrequency: -1}, + {baseFrequency: [0, -1]}, + {baseFrequency: NaN}, + {baseFrequency: Infinity}, + {baseFrequency: undefined}, + {baseFrequency: -Infinity}, + {baseFrequency: 'test'}, + + {numOctaves: {}}, + {numOctaves: -1}, + {numOctaves: NaN}, + {numOctaves: Infinity}, + {numOctaves: undefined}, + {numOctaves: -Infinity}, + {numOctaves: [1, 1]}, + {numOctaves: 'test'}, + + {seed: {}}, + {seed: NaN}, + {seed: Infinity}, + {seed: undefined}, + {seed: -Infinity}, + {seed: [1, 1]}, + {seed: 'test'}, + + {stitchTiles: {}}, + {stitchTiles: NaN}, + {stitchTiles: Infinity}, + {stitchTiles: undefined}, + {stitchTiles: -Infinity}, + {stitchTiles: [1, 1]}, + {stitchTiles: 'test'}, + {stitchTiles: null}, + {stitchTiles: []}, + {stitchTiles: [10]}, + {stitchTiles: 30}, + {stitchTiles: false}, + {stitchTiles: true}, + {stitchTiles: '10'}, + {stitchTiles: -1}, + + {type: {}}, + {type: NaN}, + {type: Infinity}, + {type: undefined}, + {type: -Infinity}, + {type: [1, 1]}, + {type: 'test'}, + {type: null}, + {type: []}, + {type: [10]}, + {type: 30}, + {type: false}, + {type: true}, + {type: '10'}, + {type: -1}, + ] + + // null and [] = 0 when parsed as number + const workingTestCases = [ + {baseFrequency: null}, + {baseFrequency: []}, + {baseFrequency: [10]}, + {baseFrequency: [10, 3]}, + {baseFrequency: 30}, + {baseFrequency: false}, + {baseFrequency: true}, + {baseFrequency: '10'}, + + {numOctaves: null}, + {numOctaves: []}, + {numOctaves: [10]}, + {numOctaves: 30}, + {numOctaves: false}, + {numOctaves: true}, + {numOctaves: '10'}, + + {seed: null}, + {seed: []}, + {seed: [10]}, + {seed: 30}, + {seed: false}, + {seed: true}, + {seed: '10'}, + {seed: -1}, + + {stitchTiles: 'stitch'}, + {stitchTiles: 'noStitch'}, + + {type: 'fractalNoise'}, + {type: 'turbulence'}, + ] + + for (testCase of errorTestCases) { + const filterOptions = {...{name: 'turbulence'}, ...testCase}; + assert_throws_js(TypeError, function() { new CanvasFilter(filterOptions); }); + } + + for (testCase of workingTestCases) { + const filterOptions = {...{name: 'turbulence'}, ...testCase}; + _assert(new CanvasFilter(filterOptions) != null, "new CanvasFilter(filterOptions) != null"); + } + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.value.html b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.value.html new file mode 100644 index 0000000000..5594174cf6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.value.html @@ -0,0 +1,56 @@ + + +OffscreenCanvas test: 2d.filter.value + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.filter.value

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  test if ctx.filter works correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.value.worker.js b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.value.worker.js new file mode 100644 index 0000000000..2308315b63 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.value.worker.js @@ -0,0 +1,51 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.filter.value +// Description:test if ctx.filter works correctly +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("test if ctx.filter works correctly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assert(ctx.filter == 'none', "ctx.filter == 'none'"); + ctx.filter = 'blur(5px)'; + _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'"); + ctx.save(); + ctx.filter = 'none'; + _assert(ctx.filter == 'none', "ctx.filter == 'none'"); + ctx.restore(); + _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'"); + + ctx.filter = 'blur(10)'; + _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'"); + ctx.filter = 'blur 10px'; + _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'"); + + ctx.filter = 'inherit'; + _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'"); + ctx.filter = 'initial'; + _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'"); + ctx.filter = 'unset'; + _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'"); + + ctx.filter = ''; + _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'"); + ctx.filter = null; + _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'"); + ctx.filter = undefined; + _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'"); + + ctx.filter = 'blur( 5px)'; + assert_equals(ctx.filter, 'blur( 5px)'); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.isotropic-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.isotropic-expected.html new file mode 100644 index 0000000000..6a6f0f6892 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.isotropic-expected.html @@ -0,0 +1,16 @@ + + +Canvas test: 2d.layer.anisotropic-blur.isotropic +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.anisotropic-blur.isotropic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers allow gaussian blur with separate X and Y components.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.isotropic.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.isotropic.html new file mode 100644 index 0000000000..d59a4ccf62 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.isotropic.html @@ -0,0 +1,23 @@ + + + +Canvas test: 2d.layer.anisotropic-blur.isotropic +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.anisotropic-blur.isotropic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers allow gaussian blur with separate X and Y components.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.isotropic.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.isotropic.w.html new file mode 100644 index 0000000000..15961d5c7e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.isotropic.w.html @@ -0,0 +1,37 @@ + + + + +Canvas test: 2d.layer.anisotropic-blur.isotropic +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.anisotropic-blur.isotropic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers allow gaussian blur with separate X and Y components.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.mostly-x-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.mostly-x-expected.html new file mode 100644 index 0000000000..b0473f2ff0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.mostly-x-expected.html @@ -0,0 +1,16 @@ + + +Canvas test: 2d.layer.anisotropic-blur.mostly-x +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.anisotropic-blur.mostly-x

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers allow gaussian blur with separate X and Y components.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.mostly-x.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.mostly-x.html new file mode 100644 index 0000000000..c5ad2ee6c5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.mostly-x.html @@ -0,0 +1,23 @@ + + + +Canvas test: 2d.layer.anisotropic-blur.mostly-x +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.anisotropic-blur.mostly-x

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers allow gaussian blur with separate X and Y components.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.mostly-x.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.mostly-x.w.html new file mode 100644 index 0000000000..60f5ac3ebd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.mostly-x.w.html @@ -0,0 +1,37 @@ + + + + +Canvas test: 2d.layer.anisotropic-blur.mostly-x +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.anisotropic-blur.mostly-x

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers allow gaussian blur with separate X and Y components.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.mostly-y-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.mostly-y-expected.html new file mode 100644 index 0000000000..43da016eea --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.mostly-y-expected.html @@ -0,0 +1,16 @@ + + +Canvas test: 2d.layer.anisotropic-blur.mostly-y +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.anisotropic-blur.mostly-y

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers allow gaussian blur with separate X and Y components.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.mostly-y.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.mostly-y.html new file mode 100644 index 0000000000..9545257cfa --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.mostly-y.html @@ -0,0 +1,23 @@ + + + +Canvas test: 2d.layer.anisotropic-blur.mostly-y +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.anisotropic-blur.mostly-y

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers allow gaussian blur with separate X and Y components.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.mostly-y.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.mostly-y.w.html new file mode 100644 index 0000000000..d533ad3187 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.mostly-y.w.html @@ -0,0 +1,37 @@ + + + + +Canvas test: 2d.layer.anisotropic-blur.mostly-y +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.anisotropic-blur.mostly-y

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers allow gaussian blur with separate X and Y components.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.x-only-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.x-only-expected.html new file mode 100644 index 0000000000..0b4d269189 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.x-only-expected.html @@ -0,0 +1,16 @@ + + +Canvas test: 2d.layer.anisotropic-blur.x-only +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.anisotropic-blur.x-only

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers allow gaussian blur with separate X and Y components.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.x-only.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.x-only.html new file mode 100644 index 0000000000..4552ad4433 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.x-only.html @@ -0,0 +1,23 @@ + + + +Canvas test: 2d.layer.anisotropic-blur.x-only +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.anisotropic-blur.x-only

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers allow gaussian blur with separate X and Y components.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.x-only.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.x-only.w.html new file mode 100644 index 0000000000..38abb21cd9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.x-only.w.html @@ -0,0 +1,37 @@ + + + + +Canvas test: 2d.layer.anisotropic-blur.x-only +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.anisotropic-blur.x-only

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers allow gaussian blur with separate X and Y components.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.y-only-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.y-only-expected.html new file mode 100644 index 0000000000..2572386412 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.y-only-expected.html @@ -0,0 +1,16 @@ + + +Canvas test: 2d.layer.anisotropic-blur.y-only +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.anisotropic-blur.y-only

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers allow gaussian blur with separate X and Y components.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.y-only.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.y-only.html new file mode 100644 index 0000000000..87dbcd3708 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.y-only.html @@ -0,0 +1,23 @@ + + + +Canvas test: 2d.layer.anisotropic-blur.y-only +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.anisotropic-blur.y-only

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers allow gaussian blur with separate X and Y components.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.y-only.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.y-only.w.html new file mode 100644 index 0000000000..062328db75 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.y-only.w.html @@ -0,0 +1,37 @@ + + + + +Canvas test: 2d.layer.anisotropic-blur.y-only +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.anisotropic-blur.y-only

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers allow gaussian blur with separate X and Y components.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.beginLayer-options.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.beginLayer-options.html new file mode 100644 index 0000000000..4fb042a1d8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.beginLayer-options.html @@ -0,0 +1,51 @@ + + +OffscreenCanvas test: 2d.layer.beginLayer-options + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.beginLayer-options

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks beginLayer works for different option parameter values

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.beginLayer-options.worker.js b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.beginLayer-options.worker.js new file mode 100644 index 0000000000..cafbc83f3e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.beginLayer-options.worker.js @@ -0,0 +1,46 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.beginLayer-options +// Description:Checks beginLayer works for different option parameter values +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Checks beginLayer works for different option parameter values"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.beginLayer(); ctx.endLayer(); + ctx.beginLayer(null); ctx.endLayer(); + ctx.beginLayer(undefined); ctx.endLayer(); + ctx.beginLayer([]); ctx.endLayer(); + ctx.beginLayer({}); ctx.endLayer(); + + assert_throws_js(TypeError, function() { ctx.beginLayer(''); }); + assert_throws_js(TypeError, function() { ctx.beginLayer(0); }); + assert_throws_js(TypeError, function() { ctx.beginLayer(1); }); + assert_throws_js(TypeError, function() { ctx.beginLayer(true); }); + assert_throws_js(TypeError, function() { ctx.beginLayer(false); }); + + ctx.beginLayer({filter: null}); ctx.endLayer(); + ctx.beginLayer({filter: undefined}); ctx.endLayer(); + ctx.beginLayer({filter: []}); ctx.endLayer(); + ctx.beginLayer({filter: {}}); ctx.endLayer(); + ctx.beginLayer({filter: {name: "unknown"}}); ctx.endLayer(); + ctx.beginLayer({filter: ''}); ctx.endLayer(); + + // These cases don't throw TypeError since they can be casted to a + // DOMString. + ctx.beginLayer({filter: 0}); ctx.endLayer(); + ctx.beginLayer({filter: 1}); ctx.endLayer(); + ctx.beginLayer({filter: true}); ctx.endLayer(); + ctx.beginLayer({filter: false}); ctx.endLayer(); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.blur-from-outside-canvas.no-clipping-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.blur-from-outside-canvas.no-clipping-expected.html new file mode 100644 index 0000000000..6cad180f14 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.blur-from-outside-canvas.no-clipping-expected.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.layer.blur-from-outside-canvas.no-clipping +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.blur-from-outside-canvas.no-clipping

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks blur leaking inside from drawing outside the canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.blur-from-outside-canvas.no-clipping.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.blur-from-outside-canvas.no-clipping.html new file mode 100644 index 0000000000..3cd1c674a1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.blur-from-outside-canvas.no-clipping.html @@ -0,0 +1,31 @@ + + + +Canvas test: 2d.layer.blur-from-outside-canvas.no-clipping +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.blur-from-outside-canvas.no-clipping

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks blur leaking inside from drawing outside the canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.blur-from-outside-canvas.no-clipping.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.blur-from-outside-canvas.no-clipping.w.html new file mode 100644 index 0000000000..90b013c077 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.blur-from-outside-canvas.no-clipping.w.html @@ -0,0 +1,45 @@ + + + + +Canvas test: 2d.layer.blur-from-outside-canvas.no-clipping +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.blur-from-outside-canvas.no-clipping

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks blur leaking inside from drawing outside the canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.blur-from-outside-canvas.with-clipping-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.blur-from-outside-canvas.with-clipping-expected.html new file mode 100644 index 0000000000..1823f78983 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.blur-from-outside-canvas.with-clipping-expected.html @@ -0,0 +1,38 @@ + + +Canvas test: 2d.layer.blur-from-outside-canvas.with-clipping +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.blur-from-outside-canvas.with-clipping

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks blur leaking inside from drawing outside the canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.blur-from-outside-canvas.with-clipping.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.blur-from-outside-canvas.with-clipping.html new file mode 100644 index 0000000000..76477445e5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.blur-from-outside-canvas.with-clipping.html @@ -0,0 +1,33 @@ + + + +Canvas test: 2d.layer.blur-from-outside-canvas.with-clipping +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.blur-from-outside-canvas.with-clipping

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks blur leaking inside from drawing outside the canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.blur-from-outside-canvas.with-clipping.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.blur-from-outside-canvas.with-clipping.w.html new file mode 100644 index 0000000000..cf5570c932 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.blur-from-outside-canvas.with-clipping.w.html @@ -0,0 +1,47 @@ + + + + +Canvas test: 2d.layer.blur-from-outside-canvas.with-clipping +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.blur-from-outside-canvas.with-clipping

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks blur leaking inside from drawing outside the canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clearRect.full-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clearRect.full-expected.html new file mode 100644 index 0000000000..5a47f8e118 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clearRect.full-expected.html @@ -0,0 +1,15 @@ + + +Canvas test: 2d.layer.clearRect.full +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.clearRect.full

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  clearRect inside a layer can clear all of the layer content.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clearRect.full.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clearRect.full.html new file mode 100644 index 0000000000..ec9f453b69 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clearRect.full.html @@ -0,0 +1,26 @@ + + + +Canvas test: 2d.layer.clearRect.full +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.clearRect.full

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  clearRect inside a layer can clear all of the layer content.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clearRect.full.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clearRect.full.w.html new file mode 100644 index 0000000000..a6f4021dd5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clearRect.full.w.html @@ -0,0 +1,40 @@ + + + + +Canvas test: 2d.layer.clearRect.full +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.clearRect.full

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  clearRect inside a layer can clear all of the layer content.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clearRect.partial-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clearRect.partial-expected.html new file mode 100644 index 0000000000..ac75105cec --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clearRect.partial-expected.html @@ -0,0 +1,21 @@ + + +Canvas test: 2d.layer.clearRect.partial +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.clearRect.partial

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  clearRect inside a layer can clear a portion of the layer content.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clearRect.partial.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clearRect.partial.html new file mode 100644 index 0000000000..88509a8a40 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clearRect.partial.html @@ -0,0 +1,25 @@ + + + +Canvas test: 2d.layer.clearRect.partial +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.clearRect.partial

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  clearRect inside a layer can clear a portion of the layer content.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clearRect.partial.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clearRect.partial.w.html new file mode 100644 index 0000000000..c6ba41afd7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clearRect.partial.w.html @@ -0,0 +1,39 @@ + + + + +Canvas test: 2d.layer.clearRect.partial +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.clearRect.partial

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  clearRect inside a layer can clear a portion of the layer content.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-inside-and-outside-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-inside-and-outside-expected.html new file mode 100644 index 0000000000..14e6d56245 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-inside-and-outside-expected.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.layer.clip-inside-and-outside +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.clip-inside-and-outside

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Check clipping set inside and outside the layer

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-inside-and-outside.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-inside-and-outside.html new file mode 100644 index 0000000000..03a3aee605 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-inside-and-outside.html @@ -0,0 +1,30 @@ + + + +Canvas test: 2d.layer.clip-inside-and-outside +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.clip-inside-and-outside

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Check clipping set inside and outside the layer

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-inside-and-outside.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-inside-and-outside.w.html new file mode 100644 index 0000000000..71f9fe7db4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-inside-and-outside.w.html @@ -0,0 +1,44 @@ + + + + +Canvas test: 2d.layer.clip-inside-and-outside +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.clip-inside-and-outside

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Check clipping set inside and outside the layer

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-inside-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-inside-expected.html new file mode 100644 index 0000000000..281fc1d913 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-inside-expected.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.layer.clip-inside +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.clip-inside

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Check clipping set inside the layer

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-inside.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-inside.html new file mode 100644 index 0000000000..e0c41f21e1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-inside.html @@ -0,0 +1,26 @@ + + + +Canvas test: 2d.layer.clip-inside +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.clip-inside

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Check clipping set inside the layer

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-inside.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-inside.w.html new file mode 100644 index 0000000000..9c4260a8ce --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-inside.w.html @@ -0,0 +1,40 @@ + + + + +Canvas test: 2d.layer.clip-inside +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.clip-inside

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Check clipping set inside the layer

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-outside-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-outside-expected.html new file mode 100644 index 0000000000..1b18c2e8a7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-outside-expected.html @@ -0,0 +1,26 @@ + + +Canvas test: 2d.layer.clip-outside +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.clip-outside

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Check clipping set outside the layer

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-outside.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-outside.html new file mode 100644 index 0000000000..d2d091e96b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-outside.html @@ -0,0 +1,25 @@ + + + +Canvas test: 2d.layer.clip-outside +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.clip-outside

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Check clipping set outside the layer

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-outside.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-outside.w.html new file mode 100644 index 0000000000..aed72db5ab --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.clip-outside.w.html @@ -0,0 +1,39 @@ + + + + +Canvas test: 2d.layer.clip-outside +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.clip-outside

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Check clipping set outside the layer

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.cross-layer-paths-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.cross-layer-paths-expected.html new file mode 100644 index 0000000000..c394ecdfe3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.cross-layer-paths-expected.html @@ -0,0 +1,14 @@ + + +Canvas test: 2d.layer.cross-layer-paths +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.cross-layer-paths

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that path defined in a layer is usable outside.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.cross-layer-paths.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.cross-layer-paths.html new file mode 100644 index 0000000000..f167ae00bd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.cross-layer-paths.html @@ -0,0 +1,23 @@ + + + +Canvas test: 2d.layer.cross-layer-paths +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.cross-layer-paths

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that path defined in a layer is usable outside.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.cross-layer-paths.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.cross-layer-paths.w.html new file mode 100644 index 0000000000..5b1f7f949c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.cross-layer-paths.w.html @@ -0,0 +1,37 @@ + + + + +Canvas test: 2d.layer.cross-layer-paths +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.cross-layer-paths

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that path defined in a layer is usable outside.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-and-shadow-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-and-shadow-expected.html new file mode 100644 index 0000000000..85503ae33a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-and-shadow-expected.html @@ -0,0 +1,17 @@ + + +Canvas test: 2d.layer.css-filters.blur-and-shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.css-filters.blur-and-shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that beginLayer works with a CSS filter string as input.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-and-shadow.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-and-shadow.html new file mode 100644 index 0000000000..a44ce4707f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-and-shadow.html @@ -0,0 +1,23 @@ + + + +Canvas test: 2d.layer.css-filters.blur-and-shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.css-filters.blur-and-shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that beginLayer works with a CSS filter string as input.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-and-shadow.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-and-shadow.w.html new file mode 100644 index 0000000000..9413ca6674 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-and-shadow.w.html @@ -0,0 +1,37 @@ + + + + +Canvas test: 2d.layer.css-filters.blur-and-shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.css-filters.blur-and-shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that beginLayer works with a CSS filter string as input.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-expected.html new file mode 100644 index 0000000000..c6131f6c1e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-expected.html @@ -0,0 +1,16 @@ + + +Canvas test: 2d.layer.css-filters.blur +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.css-filters.blur

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that beginLayer works with a CSS filter string as input.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur.html new file mode 100644 index 0000000000..5407ec37ad --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur.html @@ -0,0 +1,23 @@ + + + +Canvas test: 2d.layer.css-filters.blur +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.css-filters.blur

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that beginLayer works with a CSS filter string as input.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur.w.html new file mode 100644 index 0000000000..35af0e1bfb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur.w.html @@ -0,0 +1,37 @@ + + + + +Canvas test: 2d.layer.css-filters.blur +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.css-filters.blur

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that beginLayer works with a CSS filter string as input.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.shadow-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.shadow-expected.html new file mode 100644 index 0000000000..60f78d8096 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.shadow-expected.html @@ -0,0 +1,16 @@ + + +Canvas test: 2d.layer.css-filters.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.css-filters.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that beginLayer works with a CSS filter string as input.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.shadow.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.shadow.html new file mode 100644 index 0000000000..28d6e6e403 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.shadow.html @@ -0,0 +1,23 @@ + + + +Canvas test: 2d.layer.css-filters.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.css-filters.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that beginLayer works with a CSS filter string as input.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.shadow.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.shadow.w.html new file mode 100644 index 0000000000..98e9d2fbd4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.css-filters.shadow.w.html @@ -0,0 +1,37 @@ + + + + +Canvas test: 2d.layer.css-filters.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.css-filters.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that beginLayer works with a CSS filter string as input.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.exceptions-are-no-op.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.exceptions-are-no-op.html new file mode 100644 index 0000000000..a047c539cf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.exceptions-are-no-op.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.layer.exceptions-are-no-op + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.exceptions-are-no-op

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that the context state is left unchanged if beginLayer throws.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.exceptions-are-no-op.worker.js b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.exceptions-are-no-op.worker.js new file mode 100644 index 0000000000..bd1e376084 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.exceptions-are-no-op.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.exceptions-are-no-op +// Description:Checks that the context state is left unchanged if beginLayer throws. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Checks that the context state is left unchanged if beginLayer throws."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + // Get `beginLayer` to throw while parsing the filter. + assert_throws_js(TypeError, + () => ctx.beginLayer({filter: {name: 'colorMatrix', + values: 'foo'}})); + // `beginLayer` shouldn't have opened the layer, so `endLayer` should throw. + assert_throws_dom("InvalidStateError", () => ctx.endLayer()); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-filter-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-filter-expected.html new file mode 100644 index 0000000000..88057fc354 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-filter-expected.html @@ -0,0 +1,17 @@ + + +Canvas test: 2d.layer.global-filter +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-filter

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Tests that layers ignore the global context filter.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-filter.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-filter.html new file mode 100644 index 0000000000..2388a06a96 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-filter.html @@ -0,0 +1,29 @@ + + + +Canvas test: 2d.layer.global-filter +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-filter

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Tests that layers ignore the global context filter.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-filter.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-filter.w.html new file mode 100644 index 0000000000..4c8f92d18a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-filter.w.html @@ -0,0 +1,43 @@ + + + + +Canvas test: 2d.layer.global-filter +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-filter

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Tests that layers ignore the global context filter.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha-expected.html new file mode 100644 index 0000000000..0666e3098a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha-expected.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.layer.global-states.alpha +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.alpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending-expected.html new file mode 100644 index 0000000000..8a45027588 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending-expected.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.layer.global-states.alpha.blending +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.alpha.blending

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.html new file mode 100644 index 0000000000..71414b4b37 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.html @@ -0,0 +1,38 @@ + + + +Canvas test: 2d.layer.global-states.alpha.blending +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.alpha.blending

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow-expected.html new file mode 100644 index 0000000000..f7b633b35f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow-expected.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.layer.global-states.alpha.blending.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.alpha.blending.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow.html new file mode 100644 index 0000000000..ed2d2d70af --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow.html @@ -0,0 +1,42 @@ + + + +Canvas test: 2d.layer.global-states.alpha.blending.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.alpha.blending.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow.w.html new file mode 100644 index 0000000000..1ff3ad8385 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow.w.html @@ -0,0 +1,56 @@ + + + + +Canvas test: 2d.layer.global-states.alpha.blending.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.alpha.blending.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.w.html new file mode 100644 index 0000000000..618480c813 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.w.html @@ -0,0 +1,52 @@ + + + + +Canvas test: 2d.layer.global-states.alpha.blending +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.alpha.blending

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite-expected.html new file mode 100644 index 0000000000..951049e638 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite-expected.html @@ -0,0 +1,32 @@ + + +Canvas test: 2d.layer.global-states.alpha.composite +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.alpha.composite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.html new file mode 100644 index 0000000000..94fed5752d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.html @@ -0,0 +1,38 @@ + + + +Canvas test: 2d.layer.global-states.alpha.composite +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.alpha.composite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow-expected.html new file mode 100644 index 0000000000..0ae93871f5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow-expected.html @@ -0,0 +1,36 @@ + + +Canvas test: 2d.layer.global-states.alpha.composite.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.alpha.composite.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow.html new file mode 100644 index 0000000000..eb579cdcce --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow.html @@ -0,0 +1,42 @@ + + + +Canvas test: 2d.layer.global-states.alpha.composite.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.alpha.composite.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow.w.html new file mode 100644 index 0000000000..60e36f4b97 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow.w.html @@ -0,0 +1,56 @@ + + + + +Canvas test: 2d.layer.global-states.alpha.composite.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.alpha.composite.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.w.html new file mode 100644 index 0000000000..d7d2b7a21e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.w.html @@ -0,0 +1,52 @@ + + + + +Canvas test: 2d.layer.global-states.alpha.composite +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.alpha.composite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.html new file mode 100644 index 0000000000..63a264e681 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.html @@ -0,0 +1,37 @@ + + + +Canvas test: 2d.layer.global-states.alpha +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.alpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.shadow-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.shadow-expected.html new file mode 100644 index 0000000000..6f764c5001 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.shadow-expected.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.layer.global-states.alpha.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.alpha.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.shadow.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.shadow.html new file mode 100644 index 0000000000..65a66c977d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.shadow.html @@ -0,0 +1,41 @@ + + + +Canvas test: 2d.layer.global-states.alpha.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.alpha.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.shadow.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.shadow.w.html new file mode 100644 index 0000000000..f404601e3d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.shadow.w.html @@ -0,0 +1,55 @@ + + + + +Canvas test: 2d.layer.global-states.alpha.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.alpha.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.w.html new file mode 100644 index 0000000000..694f31e208 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.w.html @@ -0,0 +1,51 @@ + + + + +Canvas test: 2d.layer.global-states.alpha +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.alpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.blending-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.blending-expected.html new file mode 100644 index 0000000000..33fdf46a28 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.blending-expected.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.layer.global-states.blending +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.blending

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.html new file mode 100644 index 0000000000..6a36bb4ba1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.html @@ -0,0 +1,37 @@ + + + +Canvas test: 2d.layer.global-states.blending +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.blending

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.shadow-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.shadow-expected.html new file mode 100644 index 0000000000..6f969074f9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.shadow-expected.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.layer.global-states.blending.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.blending.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.shadow.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.shadow.html new file mode 100644 index 0000000000..2e91f3d2d1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.shadow.html @@ -0,0 +1,41 @@ + + + +Canvas test: 2d.layer.global-states.blending.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.blending.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.shadow.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.shadow.w.html new file mode 100644 index 0000000000..d8e20d0479 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.shadow.w.html @@ -0,0 +1,55 @@ + + + + +Canvas test: 2d.layer.global-states.blending.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.blending.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.w.html new file mode 100644 index 0000000000..8964e97713 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.w.html @@ -0,0 +1,51 @@ + + + + +Canvas test: 2d.layer.global-states.blending +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.blending

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.composite-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.composite-expected.html new file mode 100644 index 0000000000..ed7669c4cf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.composite-expected.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.layer.global-states.composite +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.composite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.html new file mode 100644 index 0000000000..84fb4b3d95 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.html @@ -0,0 +1,37 @@ + + + +Canvas test: 2d.layer.global-states.composite +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.composite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow-expected.html new file mode 100644 index 0000000000..b687c27f47 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow-expected.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.layer.global-states.composite.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.composite.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow.html new file mode 100644 index 0000000000..1e3ab4d6a0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow.html @@ -0,0 +1,41 @@ + + + +Canvas test: 2d.layer.global-states.composite.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.composite.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow.w.html new file mode 100644 index 0000000000..7dfb70148b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow.w.html @@ -0,0 +1,55 @@ + + + + +Canvas test: 2d.layer.global-states.composite.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.composite.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.w.html new file mode 100644 index 0000000000..b695871fcd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.w.html @@ -0,0 +1,51 @@ + + + + +Canvas test: 2d.layer.global-states.composite +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.composite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha-expected.html new file mode 100644 index 0000000000..f304700feb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha-expected.html @@ -0,0 +1,50 @@ + + +Canvas test: 2d.layer.global-states.filter.alpha +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.alpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending-expected.html new file mode 100644 index 0000000000..7c91ce4229 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending-expected.html @@ -0,0 +1,51 @@ + + +Canvas test: 2d.layer.global-states.filter.alpha.blending +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.alpha.blending

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.html new file mode 100644 index 0000000000..be6f962b33 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.html @@ -0,0 +1,41 @@ + + + +Canvas test: 2d.layer.global-states.filter.alpha.blending +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.alpha.blending

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow-expected.html new file mode 100644 index 0000000000..62942ffeae --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow-expected.html @@ -0,0 +1,55 @@ + + +Canvas test: 2d.layer.global-states.filter.alpha.blending.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.alpha.blending.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow.html new file mode 100644 index 0000000000..62d98d967c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow.html @@ -0,0 +1,45 @@ + + + +Canvas test: 2d.layer.global-states.filter.alpha.blending.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.alpha.blending.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow.w.html new file mode 100644 index 0000000000..e81efd6b8d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow.w.html @@ -0,0 +1,59 @@ + + + + +Canvas test: 2d.layer.global-states.filter.alpha.blending.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.alpha.blending.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.w.html new file mode 100644 index 0000000000..2b53ad7c1e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.w.html @@ -0,0 +1,55 @@ + + + + +Canvas test: 2d.layer.global-states.filter.alpha.blending +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.alpha.blending

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite-expected.html new file mode 100644 index 0000000000..8e0d98648e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite-expected.html @@ -0,0 +1,51 @@ + + +Canvas test: 2d.layer.global-states.filter.alpha.composite +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.alpha.composite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.html new file mode 100644 index 0000000000..087fea88af --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.html @@ -0,0 +1,41 @@ + + + +Canvas test: 2d.layer.global-states.filter.alpha.composite +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.alpha.composite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow-expected.html new file mode 100644 index 0000000000..a649972546 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow-expected.html @@ -0,0 +1,55 @@ + + +Canvas test: 2d.layer.global-states.filter.alpha.composite.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.alpha.composite.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow.html new file mode 100644 index 0000000000..d067ff2f5e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow.html @@ -0,0 +1,45 @@ + + + +Canvas test: 2d.layer.global-states.filter.alpha.composite.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.alpha.composite.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow.w.html new file mode 100644 index 0000000000..39abc78b17 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow.w.html @@ -0,0 +1,59 @@ + + + + +Canvas test: 2d.layer.global-states.filter.alpha.composite.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.alpha.composite.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.w.html new file mode 100644 index 0000000000..6aa83a3278 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.w.html @@ -0,0 +1,55 @@ + + + + +Canvas test: 2d.layer.global-states.filter.alpha.composite +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.alpha.composite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.html new file mode 100644 index 0000000000..f1d631c25c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.html @@ -0,0 +1,40 @@ + + + +Canvas test: 2d.layer.global-states.filter.alpha +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.alpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow-expected.html new file mode 100644 index 0000000000..169baee29b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow-expected.html @@ -0,0 +1,54 @@ + + +Canvas test: 2d.layer.global-states.filter.alpha.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.alpha.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow.html new file mode 100644 index 0000000000..2548c21181 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow.html @@ -0,0 +1,44 @@ + + + +Canvas test: 2d.layer.global-states.filter.alpha.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.alpha.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow.w.html new file mode 100644 index 0000000000..5e1494422e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow.w.html @@ -0,0 +1,58 @@ + + + + +Canvas test: 2d.layer.global-states.filter.alpha.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.alpha.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.w.html new file mode 100644 index 0000000000..e75d668ad5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.w.html @@ -0,0 +1,54 @@ + + + + +Canvas test: 2d.layer.global-states.filter.alpha +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.alpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending-expected.html new file mode 100644 index 0000000000..f81dcf72dc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending-expected.html @@ -0,0 +1,50 @@ + + +Canvas test: 2d.layer.global-states.filter.blending +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.blending

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.html new file mode 100644 index 0000000000..ce2b046798 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.html @@ -0,0 +1,40 @@ + + + +Canvas test: 2d.layer.global-states.filter.blending +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.blending

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow-expected.html new file mode 100644 index 0000000000..91f3725f8e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow-expected.html @@ -0,0 +1,54 @@ + + +Canvas test: 2d.layer.global-states.filter.blending.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.blending.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow.html new file mode 100644 index 0000000000..d0d429bee3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow.html @@ -0,0 +1,44 @@ + + + +Canvas test: 2d.layer.global-states.filter.blending.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.blending.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow.w.html new file mode 100644 index 0000000000..ce432ea74d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow.w.html @@ -0,0 +1,58 @@ + + + + +Canvas test: 2d.layer.global-states.filter.blending.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.blending.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.w.html new file mode 100644 index 0000000000..bb101cdc0b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.w.html @@ -0,0 +1,54 @@ + + + + +Canvas test: 2d.layer.global-states.filter.blending +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.blending

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite-expected.html new file mode 100644 index 0000000000..97e85a1593 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite-expected.html @@ -0,0 +1,50 @@ + + +Canvas test: 2d.layer.global-states.filter.composite +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.composite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.html new file mode 100644 index 0000000000..32052a1150 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.html @@ -0,0 +1,40 @@ + + + +Canvas test: 2d.layer.global-states.filter.composite +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.composite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow-expected.html new file mode 100644 index 0000000000..4716bb2760 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow-expected.html @@ -0,0 +1,54 @@ + + +Canvas test: 2d.layer.global-states.filter.composite.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.composite.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow.html new file mode 100644 index 0000000000..b5e8b9f843 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow.html @@ -0,0 +1,44 @@ + + + +Canvas test: 2d.layer.global-states.filter.composite.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.composite.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow.w.html new file mode 100644 index 0000000000..894089d88e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow.w.html @@ -0,0 +1,58 @@ + + + + +Canvas test: 2d.layer.global-states.filter.composite.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.composite.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.w.html new file mode 100644 index 0000000000..41ccdaf5c0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.w.html @@ -0,0 +1,54 @@ + + + + +Canvas test: 2d.layer.global-states.filter.composite +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.composite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states-expected.html new file mode 100644 index 0000000000..e56fe0b360 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states-expected.html @@ -0,0 +1,50 @@ + + +Canvas test: 2d.layer.global-states.filter.no-global-states +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.no-global-states

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states.html new file mode 100644 index 0000000000..3effa3ee9d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states.html @@ -0,0 +1,40 @@ + + + +Canvas test: 2d.layer.global-states.filter.no-global-states +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.no-global-states

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states.w.html new file mode 100644 index 0000000000..ec744d7ffe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states.w.html @@ -0,0 +1,54 @@ + + + + +Canvas test: 2d.layer.global-states.filter.no-global-states +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.no-global-states

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow-expected.html new file mode 100644 index 0000000000..13ba2dd4cd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow-expected.html @@ -0,0 +1,53 @@ + + +Canvas test: 2d.layer.global-states.filter.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow.html new file mode 100644 index 0000000000..7bb0ef5e13 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow.html @@ -0,0 +1,43 @@ + + + +Canvas test: 2d.layer.global-states.filter.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow.w.html new file mode 100644 index 0000000000..bc9bd48aad --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow.w.html @@ -0,0 +1,57 @@ + + + + +Canvas test: 2d.layer.global-states.filter.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.filter.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers with filters correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.no-global-states-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.no-global-states-expected.html new file mode 100644 index 0000000000..b91a2ae8b5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.no-global-states-expected.html @@ -0,0 +1,31 @@ + + +Canvas test: 2d.layer.global-states.no-global-states +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.no-global-states

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.no-global-states.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.no-global-states.html new file mode 100644 index 0000000000..c8a9815381 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.no-global-states.html @@ -0,0 +1,37 @@ + + + +Canvas test: 2d.layer.global-states.no-global-states +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.no-global-states

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.no-global-states.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.no-global-states.w.html new file mode 100644 index 0000000000..db03a3fd0c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.no-global-states.w.html @@ -0,0 +1,51 @@ + + + + +Canvas test: 2d.layer.global-states.no-global-states +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.no-global-states

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.shadow-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.shadow-expected.html new file mode 100644 index 0000000000..835e9d420a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.shadow-expected.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.layer.global-states.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.shadow.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.shadow.html new file mode 100644 index 0000000000..ad60e87fb1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.shadow.html @@ -0,0 +1,40 @@ + + + +Canvas test: 2d.layer.global-states.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.shadow.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.shadow.w.html new file mode 100644 index 0000000000..1fc35fd33a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.global-states.shadow.w.html @@ -0,0 +1,54 @@ + + + + +Canvas test: 2d.layer.global-states.shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.global-states.shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layers correctly use global render states.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.beginLayer-reset-endLayer.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.beginLayer-reset-endLayer.html new file mode 100644 index 0000000000..c0b11aa611 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.beginLayer-reset-endLayer.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.layer.invalid-calls.beginLayer-reset-endLayer + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.invalid-calls.beginLayer-reset-endLayer

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Raises exception on beginLayer() + reset() + endLayer().

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.beginLayer-reset-endLayer.worker.js b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.beginLayer-reset-endLayer.worker.js new file mode 100644 index 0000000000..1c147d6f34 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.beginLayer-reset-endLayer.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.invalid-calls.beginLayer-reset-endLayer +// Description:Raises exception on beginLayer() + reset() + endLayer(). +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Raises exception on beginLayer() + reset() + endLayer()."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_dom("INVALID_STATE_ERR", function() { + ctx.beginLayer(); + ctx.reset(); + ctx.endLayer(); + }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.beginLayer-restore.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.beginLayer-restore.html new file mode 100644 index 0000000000..022532b329 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.beginLayer-restore.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.layer.invalid-calls.beginLayer-restore + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.invalid-calls.beginLayer-restore

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Raises exception on beginLayer() + restore().

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.beginLayer-restore.worker.js b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.beginLayer-restore.worker.js new file mode 100644 index 0000000000..1aa86635e6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.beginLayer-restore.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.invalid-calls.beginLayer-restore +// Description:Raises exception on beginLayer() + restore(). +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Raises exception on beginLayer() + restore()."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_dom("INVALID_STATE_ERR", function() { + ctx.beginLayer(); + ctx.restore(); + }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.beginLayer-save-endLayer.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.beginLayer-save-endLayer.html new file mode 100644 index 0000000000..26dd0eee4b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.beginLayer-save-endLayer.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.layer.invalid-calls.beginLayer-save-endLayer + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.invalid-calls.beginLayer-save-endLayer

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Raises exception on beginLayer() + save() + endLayer().

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.beginLayer-save-endLayer.worker.js b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.beginLayer-save-endLayer.worker.js new file mode 100644 index 0000000000..613921c67c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.beginLayer-save-endLayer.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.invalid-calls.beginLayer-save-endLayer +// Description:Raises exception on beginLayer() + save() + endLayer(). +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Raises exception on beginLayer() + save() + endLayer()."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_dom("INVALID_STATE_ERR", function() { + ctx.beginLayer(); + ctx.save(); + ctx.endLayer(); + }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.endLayer.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.endLayer.html new file mode 100644 index 0000000000..440249980a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.endLayer.html @@ -0,0 +1,29 @@ + + +OffscreenCanvas test: 2d.layer.invalid-calls.endLayer + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.invalid-calls.endLayer

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Raises exception on lone endLayer calls.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.endLayer.worker.js b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.endLayer.worker.js new file mode 100644 index 0000000000..b2ba231b9c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.endLayer.worker.js @@ -0,0 +1,24 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.invalid-calls.endLayer +// Description:Raises exception on lone endLayer calls. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Raises exception on lone endLayer calls."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_dom("INVALID_STATE_ERR", function() { + ctx.endLayer(); + }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.save-beginLayer-restore.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.save-beginLayer-restore.html new file mode 100644 index 0000000000..c2b09961ac --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.save-beginLayer-restore.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.layer.invalid-calls.save-beginLayer-restore + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.invalid-calls.save-beginLayer-restore

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Raises exception on save() + beginLayer() + restore().

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.save-beginLayer-restore.worker.js b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.save-beginLayer-restore.worker.js new file mode 100644 index 0000000000..d155379fcb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.save-beginLayer-restore.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.invalid-calls.save-beginLayer-restore +// Description:Raises exception on save() + beginLayer() + restore(). +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Raises exception on save() + beginLayer() + restore()."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_dom("INVALID_STATE_ERR", function() { + ctx.save(); + ctx.beginLayer(); + ctx.restore(); + }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.save-endLayer.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.save-endLayer.html new file mode 100644 index 0000000000..01b62d1e85 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.save-endLayer.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.layer.invalid-calls.save-endLayer + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.invalid-calls.save-endLayer

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Raises exception on save() + endLayer().

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.save-endLayer.worker.js b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.save-endLayer.worker.js new file mode 100644 index 0000000000..353c1b00cd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.invalid-calls.save-endLayer.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.invalid-calls.save-endLayer +// Description:Raises exception on save() + endLayer(). +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Raises exception on save() + endLayer()."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_dom("INVALID_STATE_ERR", function() { + ctx.save(); + ctx.endLayer(); + }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.layer-rendering-state-reset-in-layer.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.layer-rendering-state-reset-in-layer.html new file mode 100644 index 0000000000..867553b45e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.layer-rendering-state-reset-in-layer.html @@ -0,0 +1,57 @@ + + +OffscreenCanvas test: 2d.layer.layer-rendering-state-reset-in-layer + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.layer-rendering-state-reset-in-layer

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Tests that layers ignore the global context filter.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.layer-rendering-state-reset-in-layer.worker.js b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.layer-rendering-state-reset-in-layer.worker.js new file mode 100644 index 0000000000..5c2bb73e8f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.layer-rendering-state-reset-in-layer.worker.js @@ -0,0 +1,52 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.layer-rendering-state-reset-in-layer +// Description:Tests that layers ignore the global context filter. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Tests that layers ignore the global context filter."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.globalAlpha = 0.5; + ctx.globalCompositeOperation = 'xor'; + ctx.shadowColor = '#0000ff'; + ctx.shadowOffsetX = 10; + ctx.shadowOffsetY = 20; + ctx.shadowBlur = 30; + + _assertSame(ctx.globalAlpha, 0.5, "ctx.globalAlpha", "0.5"); + _assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'"); + _assertSame(ctx.shadowColor, '#0000ff', "ctx.shadowColor", "'#0000ff'"); + _assertSame(ctx.shadowOffsetX, 10, "ctx.shadowOffsetX", "10"); + _assertSame(ctx.shadowOffsetY, 20, "ctx.shadowOffsetY", "20"); + _assertSame(ctx.shadowBlur, 30, "ctx.shadowBlur", "30"); + + ctx.beginLayer(); + + _assertSame(ctx.globalAlpha, 1.0, "ctx.globalAlpha", "1.0"); + _assertSame(ctx.globalCompositeOperation, 'source-over', "ctx.globalCompositeOperation", "'source-over'"); + _assertSame(ctx.shadowColor, 'rgba(0, 0, 0, 0)', "ctx.shadowColor", "'rgba(0, 0, 0, 0)'"); + _assertSame(ctx.shadowOffsetX, 0, "ctx.shadowOffsetX", "0"); + _assertSame(ctx.shadowOffsetY, 0, "ctx.shadowOffsetY", "0"); + _assertSame(ctx.shadowBlur, 0, "ctx.shadowBlur", "0"); + + ctx.endLayer(); + + _assertSame(ctx.globalAlpha, 0.5, "ctx.globalAlpha", "0.5"); + _assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'"); + _assertSame(ctx.shadowColor, '#0000ff', "ctx.shadowColor", "'#0000ff'"); + _assertSame(ctx.shadowOffsetX, 10, "ctx.shadowOffsetX", "10"); + _assertSame(ctx.shadowOffsetY, 20, "ctx.shadowOffsetY", "20"); + _assertSame(ctx.shadowBlur, 30, "ctx.shadowBlur", "30"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.convertToBlob.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.convertToBlob.html new file mode 100644 index 0000000000..0b3854c31d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.convertToBlob.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.layer.malformed-operations-with-promises.convertToBlob + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.malformed-operations-with-promises.convertToBlob

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Check that exceptions are thrown for operations that are malformed while layers are open.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.convertToBlob.worker.js b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.convertToBlob.worker.js new file mode 100644 index 0000000000..be0f4f2cde --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.convertToBlob.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.malformed-operations-with-promises.convertToBlob +// Description:Check that exceptions are thrown for operations that are malformed while layers are open. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(200, 200); + var ctx = canvas.getContext('2d'); + + // Shouldn't throw on its own. + await canvas.convertToBlob(); + // Make sure the exception isn't caused by calling the function twice. + await canvas.convertToBlob(); + // Calling again inside a layer should throw. + ctx.beginLayer(); + await promise_rejects_dom(t, 'InvalidStateError', canvas.convertToBlob()); + t.done(); +}, "Check that exceptions are thrown for operations that are malformed while layers are open."); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.createImageBitmap.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.createImageBitmap.html new file mode 100644 index 0000000000..085554d9f5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.createImageBitmap.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.layer.malformed-operations-with-promises.createImageBitmap + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.malformed-operations-with-promises.createImageBitmap

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Check that exceptions are thrown for operations that are malformed while layers are open.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.createImageBitmap.worker.js b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.createImageBitmap.worker.js new file mode 100644 index 0000000000..b286b7a9e7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.createImageBitmap.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.malformed-operations-with-promises.createImageBitmap +// Description:Check that exceptions are thrown for operations that are malformed while layers are open. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(200, 200); + var ctx = canvas.getContext('2d'); + + // Shouldn't throw on its own. + await createImageBitmap(canvas); + // Make sure the exception isn't caused by calling the function twice. + await createImageBitmap(canvas); + // Calling again inside a layer should throw. + ctx.beginLayer(); + await promise_rejects_dom(t, 'InvalidStateError', createImageBitmap(canvas)); + t.done(); +}, "Check that exceptions are thrown for operations that are malformed while layers are open."); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.createPattern.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.createPattern.html new file mode 100644 index 0000000000..a206e64ceb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.createPattern.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.layer.malformed-operations.createPattern + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.malformed-operations.createPattern

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Check that exceptions are thrown for operations that are malformed while layers are open.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.createPattern.worker.js b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.createPattern.worker.js new file mode 100644 index 0000000000..bcb42cba87 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.createPattern.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.malformed-operations.createPattern +// Description:Check that exceptions are thrown for operations that are malformed while layers are open. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Check that exceptions are thrown for operations that are malformed while layers are open."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(200, 200); + var ctx = canvas.getContext('2d'); + + // Shouldn't throw on its own. + ctx.createPattern(canvas, 'repeat'); + // Make sure the exception isn't caused by calling the function twice. + ctx.createPattern(canvas, 'repeat'); + // Calling again inside a layer should throw. + ctx.beginLayer(); + assert_throws_dom("InvalidStateError", + () => ctx.createPattern(canvas, 'repeat')); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.drawImage.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.drawImage.html new file mode 100644 index 0000000000..e6a9872100 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.drawImage.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.layer.malformed-operations.drawImage + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.malformed-operations.drawImage

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Check that exceptions are thrown for operations that are malformed while layers are open.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.drawImage.worker.js b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.drawImage.worker.js new file mode 100644 index 0000000000..b66cdee62e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.drawImage.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.malformed-operations.drawImage +// Description:Check that exceptions are thrown for operations that are malformed while layers are open. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Check that exceptions are thrown for operations that are malformed while layers are open."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(200, 200); + var ctx = canvas.getContext('2d'); + + const canvas2 = new OffscreenCanvas(200, 200); + const ctx2 = canvas2.getContext('2d'); + // Shouldn't throw on its own. + ctx2.drawImage(canvas, 0, 0); + // Make sure the exception isn't caused by calling the function twice. + ctx2.drawImage(canvas, 0, 0); + // Calling again inside a layer should throw. + ctx.beginLayer(); + assert_throws_dom("InvalidStateError", + () => ctx2.drawImage(canvas, 0, 0)); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.getImageData.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.getImageData.html new file mode 100644 index 0000000000..87bc8c6ede --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.getImageData.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.layer.malformed-operations.getImageData + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.malformed-operations.getImageData

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Check that exceptions are thrown for operations that are malformed while layers are open.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.getImageData.worker.js b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.getImageData.worker.js new file mode 100644 index 0000000000..6a1a16fccb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.getImageData.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.malformed-operations.getImageData +// Description:Check that exceptions are thrown for operations that are malformed while layers are open. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Check that exceptions are thrown for operations that are malformed while layers are open."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(200, 200); + var ctx = canvas.getContext('2d'); + + // Shouldn't throw on its own. + ctx.getImageData(0, 0, 200, 200); + // Make sure the exception isn't caused by calling the function twice. + ctx.getImageData(0, 0, 200, 200); + // Calling again inside a layer should throw. + ctx.beginLayer(); + assert_throws_dom("InvalidStateError", + () => ctx.getImageData(0, 0, 200, 200)); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.putImageData.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.putImageData.html new file mode 100644 index 0000000000..e8059076bb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.putImageData.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.layer.malformed-operations.putImageData + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.malformed-operations.putImageData

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Check that exceptions are thrown for operations that are malformed while layers are open.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.putImageData.worker.js b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.putImageData.worker.js new file mode 100644 index 0000000000..8810c3a73c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.putImageData.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.malformed-operations.putImageData +// Description:Check that exceptions are thrown for operations that are malformed while layers are open. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Check that exceptions are thrown for operations that are malformed while layers are open."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(200, 200); + var ctx = canvas.getContext('2d'); + + const canvas2 = new OffscreenCanvas(200, 200); + const ctx2 = canvas2.getContext('2d') + const data = ctx2.getImageData(0, 0, 1, 1); + // Shouldn't throw on its own. + ctx.putImageData(data, 0, 0); + // Make sure the exception isn't caused by calling the function twice. + ctx.putImageData(data, 0, 0); + // Calling again inside a layer should throw. + ctx.beginLayer(); + assert_throws_dom("InvalidStateError", + () => ctx.putImageData(data, 0, 0)); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.transferToImageBitmap.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.transferToImageBitmap.html new file mode 100644 index 0000000000..79c216421f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.transferToImageBitmap.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.layer.malformed-operations.transferToImageBitmap + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.malformed-operations.transferToImageBitmap

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Check that exceptions are thrown for operations that are malformed while layers are open.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.transferToImageBitmap.worker.js b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.transferToImageBitmap.worker.js new file mode 100644 index 0000000000..be0b43665a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.transferToImageBitmap.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.malformed-operations.transferToImageBitmap +// Description:Check that exceptions are thrown for operations that are malformed while layers are open. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Check that exceptions are thrown for operations that are malformed while layers are open."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(200, 200); + var ctx = canvas.getContext('2d'); + + // Shouldn't throw on its own. + canvas.transferToImageBitmap(); + // Make sure the exception isn't caused by calling the function twice. + canvas.transferToImageBitmap(); + // Calling again inside a layer should throw. + ctx.beginLayer(); + assert_throws_dom("InvalidStateError", + () => canvas.transferToImageBitmap()); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.nested-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.nested-expected.html new file mode 100644 index 0000000000..65525d4d6a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.nested-expected.html @@ -0,0 +1,37 @@ + + +Canvas test: 2d.layer.nested +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.nested

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Tests nested canvas layers.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.nested-filters-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.nested-filters-expected.html new file mode 100644 index 0000000000..8b53e2dc76 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.nested-filters-expected.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.layer.nested-filters +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.nested-filters

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that nested layers work properly when both apply filters.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.nested-filters.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.nested-filters.html new file mode 100644 index 0000000000..adf99bacbe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.nested-filters.html @@ -0,0 +1,36 @@ + + + +Canvas test: 2d.layer.nested-filters +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.nested-filters

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that nested layers work properly when both apply filters.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.nested-filters.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.nested-filters.w.html new file mode 100644 index 0000000000..0616fecfd9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.nested-filters.w.html @@ -0,0 +1,50 @@ + + + + +Canvas test: 2d.layer.nested-filters +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.nested-filters

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that nested layers work properly when both apply filters.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.nested.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.nested.html new file mode 100644 index 0000000000..9e5b7d5826 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.nested.html @@ -0,0 +1,39 @@ + + + +Canvas test: 2d.layer.nested +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.nested

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Tests nested canvas layers.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.nested.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.nested.w.html new file mode 100644 index 0000000000..99e7390609 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.nested.w.html @@ -0,0 +1,53 @@ + + + + +Canvas test: 2d.layer.nested +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.nested

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Tests nested canvas layers.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.opaque-canvas-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.opaque-canvas-expected.html new file mode 100644 index 0000000000..89c85de1e5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.opaque-canvas-expected.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.layer.opaque-canvas +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.opaque-canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layer blending works inside opaque canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.opaque-canvas.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.opaque-canvas.html new file mode 100644 index 0000000000..f9759abebe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.opaque-canvas.html @@ -0,0 +1,36 @@ + + + +Canvas test: 2d.layer.opaque-canvas +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.opaque-canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layer blending works inside opaque canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.opaque-canvas.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.opaque-canvas.w.html new file mode 100644 index 0000000000..ff5ec19418 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.opaque-canvas.w.html @@ -0,0 +1,50 @@ + + + + +Canvas test: 2d.layer.opaque-canvas +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.opaque-canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that layer blending works inside opaque canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.reset-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.reset-expected.html new file mode 100644 index 0000000000..93131dca9c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.reset-expected.html @@ -0,0 +1,14 @@ + + +Canvas test: 2d.layer.reset +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that reset discards any pending layers.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.reset.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.reset.html new file mode 100644 index 0000000000..3254c0a048 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.reset.html @@ -0,0 +1,38 @@ + + + +Canvas test: 2d.layer.reset +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that reset discards any pending layers.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.reset.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.reset.w.html new file mode 100644 index 0000000000..09bd6451bd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.reset.w.html @@ -0,0 +1,52 @@ + + + + +Canvas test: 2d.layer.reset +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks that reset discards any pending layers.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.restore-style-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.restore-style-expected.html new file mode 100644 index 0000000000..1d0ac3558d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.restore-style-expected.html @@ -0,0 +1,24 @@ + + +Canvas test: 2d.layer.restore-style +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.restore-style

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test that ensure layers restores style values upon endLayer.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.restore-style.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.restore-style.html new file mode 100644 index 0000000000..a3593cd2a8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.restore-style.html @@ -0,0 +1,28 @@ + + + + +Canvas test: 2d.layer.restore-style +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.restore-style

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test that ensure layers restores style values upon endLayer.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.restore-style.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.restore-style.w.html new file mode 100644 index 0000000000..a66fc2bc59 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.restore-style.w.html @@ -0,0 +1,42 @@ + + + + + +Canvas test: 2d.layer.restore-style +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.restore-style

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test that ensure layers restores style values upon endLayer.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.several-complex-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.several-complex-expected.html new file mode 100644 index 0000000000..ef46f69e2a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.several-complex-expected.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.layer.several-complex +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.several-complex

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test to ensure beginlayer works for filter, alpha and shadow, even with consecutive layers.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.several-complex.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.several-complex.html new file mode 100644 index 0000000000..e30f1d2fa0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.several-complex.html @@ -0,0 +1,37 @@ + + + + +Canvas test: 2d.layer.several-complex +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.several-complex

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test to ensure beginlayer works for filter, alpha and shadow, even with consecutive layers.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.several-complex.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.several-complex.w.html new file mode 100644 index 0000000000..e00de63507 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.several-complex.w.html @@ -0,0 +1,51 @@ + + + + + +Canvas test: 2d.layer.several-complex +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.several-complex

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test to ensure beginlayer works for filter, alpha and shadow, even with consecutive layers.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.long-distance-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.long-distance-expected.html new file mode 100644 index 0000000000..cc10684a9b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.long-distance-expected.html @@ -0,0 +1,19 @@ + + +Canvas test: 2d.layer.shadow-from-outside-canvas.long-distance +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.shadow-from-outside-canvas.long-distance

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks shadow produced by object drawn outside the canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.long-distance-with-clipping-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.long-distance-with-clipping-expected.html new file mode 100644 index 0000000000..377dd55ef6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.long-distance-with-clipping-expected.html @@ -0,0 +1,21 @@ + + +Canvas test: 2d.layer.shadow-from-outside-canvas.long-distance-with-clipping +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.shadow-from-outside-canvas.long-distance-with-clipping

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks shadow produced by object drawn outside the canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.long-distance-with-clipping.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.long-distance-with-clipping.html new file mode 100644 index 0000000000..98262f53b6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.long-distance-with-clipping.html @@ -0,0 +1,33 @@ + + + +Canvas test: 2d.layer.shadow-from-outside-canvas.long-distance-with-clipping +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.shadow-from-outside-canvas.long-distance-with-clipping

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks shadow produced by object drawn outside the canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.long-distance-with-clipping.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.long-distance-with-clipping.w.html new file mode 100644 index 0000000000..90b4332f94 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.long-distance-with-clipping.w.html @@ -0,0 +1,47 @@ + + + + +Canvas test: 2d.layer.shadow-from-outside-canvas.long-distance-with-clipping +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.shadow-from-outside-canvas.long-distance-with-clipping

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks shadow produced by object drawn outside the canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.long-distance.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.long-distance.html new file mode 100644 index 0000000000..eea9b5dc25 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.long-distance.html @@ -0,0 +1,31 @@ + + + +Canvas test: 2d.layer.shadow-from-outside-canvas.long-distance +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.shadow-from-outside-canvas.long-distance

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks shadow produced by object drawn outside the canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.long-distance.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.long-distance.w.html new file mode 100644 index 0000000000..e4422558cf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.long-distance.w.html @@ -0,0 +1,45 @@ + + + + +Canvas test: 2d.layer.shadow-from-outside-canvas.long-distance +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.shadow-from-outside-canvas.long-distance

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks shadow produced by object drawn outside the canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.short-distance-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.short-distance-expected.html new file mode 100644 index 0000000000..8980708dd1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.short-distance-expected.html @@ -0,0 +1,19 @@ + + +Canvas test: 2d.layer.shadow-from-outside-canvas.short-distance +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.shadow-from-outside-canvas.short-distance

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks shadow produced by object drawn outside the canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.short-distance-with-clipping-expected.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.short-distance-with-clipping-expected.html new file mode 100644 index 0000000000..024fc8c9a4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.short-distance-with-clipping-expected.html @@ -0,0 +1,21 @@ + + +Canvas test: 2d.layer.shadow-from-outside-canvas.short-distance-with-clipping +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.shadow-from-outside-canvas.short-distance-with-clipping

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks shadow produced by object drawn outside the canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.short-distance-with-clipping.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.short-distance-with-clipping.html new file mode 100644 index 0000000000..d5f5b0c8ff --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.short-distance-with-clipping.html @@ -0,0 +1,33 @@ + + + +Canvas test: 2d.layer.shadow-from-outside-canvas.short-distance-with-clipping +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.shadow-from-outside-canvas.short-distance-with-clipping

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks shadow produced by object drawn outside the canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.short-distance-with-clipping.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.short-distance-with-clipping.w.html new file mode 100644 index 0000000000..acbf09edec --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.short-distance-with-clipping.w.html @@ -0,0 +1,47 @@ + + + + +Canvas test: 2d.layer.shadow-from-outside-canvas.short-distance-with-clipping +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.shadow-from-outside-canvas.short-distance-with-clipping

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks shadow produced by object drawn outside the canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.short-distance.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.short-distance.html new file mode 100644 index 0000000000..a1c4689f7e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.short-distance.html @@ -0,0 +1,31 @@ + + + +Canvas test: 2d.layer.shadow-from-outside-canvas.short-distance +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.shadow-from-outside-canvas.short-distance

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks shadow produced by object drawn outside the canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.short-distance.w.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.short-distance.w.html new file mode 100644 index 0000000000..2e39091f3d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.shadow-from-outside-canvas.short-distance.w.html @@ -0,0 +1,45 @@ + + + + +Canvas test: 2d.layer.shadow-from-outside-canvas.short-distance +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.shadow-from-outside-canvas.short-distance

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Checks shadow produced by object drawn outside the canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.beginLayer-endLayer.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.beginLayer-endLayer.html new file mode 100644 index 0000000000..0a6e195ca8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.beginLayer-endLayer.html @@ -0,0 +1,28 @@ + + +OffscreenCanvas test: 2d.layer.valid-calls.beginLayer-endLayer + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.valid-calls.beginLayer-endLayer

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No exception raised on beginLayer() + endLayer().

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.beginLayer-endLayer.worker.js b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.beginLayer-endLayer.worker.js new file mode 100644 index 0000000000..a10bcd98b7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.beginLayer-endLayer.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.valid-calls.beginLayer-endLayer +// Description:No exception raised on beginLayer() + endLayer(). +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("No exception raised on beginLayer() + endLayer()."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.beginLayer(); + ctx.save(); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.beginLayer-save.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.beginLayer-save.html new file mode 100644 index 0000000000..12abcc5270 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.beginLayer-save.html @@ -0,0 +1,28 @@ + + +OffscreenCanvas test: 2d.layer.valid-calls.beginLayer-save + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.valid-calls.beginLayer-save

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No exception raised on beginLayer() + save().

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.beginLayer-save.worker.js b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.beginLayer-save.worker.js new file mode 100644 index 0000000000..03fbeeb4f4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.beginLayer-save.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.valid-calls.beginLayer-save +// Description:No exception raised on beginLayer() + save(). +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("No exception raised on beginLayer() + save()."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.beginLayer(); + ctx.save(); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.beginLayer.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.beginLayer.html new file mode 100644 index 0000000000..2178138e8d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.beginLayer.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.layer.valid-calls.beginLayer + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.valid-calls.beginLayer

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No exception raised on lone beginLayer() calls.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.beginLayer.worker.js b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.beginLayer.worker.js new file mode 100644 index 0000000000..e64be136d7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.beginLayer.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.valid-calls.beginLayer +// Description:No exception raised on lone beginLayer() calls. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("No exception raised on lone beginLayer() calls."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.beginLayer(); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.restore.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.restore.html new file mode 100644 index 0000000000..156dd5abbd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.restore.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.layer.valid-calls.restore + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.valid-calls.restore

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No exception raised on lone restore() calls.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.restore.worker.js b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.restore.worker.js new file mode 100644 index 0000000000..7417d12abe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.restore.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.valid-calls.restore +// Description:No exception raised on lone restore() calls. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("No exception raised on lone restore() calls."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.restore(); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save-beginLayer.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save-beginLayer.html new file mode 100644 index 0000000000..afe735764e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save-beginLayer.html @@ -0,0 +1,28 @@ + + +OffscreenCanvas test: 2d.layer.valid-calls.save-beginLayer + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.valid-calls.save-beginLayer

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No exception raised on save() + beginLayer().

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save-beginLayer.worker.js b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save-beginLayer.worker.js new file mode 100644 index 0000000000..773ba77a15 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save-beginLayer.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.valid-calls.save-beginLayer +// Description:No exception raised on save() + beginLayer(). +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("No exception raised on save() + beginLayer()."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.save(); + ctx.beginLayer(); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save.html new file mode 100644 index 0000000000..2b2de23bb8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.layer.valid-calls.save + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.valid-calls.save

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No exception raised on lone save() calls.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save.worker.js b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save.worker.js new file mode 100644 index 0000000000..5bbf0386fe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.valid-calls.save +// Description:No exception raised on lone save() calls. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("No exception raised on lone save() calls."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.save(); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save_reset_restore.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save_reset_restore.html new file mode 100644 index 0000000000..ec5aa6455e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save_reset_restore.html @@ -0,0 +1,29 @@ + + +OffscreenCanvas test: 2d.layer.valid-calls.save_reset_restore + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.valid-calls.save_reset_restore

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No exception raised on save() + reset() + restore().

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save_reset_restore.worker.js b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save_reset_restore.worker.js new file mode 100644 index 0000000000..3636c94357 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save_reset_restore.worker.js @@ -0,0 +1,24 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.valid-calls.save_reset_restore +// Description:No exception raised on save() + reset() + restore(). +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("No exception raised on save() + reset() + restore()."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.save(); + ctx.reset(); + ctx.restore(); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save_restore.html b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save_restore.html new file mode 100644 index 0000000000..1682bca91c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save_restore.html @@ -0,0 +1,28 @@ + + +OffscreenCanvas test: 2d.layer.valid-calls.save_restore + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.layer.valid-calls.save_restore

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No exception raised on save() + restore().

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save_restore.worker.js b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save_restore.worker.js new file mode 100644 index 0000000000..8607722df7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/layers/2d.layer.valid-calls.save_restore.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.valid-calls.save_restore +// Description:No exception raised on save() + restore(). +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("No exception raised on save() + restore()."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.save(); + ctx.restore(); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.butt.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.butt.html new file mode 100644 index 0000000000..145e145cb4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.butt.html @@ -0,0 +1,61 @@ + + +OffscreenCanvas test: 2d.line.cap.butt + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.cap.butt

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  lineCap 'butt' is rendered correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.butt.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.butt.worker.js new file mode 100644 index 0000000000..127393790c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.butt.worker.js @@ -0,0 +1,56 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.cap.butt +// Description:lineCap 'butt' is rendered correctly +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("lineCap 'butt' is rendered correctly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineCap = 'butt'; + ctx.lineWidth = 20; + + ctx.fillStyle = '#f00'; + ctx.strokeStyle = '#0f0'; + ctx.fillRect(15, 15, 20, 20); + ctx.beginPath(); + ctx.moveTo(25, 15); + ctx.lineTo(25, 35); + ctx.stroke(); + + ctx.fillStyle = '#0f0'; + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(75, 15); + ctx.lineTo(75, 35); + ctx.stroke(); + ctx.fillRect(65, 15, 20, 20); + + _assertPixel(canvas, 25,14, 0,255,0,255); + _assertPixel(canvas, 25,15, 0,255,0,255); + _assertPixel(canvas, 25,16, 0,255,0,255); + _assertPixel(canvas, 25,34, 0,255,0,255); + _assertPixel(canvas, 25,35, 0,255,0,255); + _assertPixel(canvas, 25,36, 0,255,0,255); + + _assertPixel(canvas, 75,14, 0,255,0,255); + _assertPixel(canvas, 75,15, 0,255,0,255); + _assertPixel(canvas, 75,16, 0,255,0,255); + _assertPixel(canvas, 75,34, 0,255,0,255); + _assertPixel(canvas, 75,35, 0,255,0,255); + _assertPixel(canvas, 75,36, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.closed.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.closed.html new file mode 100644 index 0000000000..edddeb08e7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.closed.html @@ -0,0 +1,46 @@ + + +OffscreenCanvas test: 2d.line.cap.closed + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.cap.closed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Line caps are not drawn at the corners of an unclosed rectangle

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.closed.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.closed.worker.js new file mode 100644 index 0000000000..b8357316e4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.closed.worker.js @@ -0,0 +1,41 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.cap.closed +// Description:Line caps are not drawn at the corners of an unclosed rectangle +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Line caps are not drawn at the corners of an unclosed rectangle"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.strokeStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineJoin = 'bevel'; + ctx.lineCap = 'square'; + ctx.lineWidth = 400; + + ctx.beginPath(); + ctx.moveTo(200, 200); + ctx.lineTo(200, 1000); + ctx.lineTo(1000, 1000); + ctx.lineTo(1000, 200); + ctx.closePath(); + ctx.stroke(); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 48,1, 0,255,0,255); + _assertPixel(canvas, 48,48, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.invalid.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.invalid.html new file mode 100644 index 0000000000..2054bbc515 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.invalid.html @@ -0,0 +1,52 @@ + + +OffscreenCanvas test: 2d.line.cap.invalid + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.cap.invalid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Setting lineCap to invalid values is ignored

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.invalid.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.invalid.worker.js new file mode 100644 index 0000000000..813ceb7f66 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.invalid.worker.js @@ -0,0 +1,47 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.cap.invalid +// Description:Setting lineCap to invalid values is ignored +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Setting lineCap to invalid values is ignored"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.lineCap = 'butt' + _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'"); + + ctx.lineCap = 'butt'; + ctx.lineCap = 'invalid'; + _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'"); + + ctx.lineCap = 'butt'; + ctx.lineCap = 'ROUND'; + _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'"); + + ctx.lineCap = 'butt'; + ctx.lineCap = 'round\0'; + _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'"); + + ctx.lineCap = 'butt'; + ctx.lineCap = 'round '; + _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'"); + + ctx.lineCap = 'butt'; + ctx.lineCap = ""; + _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'"); + + ctx.lineCap = 'butt'; + ctx.lineCap = 'bevel'; + _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.open.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.open.html new file mode 100644 index 0000000000..f26fbc686c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.open.html @@ -0,0 +1,46 @@ + + +OffscreenCanvas test: 2d.line.cap.open + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.cap.open

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Line caps are drawn at the corners of an unclosed rectangle

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.open.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.open.worker.js new file mode 100644 index 0000000000..169010ac2a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.open.worker.js @@ -0,0 +1,41 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.cap.open +// Description:Line caps are drawn at the corners of an unclosed rectangle +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Line caps are drawn at the corners of an unclosed rectangle"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.strokeStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineJoin = 'bevel'; + ctx.lineCap = 'square'; + ctx.lineWidth = 400; + + ctx.beginPath(); + ctx.moveTo(200, 200); + ctx.lineTo(200, 1000); + ctx.lineTo(1000, 1000); + ctx.lineTo(1000, 200); + ctx.lineTo(200, 200); + ctx.stroke(); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 48,1, 0,255,0,255); + _assertPixel(canvas, 48,48, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.round.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.round.html new file mode 100644 index 0000000000..31f5ba5423 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.round.html @@ -0,0 +1,77 @@ + + +OffscreenCanvas test: 2d.line.cap.round + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.cap.round

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  lineCap 'round' is rendered correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.round.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.round.worker.js new file mode 100644 index 0000000000..a8d9c1b92f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.round.worker.js @@ -0,0 +1,72 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.cap.round +// Description:lineCap 'round' is rendered correctly +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("lineCap 'round' is rendered correctly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var tol = 1; // tolerance to avoid antialiasing artifacts + + ctx.lineCap = 'round'; + ctx.lineWidth = 20; + + + ctx.fillStyle = '#f00'; + ctx.strokeStyle = '#0f0'; + + ctx.beginPath(); + ctx.moveTo(35-tol, 15); + ctx.arc(25, 15, 10-tol, 0, Math.PI, true); + ctx.arc(25, 35, 10-tol, Math.PI, 0, true); + ctx.fill(); + + ctx.beginPath(); + ctx.moveTo(25, 15); + ctx.lineTo(25, 35); + ctx.stroke(); + + + ctx.fillStyle = '#0f0'; + ctx.strokeStyle = '#f00'; + + ctx.beginPath(); + ctx.moveTo(75, 15); + ctx.lineTo(75, 35); + ctx.stroke(); + + ctx.beginPath(); + ctx.moveTo(85+tol, 15); + ctx.arc(75, 15, 10+tol, 0, Math.PI, true); + ctx.arc(75, 35, 10+tol, Math.PI, 0, true); + ctx.fill(); + + _assertPixel(canvas, 17,6, 0,255,0,255); + _assertPixel(canvas, 25,6, 0,255,0,255); + _assertPixel(canvas, 32,6, 0,255,0,255); + _assertPixel(canvas, 17,43, 0,255,0,255); + _assertPixel(canvas, 25,43, 0,255,0,255); + _assertPixel(canvas, 32,43, 0,255,0,255); + + _assertPixel(canvas, 67,6, 0,255,0,255); + _assertPixel(canvas, 75,6, 0,255,0,255); + _assertPixel(canvas, 82,6, 0,255,0,255); + _assertPixel(canvas, 67,43, 0,255,0,255); + _assertPixel(canvas, 75,43, 0,255,0,255); + _assertPixel(canvas, 82,43, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.square.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.square.html new file mode 100644 index 0000000000..0d2988877d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.square.html @@ -0,0 +1,61 @@ + + +OffscreenCanvas test: 2d.line.cap.square + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.cap.square

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  lineCap 'square' is rendered correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.square.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.square.worker.js new file mode 100644 index 0000000000..6776e9891b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.square.worker.js @@ -0,0 +1,56 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.cap.square +// Description:lineCap 'square' is rendered correctly +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("lineCap 'square' is rendered correctly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineCap = 'square'; + ctx.lineWidth = 20; + + ctx.fillStyle = '#f00'; + ctx.strokeStyle = '#0f0'; + ctx.fillRect(15, 5, 20, 40); + ctx.beginPath(); + ctx.moveTo(25, 15); + ctx.lineTo(25, 35); + ctx.stroke(); + + ctx.fillStyle = '#0f0'; + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(75, 15); + ctx.lineTo(75, 35); + ctx.stroke(); + ctx.fillRect(65, 5, 20, 40); + + _assertPixel(canvas, 25,4, 0,255,0,255); + _assertPixel(canvas, 25,5, 0,255,0,255); + _assertPixel(canvas, 25,6, 0,255,0,255); + _assertPixel(canvas, 25,44, 0,255,0,255); + _assertPixel(canvas, 25,45, 0,255,0,255); + _assertPixel(canvas, 25,46, 0,255,0,255); + + _assertPixel(canvas, 75,4, 0,255,0,255); + _assertPixel(canvas, 75,5, 0,255,0,255); + _assertPixel(canvas, 75,6, 0,255,0,255); + _assertPixel(canvas, 75,44, 0,255,0,255); + _assertPixel(canvas, 75,45, 0,255,0,255); + _assertPixel(canvas, 75,46, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.valid.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.valid.html new file mode 100644 index 0000000000..6334891f56 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.valid.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.line.cap.valid + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.cap.valid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Setting lineCap to valid values works

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.valid.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.valid.worker.js new file mode 100644 index 0000000000..0010fd61dd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cap.valid.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.cap.valid +// Description:Setting lineCap to valid values works +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Setting lineCap to valid values works"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.lineCap = 'butt' + _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'"); + + ctx.lineCap = 'round'; + _assertSame(ctx.lineCap, 'round', "ctx.lineCap", "'round'"); + + ctx.lineCap = 'square'; + _assertSame(ctx.lineCap, 'square', "ctx.lineCap", "'square'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cross.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cross.html new file mode 100644 index 0000000000..83e2a758fd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cross.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.line.cross + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.cross

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cross.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cross.worker.js new file mode 100644 index 0000000000..5dc95c25f1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.cross.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.cross +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineWidth = 200; + ctx.lineJoin = 'bevel'; + + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(110, 50); + ctx.lineTo(110, 60); + ctx.lineTo(100, 60); + ctx.stroke(); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 48,1, 0,255,0,255); + _assertPixel(canvas, 48,48, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.defaults.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.defaults.html new file mode 100644 index 0000000000..7f50257288 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.defaults.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.line.defaults + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.defaults

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.defaults.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.defaults.worker.js new file mode 100644 index 0000000000..1a59b81027 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.defaults.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.defaults +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.lineWidth, 1, "ctx.lineWidth", "1"); + _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'"); + _assertSame(ctx.lineJoin, 'miter', "ctx.lineJoin", "'miter'"); + _assertSame(ctx.miterLimit, 10, "ctx.miterLimit", "10"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.fill.noop.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.fill.noop.html new file mode 100644 index 0000000000..0d1aa4be30 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.fill.noop.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.line.fill.noop + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.fill.noop

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Filling a line draws nothing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.fill.noop.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.fill.noop.worker.js new file mode 100644 index 0000000000..e3e8c14b3f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.fill.noop.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.fill.noop +// Description:Filling a line draws nothing +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Filling a line draws nothing"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.lineWidth = 20; + ctx.beginPath(); + ctx.moveTo(10, 20); + ctx.lineTo(90, 30); + ctx.fill(); + _assertPixel(canvas, 50,24, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 50,26, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.invalid.strokestyle.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.invalid.strokestyle.html new file mode 100644 index 0000000000..fa67e3b3f8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.invalid.strokestyle.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.line.invalid.strokestyle + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.invalid.strokestyle

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify correct behavior of canvas on an invalid strokeStyle()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.invalid.strokestyle.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.invalid.strokestyle.worker.js new file mode 100644 index 0000000000..5726b1835a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.invalid.strokestyle.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.invalid.strokestyle +// Description:Verify correct behavior of canvas on an invalid strokeStyle() +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify correct behavior of canvas on an invalid strokeStyle()"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.strokeStyle = 'rgb(0, 255, 0)'; + ctx.strokeStyle = 'nonsense'; + ctx.lineWidth = 200; + ctx.moveTo(0,100); + ctx.lineTo(200,100); + ctx.stroke(); + var imageData = ctx.getImageData(0, 0, 200, 200); + var imgdata = imageData.data; + _assert(imgdata[4] == 0, "imgdata[\""+(4)+"\"] == 0"); + _assert(imgdata[5] == 255, "imgdata[\""+(5)+"\"] == 255"); + _assert(imgdata[6] == 0, "imgdata[\""+(6)+"\"] == 0"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.bevel.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.bevel.html new file mode 100644 index 0000000000..70e3896281 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.bevel.html @@ -0,0 +1,80 @@ + + +OffscreenCanvas test: 2d.line.join.bevel + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.join.bevel

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  lineJoin 'bevel' is rendered correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.bevel.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.bevel.worker.js new file mode 100644 index 0000000000..efd884debe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.bevel.worker.js @@ -0,0 +1,75 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.join.bevel +// Description:lineJoin 'bevel' is rendered correctly +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("lineJoin 'bevel' is rendered correctly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var tol = 1; // tolerance to avoid antialiasing artifacts + + ctx.lineJoin = 'bevel'; + ctx.lineWidth = 20; + + ctx.fillStyle = '#f00'; + ctx.strokeStyle = '#0f0'; + + ctx.fillRect(10, 10, 20, 20); + ctx.fillRect(20, 20, 20, 20); + ctx.beginPath(); + ctx.moveTo(30, 20); + ctx.lineTo(40-tol, 20); + ctx.lineTo(30, 10+tol); + ctx.fill(); + + ctx.beginPath(); + ctx.moveTo(10, 20); + ctx.lineTo(30, 20); + ctx.lineTo(30, 40); + ctx.stroke(); + + + ctx.fillStyle = '#0f0'; + ctx.strokeStyle = '#f00'; + + ctx.beginPath(); + ctx.moveTo(60, 20); + ctx.lineTo(80, 20); + ctx.lineTo(80, 40); + ctx.stroke(); + + ctx.fillRect(60, 10, 20, 20); + ctx.fillRect(70, 20, 20, 20); + ctx.beginPath(); + ctx.moveTo(80, 20); + ctx.lineTo(90+tol, 20); + ctx.lineTo(80, 10-tol); + ctx.fill(); + + _assertPixel(canvas, 34,16, 0,255,0,255); + _assertPixel(canvas, 34,15, 0,255,0,255); + _assertPixel(canvas, 35,15, 0,255,0,255); + _assertPixel(canvas, 36,15, 0,255,0,255); + _assertPixel(canvas, 36,14, 0,255,0,255); + + _assertPixel(canvas, 84,16, 0,255,0,255); + _assertPixel(canvas, 84,15, 0,255,0,255); + _assertPixel(canvas, 85,15, 0,255,0,255); + _assertPixel(canvas, 86,15, 0,255,0,255); + _assertPixel(canvas, 86,14, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.closed.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.closed.html new file mode 100644 index 0000000000..60650adeb3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.closed.html @@ -0,0 +1,45 @@ + + +OffscreenCanvas test: 2d.line.join.closed + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.join.closed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Line joins are drawn at the corner of a closed rectangle

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.closed.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.closed.worker.js new file mode 100644 index 0000000000..4882311961 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.closed.worker.js @@ -0,0 +1,40 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.join.closed +// Description:Line joins are drawn at the corner of a closed rectangle +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Line joins are drawn at the corner of a closed rectangle"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.strokeStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineJoin = 'miter'; + ctx.lineWidth = 200; + + ctx.beginPath(); + ctx.moveTo(100, 50); + ctx.lineTo(100, 1000); + ctx.lineTo(1000, 1000); + ctx.lineTo(1000, 50); + ctx.closePath(); + ctx.stroke(); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 48,1, 0,255,0,255); + _assertPixel(canvas, 48,48, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.invalid.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.invalid.html new file mode 100644 index 0000000000..be1f7e393e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.invalid.html @@ -0,0 +1,52 @@ + + +OffscreenCanvas test: 2d.line.join.invalid + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.join.invalid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Setting lineJoin to invalid values is ignored

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.invalid.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.invalid.worker.js new file mode 100644 index 0000000000..aa5a35c0c5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.invalid.worker.js @@ -0,0 +1,47 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.join.invalid +// Description:Setting lineJoin to invalid values is ignored +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Setting lineJoin to invalid values is ignored"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.lineJoin = 'bevel' + _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'"); + + ctx.lineJoin = 'bevel'; + ctx.lineJoin = 'invalid'; + _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'"); + + ctx.lineJoin = 'bevel'; + ctx.lineJoin = 'ROUND'; + _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'"); + + ctx.lineJoin = 'bevel'; + ctx.lineJoin = 'round\0'; + _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'"); + + ctx.lineJoin = 'bevel'; + ctx.lineJoin = 'round '; + _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'"); + + ctx.lineJoin = 'bevel'; + ctx.lineJoin = ""; + _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'"); + + ctx.lineJoin = 'bevel'; + ctx.lineJoin = 'butt'; + _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.miter.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.miter.html new file mode 100644 index 0000000000..c26e883c40 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.miter.html @@ -0,0 +1,71 @@ + + +OffscreenCanvas test: 2d.line.join.miter + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.join.miter

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  lineJoin 'miter' is rendered correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.miter.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.miter.worker.js new file mode 100644 index 0000000000..7b70000100 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.miter.worker.js @@ -0,0 +1,66 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.join.miter +// Description:lineJoin 'miter' is rendered correctly +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("lineJoin 'miter' is rendered correctly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineJoin = 'miter'; + ctx.lineWidth = 20; + + ctx.fillStyle = '#f00'; + ctx.strokeStyle = '#0f0'; + + ctx.fillStyle = '#f00'; + ctx.strokeStyle = '#0f0'; + + ctx.fillRect(10, 10, 30, 20); + ctx.fillRect(20, 10, 20, 30); + + ctx.beginPath(); + ctx.moveTo(10, 20); + ctx.lineTo(30, 20); + ctx.lineTo(30, 40); + ctx.stroke(); + + + ctx.fillStyle = '#0f0'; + ctx.strokeStyle = '#f00'; + + ctx.beginPath(); + ctx.moveTo(60, 20); + ctx.lineTo(80, 20); + ctx.lineTo(80, 40); + ctx.stroke(); + + ctx.fillRect(60, 10, 30, 20); + ctx.fillRect(70, 10, 20, 30); + + _assertPixel(canvas, 38,12, 0,255,0,255); + _assertPixel(canvas, 39,11, 0,255,0,255); + _assertPixel(canvas, 40,10, 0,255,0,255); + _assertPixel(canvas, 41,9, 0,255,0,255); + _assertPixel(canvas, 42,8, 0,255,0,255); + + _assertPixel(canvas, 88,12, 0,255,0,255); + _assertPixel(canvas, 89,11, 0,255,0,255); + _assertPixel(canvas, 90,10, 0,255,0,255); + _assertPixel(canvas, 91,9, 0,255,0,255); + _assertPixel(canvas, 92,8, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.open.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.open.html new file mode 100644 index 0000000000..d801e5c367 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.open.html @@ -0,0 +1,45 @@ + + +OffscreenCanvas test: 2d.line.join.open + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.join.open

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Line joins are not drawn at the corner of an unclosed rectangle

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.open.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.open.worker.js new file mode 100644 index 0000000000..2a1242436d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.open.worker.js @@ -0,0 +1,40 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.join.open +// Description:Line joins are not drawn at the corner of an unclosed rectangle +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Line joins are not drawn at the corner of an unclosed rectangle"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.strokeStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineJoin = 'miter'; + ctx.lineWidth = 200; + + ctx.beginPath(); + ctx.moveTo(100, 50); + ctx.lineTo(100, 1000); + ctx.lineTo(1000, 1000); + ctx.lineTo(1000, 50); + ctx.lineTo(100, 50); + ctx.stroke(); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 48,1, 0,255,0,255); + _assertPixel(canvas, 48,48, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.parallel.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.parallel.html new file mode 100644 index 0000000000..0826406b9d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.parallel.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.line.join.parallel + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.join.parallel

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Line joins are drawn at 180-degree joins

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.parallel.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.parallel.worker.js new file mode 100644 index 0000000000..f5b67dc5a2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.parallel.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.join.parallel +// Description:Line joins are drawn at 180-degree joins +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Line joins are drawn at 180-degree joins"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 300; + ctx.lineJoin = 'round'; + ctx.beginPath(); + ctx.moveTo(-100, 25); + ctx.lineTo(0, 25); + ctx.lineTo(-100, 25); + ctx.stroke(); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 48,1, 0,255,0,255); + _assertPixel(canvas, 48,48, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.round.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.round.html new file mode 100644 index 0000000000..70f6a8e517 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.round.html @@ -0,0 +1,78 @@ + + +OffscreenCanvas test: 2d.line.join.round + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.join.round

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  lineJoin 'round' is rendered correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.round.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.round.worker.js new file mode 100644 index 0000000000..33b135d604 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.round.worker.js @@ -0,0 +1,73 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.join.round +// Description:lineJoin 'round' is rendered correctly +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("lineJoin 'round' is rendered correctly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var tol = 1; // tolerance to avoid antialiasing artifacts + + ctx.lineJoin = 'round'; + ctx.lineWidth = 20; + + ctx.fillStyle = '#f00'; + ctx.strokeStyle = '#0f0'; + + ctx.fillRect(10, 10, 20, 20); + ctx.fillRect(20, 20, 20, 20); + ctx.beginPath(); + ctx.moveTo(30, 20); + ctx.arc(30, 20, 10-tol, 0, 2*Math.PI, true); + ctx.fill(); + + ctx.beginPath(); + ctx.moveTo(10, 20); + ctx.lineTo(30, 20); + ctx.lineTo(30, 40); + ctx.stroke(); + + + ctx.fillStyle = '#0f0'; + ctx.strokeStyle = '#f00'; + + ctx.beginPath(); + ctx.moveTo(60, 20); + ctx.lineTo(80, 20); + ctx.lineTo(80, 40); + ctx.stroke(); + + ctx.fillRect(60, 10, 20, 20); + ctx.fillRect(70, 20, 20, 20); + ctx.beginPath(); + ctx.moveTo(80, 20); + ctx.arc(80, 20, 10+tol, 0, 2*Math.PI, true); + ctx.fill(); + + _assertPixel(canvas, 36,14, 0,255,0,255); + _assertPixel(canvas, 36,13, 0,255,0,255); + _assertPixel(canvas, 37,13, 0,255,0,255); + _assertPixel(canvas, 38,13, 0,255,0,255); + _assertPixel(canvas, 38,12, 0,255,0,255); + + _assertPixel(canvas, 86,14, 0,255,0,255); + _assertPixel(canvas, 86,13, 0,255,0,255); + _assertPixel(canvas, 87,13, 0,255,0,255); + _assertPixel(canvas, 88,13, 0,255,0,255); + _assertPixel(canvas, 88,12, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.valid.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.valid.html new file mode 100644 index 0000000000..3b3935d1f7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.valid.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.line.join.valid + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.join.valid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Setting lineJoin to valid values works

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.valid.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.valid.worker.js new file mode 100644 index 0000000000..d1bdfd8845 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.join.valid.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.join.valid +// Description:Setting lineJoin to valid values works +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Setting lineJoin to valid values works"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.lineJoin = 'bevel' + _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'"); + + ctx.lineJoin = 'round'; + _assertSame(ctx.lineJoin, 'round', "ctx.lineJoin", "'round'"); + + ctx.lineJoin = 'miter'; + _assertSame(ctx.lineJoin, 'miter', "ctx.lineJoin", "'miter'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.acute.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.acute.html new file mode 100644 index 0000000000..587062ed12 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.acute.html @@ -0,0 +1,52 @@ + + +OffscreenCanvas test: 2d.line.miter.acute + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.miter.acute

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Miter joins are drawn correctly with acute angles

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.acute.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.acute.worker.js new file mode 100644 index 0000000000..0ab5c9050c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.acute.worker.js @@ -0,0 +1,47 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.miter.acute +// Description:Miter joins are drawn correctly with acute angles +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Miter joins are drawn correctly with acute angles"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineWidth = 200; + ctx.lineJoin = 'miter'; + + ctx.strokeStyle = '#0f0'; + ctx.miterLimit = 2.614; + ctx.beginPath(); + ctx.moveTo(100, 1000); + ctx.lineTo(100, 100); + ctx.lineTo(1000, 1000); + ctx.stroke(); + + ctx.strokeStyle = '#f00'; + ctx.miterLimit = 2.613; + ctx.beginPath(); + ctx.moveTo(100, 1000); + ctx.lineTo(100, 100); + ctx.lineTo(1000, 1000); + ctx.stroke(); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 48,1, 0,255,0,255); + _assertPixel(canvas, 48,48, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.exceeded.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.exceeded.html new file mode 100644 index 0000000000..1ae5c55aef --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.exceeded.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.line.miter.exceeded + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.miter.exceeded

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Miter joins are not drawn when the miter limit is exceeded

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.exceeded.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.exceeded.worker.js new file mode 100644 index 0000000000..41c4716c88 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.exceeded.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.miter.exceeded +// Description:Miter joins are not drawn when the miter limit is exceeded +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Miter joins are not drawn when the miter limit is exceeded"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineWidth = 400; + ctx.lineJoin = 'miter'; + + ctx.strokeStyle = '#f00'; + ctx.miterLimit = 1.414; + ctx.beginPath(); + ctx.moveTo(200, 1000); + ctx.lineTo(200, 200); + ctx.lineTo(1000, 201); // slightly non-right-angle to avoid being a special case + ctx.stroke(); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 48,1, 0,255,0,255); + _assertPixel(canvas, 48,48, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.invalid.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.invalid.html new file mode 100644 index 0000000000..eacd95b811 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.invalid.html @@ -0,0 +1,60 @@ + + +OffscreenCanvas test: 2d.line.miter.invalid + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.miter.invalid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Setting miterLimit to invalid values is ignored

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.invalid.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.invalid.worker.js new file mode 100644 index 0000000000..62f250670c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.invalid.worker.js @@ -0,0 +1,55 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.miter.invalid +// Description:Setting miterLimit to invalid values is ignored +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Setting miterLimit to invalid values is ignored"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.miterLimit = 1.5; + _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5"); + + ctx.miterLimit = 1.5; + ctx.miterLimit = 0; + _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5"); + + ctx.miterLimit = 1.5; + ctx.miterLimit = -1; + _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5"); + + ctx.miterLimit = 1.5; + ctx.miterLimit = Infinity; + _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5"); + + ctx.miterLimit = 1.5; + ctx.miterLimit = -Infinity; + _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5"); + + ctx.miterLimit = 1.5; + ctx.miterLimit = NaN; + _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5"); + + ctx.miterLimit = 1.5; + ctx.miterLimit = 'string'; + _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5"); + + ctx.miterLimit = 1.5; + ctx.miterLimit = true; + _assertSame(ctx.miterLimit, 1, "ctx.miterLimit", "1"); + + ctx.miterLimit = 1.5; + ctx.miterLimit = false; + _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.lineedge.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.lineedge.html new file mode 100644 index 0000000000..bad3cedc0e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.lineedge.html @@ -0,0 +1,41 @@ + + +OffscreenCanvas test: 2d.line.miter.lineedge + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.miter.lineedge

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Miter joins are not drawn when the miter limit is exceeded at the corners of a zero-height rectangle

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.lineedge.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.lineedge.worker.js new file mode 100644 index 0000000000..2b61bc8975 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.lineedge.worker.js @@ -0,0 +1,36 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.miter.lineedge +// Description:Miter joins are not drawn when the miter limit is exceeded at the corners of a zero-height rectangle +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Miter joins are not drawn when the miter limit is exceeded at the corners of a zero-height rectangle"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineWidth = 200; + ctx.lineJoin = 'miter'; + + ctx.strokeStyle = '#f00'; + ctx.miterLimit = 1.414; + ctx.beginPath(); + ctx.strokeRect(100, 25, 200, 0); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 48,1, 0,255,0,255); + _assertPixel(canvas, 48,48, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.obtuse.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.obtuse.html new file mode 100644 index 0000000000..efab533fba --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.obtuse.html @@ -0,0 +1,52 @@ + + +OffscreenCanvas test: 2d.line.miter.obtuse + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.miter.obtuse

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Miter joins are drawn correctly with obtuse angles

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.obtuse.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.obtuse.worker.js new file mode 100644 index 0000000000..42b1cd37b1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.obtuse.worker.js @@ -0,0 +1,47 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.miter.obtuse +// Description:Miter joins are drawn correctly with obtuse angles +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Miter joins are drawn correctly with obtuse angles"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineWidth = 1600; + ctx.lineJoin = 'miter'; + + ctx.strokeStyle = '#0f0'; + ctx.miterLimit = 1.083; + ctx.beginPath(); + ctx.moveTo(800, 10000); + ctx.lineTo(800, 300); + ctx.lineTo(10000, -8900); + ctx.stroke(); + + ctx.strokeStyle = '#f00'; + ctx.miterLimit = 1.082; + ctx.beginPath(); + ctx.moveTo(800, 10000); + ctx.lineTo(800, 300); + ctx.lineTo(10000, -8900); + ctx.stroke(); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 48,1, 0,255,0,255); + _assertPixel(canvas, 48,48, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.rightangle.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.rightangle.html new file mode 100644 index 0000000000..5bb4e63230 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.rightangle.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.line.miter.rightangle + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.miter.rightangle

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Miter joins are not drawn when the miter limit is exceeded, on exact right angles

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.rightangle.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.rightangle.worker.js new file mode 100644 index 0000000000..42e995deed --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.rightangle.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.miter.rightangle +// Description:Miter joins are not drawn when the miter limit is exceeded, on exact right angles +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Miter joins are not drawn when the miter limit is exceeded, on exact right angles"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineWidth = 400; + ctx.lineJoin = 'miter'; + + ctx.strokeStyle = '#f00'; + ctx.miterLimit = 1.414; + ctx.beginPath(); + ctx.moveTo(200, 1000); + ctx.lineTo(200, 200); + ctx.lineTo(1000, 200); + ctx.stroke(); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 48,1, 0,255,0,255); + _assertPixel(canvas, 48,48, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.valid.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.valid.html new file mode 100644 index 0000000000..3c569ea655 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.valid.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.line.miter.valid + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.miter.valid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Setting miterLimit to valid values works

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.valid.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.valid.worker.js new file mode 100644 index 0000000000..cb0548abd0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.valid.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.miter.valid +// Description:Setting miterLimit to valid values works +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Setting miterLimit to valid values works"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.miterLimit = 1.5; + _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5"); + + ctx.miterLimit = "1e1"; + _assertSame(ctx.miterLimit, 10, "ctx.miterLimit", "10"); + + ctx.miterLimit = 1/1024; + _assertSame(ctx.miterLimit, 1/1024, "ctx.miterLimit", "1/1024"); + + ctx.miterLimit = 1000; + _assertSame(ctx.miterLimit, 1000, "ctx.miterLimit", "1000"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.within.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.within.html new file mode 100644 index 0000000000..da87cf4a29 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.within.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.line.miter.within + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.miter.within

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Miter joins are drawn when the miter limit is not quite exceeded

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.within.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.within.worker.js new file mode 100644 index 0000000000..1d9aacb817 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.miter.within.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.miter.within +// Description:Miter joins are drawn when the miter limit is not quite exceeded +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Miter joins are drawn when the miter limit is not quite exceeded"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineWidth = 400; + ctx.lineJoin = 'miter'; + + ctx.strokeStyle = '#0f0'; + ctx.miterLimit = 1.416; + ctx.beginPath(); + ctx.moveTo(200, 1000); + ctx.lineTo(200, 200); + ctx.lineTo(1000, 201); + ctx.stroke(); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 48,1, 0,255,0,255); + _assertPixel(canvas, 48,48, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.union.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.union.html new file mode 100644 index 0000000000..d3d13ece09 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.union.html @@ -0,0 +1,46 @@ + + +OffscreenCanvas test: 2d.line.union + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.union

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.union.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.union.worker.js new file mode 100644 index 0000000000..f2c7b2c4ce --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.union.worker.js @@ -0,0 +1,41 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.union +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineWidth = 100; + ctx.lineCap = 'round'; + + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(0, 24); + ctx.lineTo(100, 25); + ctx.lineTo(0, 26); + ctx.closePath(); + ctx.stroke(); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 25,1, 0,255,0,255); + _assertPixel(canvas, 48,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 25,1, 0,255,0,255); + _assertPixel(canvas, 48,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.basic.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.basic.html new file mode 100644 index 0000000000..88e38294bf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.basic.html @@ -0,0 +1,63 @@ + + +OffscreenCanvas test: 2d.line.width.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.width.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  lineWidth determines the width of line strokes

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.basic.worker.js new file mode 100644 index 0000000000..012d9b11bd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.basic.worker.js @@ -0,0 +1,58 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.width.basic +// Description:lineWidth determines the width of line strokes +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("lineWidth determines the width of line strokes"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineWidth = 20; + // Draw a green line over a red box, to check the line is not too small + ctx.fillStyle = '#f00'; + ctx.strokeStyle = '#0f0'; + ctx.fillRect(15, 15, 20, 20); + ctx.beginPath(); + ctx.moveTo(25, 15); + ctx.lineTo(25, 35); + ctx.stroke(); + + // Draw a green box over a red line, to check the line is not too large + ctx.fillStyle = '#0f0'; + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(75, 15); + ctx.lineTo(75, 35); + ctx.stroke(); + ctx.fillRect(65, 15, 20, 20); + + _assertPixel(canvas, 14,25, 0,255,0,255); + _assertPixel(canvas, 15,25, 0,255,0,255); + _assertPixel(canvas, 16,25, 0,255,0,255); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 34,25, 0,255,0,255); + _assertPixel(canvas, 35,25, 0,255,0,255); + _assertPixel(canvas, 36,25, 0,255,0,255); + + _assertPixel(canvas, 64,25, 0,255,0,255); + _assertPixel(canvas, 65,25, 0,255,0,255); + _assertPixel(canvas, 66,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + _assertPixel(canvas, 84,25, 0,255,0,255); + _assertPixel(canvas, 85,25, 0,255,0,255); + _assertPixel(canvas, 86,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.invalid.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.invalid.html new file mode 100644 index 0000000000..481a316822 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.invalid.html @@ -0,0 +1,60 @@ + + +OffscreenCanvas test: 2d.line.width.invalid + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.width.invalid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Setting lineWidth to invalid values is ignored

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.invalid.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.invalid.worker.js new file mode 100644 index 0000000000..3a10cb48e8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.invalid.worker.js @@ -0,0 +1,55 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.width.invalid +// Description:Setting lineWidth to invalid values is ignored +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Setting lineWidth to invalid values is ignored"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.lineWidth = 1.5; + _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5"); + + ctx.lineWidth = 1.5; + ctx.lineWidth = 0; + _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5"); + + ctx.lineWidth = 1.5; + ctx.lineWidth = -1; + _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5"); + + ctx.lineWidth = 1.5; + ctx.lineWidth = Infinity; + _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5"); + + ctx.lineWidth = 1.5; + ctx.lineWidth = -Infinity; + _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5"); + + ctx.lineWidth = 1.5; + ctx.lineWidth = NaN; + _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5"); + + ctx.lineWidth = 1.5; + ctx.lineWidth = 'string'; + _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5"); + + ctx.lineWidth = 1.5; + ctx.lineWidth = true; + _assertSame(ctx.lineWidth, 1, "ctx.lineWidth", "1"); + + ctx.lineWidth = 1.5; + ctx.lineWidth = false; + _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.scaledefault.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.scaledefault.html new file mode 100644 index 0000000000..9ac77a9c49 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.scaledefault.html @@ -0,0 +1,40 @@ + + +OffscreenCanvas test: 2d.line.width.scaledefault + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.width.scaledefault

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Default lineWidth strokes are affected by scale transformations

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.scaledefault.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.scaledefault.worker.js new file mode 100644 index 0000000000..8d8089476b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.scaledefault.worker.js @@ -0,0 +1,35 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.width.scaledefault +// Description:Default lineWidth strokes are affected by scale transformations +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Default lineWidth strokes are affected by scale transformations"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.scale(50, 50); + ctx.strokeStyle = '#0f0'; + ctx.moveTo(0, 0.5); + ctx.lineTo(2, 0.5); + ctx.stroke(); + + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + _assertPixel(canvas, 50,5, 0,255,0,255); + _assertPixel(canvas, 50,45, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.transformed.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.transformed.html new file mode 100644 index 0000000000..ea8f285dc4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.transformed.html @@ -0,0 +1,69 @@ + + +OffscreenCanvas test: 2d.line.width.transformed + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.width.transformed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Line stroke widths are affected by scale transformations

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.transformed.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.transformed.worker.js new file mode 100644 index 0000000000..67fc0a29bd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.transformed.worker.js @@ -0,0 +1,64 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.width.transformed +// Description:Line stroke widths are affected by scale transformations +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Line stroke widths are affected by scale transformations"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineWidth = 4; + // Draw a green line over a red box, to check the line is not too small + ctx.fillStyle = '#f00'; + ctx.strokeStyle = '#0f0'; + ctx.fillRect(15, 15, 20, 20); + ctx.save(); + ctx.scale(5, 1); + ctx.beginPath(); + ctx.moveTo(5, 15); + ctx.lineTo(5, 35); + ctx.stroke(); + ctx.restore(); + + // Draw a green box over a red line, to check the line is not too large + ctx.fillStyle = '#0f0'; + ctx.strokeStyle = '#f00'; + ctx.save(); + ctx.scale(-5, 1); + ctx.beginPath(); + ctx.moveTo(-15, 15); + ctx.lineTo(-15, 35); + ctx.stroke(); + ctx.restore(); + ctx.fillRect(65, 15, 20, 20); + + _assertPixel(canvas, 14,25, 0,255,0,255); + _assertPixel(canvas, 15,25, 0,255,0,255); + _assertPixel(canvas, 16,25, 0,255,0,255); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 34,25, 0,255,0,255); + _assertPixel(canvas, 35,25, 0,255,0,255); + _assertPixel(canvas, 36,25, 0,255,0,255); + + _assertPixel(canvas, 64,25, 0,255,0,255); + _assertPixel(canvas, 65,25, 0,255,0,255); + _assertPixel(canvas, 66,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + _assertPixel(canvas, 84,25, 0,255,0,255); + _assertPixel(canvas, 85,25, 0,255,0,255); + _assertPixel(canvas, 86,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.valid.html b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.valid.html new file mode 100644 index 0000000000..813433da3f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.valid.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.line.width.valid + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.line.width.valid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Setting lineWidth to valid values works

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.valid.worker.js b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.valid.worker.js new file mode 100644 index 0000000000..195575f7de --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/line-styles/2d.line.width.valid.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.line.width.valid +// Description:Setting lineWidth to valid values works +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Setting lineWidth to valid values works"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.lineWidth = 1.5; + _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5"); + + ctx.lineWidth = "1e1"; + _assertSame(ctx.lineWidth, 10, "ctx.lineWidth", "10"); + + ctx.lineWidth = 1/1024; + _assertSame(ctx.lineWidth, 1/1024, "ctx.lineWidth", "1/1024"); + + ctx.lineWidth = 1000; + _assertSame(ctx.lineWidth, 1000, "ctx.lineWidth", "1000"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.html b/testing/web-platform/tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.html new file mode 100644 index 0000000000..1cc0e5bffd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.html @@ -0,0 +1,165 @@ + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.w.html b/testing/web-platform/tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.w.html new file mode 100644 index 0000000000..5c1fa4cf40 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.w.html @@ -0,0 +1,337 @@ + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/draw-generic-family/2d.text.draw.generic.family.html b/testing/web-platform/tests/html/canvas/offscreen/manual/draw-generic-family/2d.text.draw.generic.family.html new file mode 100644 index 0000000000..a5fd7ab066 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/draw-generic-family/2d.text.draw.generic.family.html @@ -0,0 +1,49 @@ + +OffscreenCanvas test: 2d.text.draw.generic.family + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/draw-generic-family/2d.text.draw.generic.family.w.html b/testing/web-platform/tests/html/canvas/offscreen/manual/draw-generic-family/2d.text.draw.generic.family.w.html new file mode 100644 index 0000000000..7a88c032ad --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/draw-generic-family/2d.text.draw.generic.family.w.html @@ -0,0 +1,52 @@ + +OffscreenCanvas test: 2d.text.draw.generic.family.w + + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.html b/testing/web-platform/tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.html new file mode 100644 index 0000000000..25691983f1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.html @@ -0,0 +1,27 @@ + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.js b/testing/web-platform/tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.js new file mode 100644 index 0000000000..cb2e245803 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.js @@ -0,0 +1,48 @@ +var getRegularContextForFilter = function(filter, pattern) { + var c = document.createElement("canvas"); + c.width = c.height = 80; + var ctx = c.getContext('2d'); + ctx.filter = filter; + ctx.drawImage(pattern, 5, 5); + ctx.drawImage(pattern, 25, 25); + ctx.drawImage(pattern, 45, 45); + return ctx; +}; + +var matchImageDataResults = function(offscreenImage, regularImage, filter) { + assert_array_equals(offscreenImage, regularImage, + "The image data generated by filter " + + filter + + " should be the same for both OffscreenCanvas and regular canvas"); +}; + +var createPatternCanvas = function() { + var patternCanvas = document.createElement('canvas'); + patternCanvas.width = 20; + patternCanvas.height = 20; + var patternCtx = patternCanvas.getContext('2d'); + patternCtx.fillStyle = '#A00'; + patternCtx.fillRect(0, 0, 10, 10); + patternCtx.fillStyle = '#0A0'; + patternCtx.fillRect(10, 0, 10, 10); + patternCtx.fillStyle = '#00A'; + patternCtx.fillRect(0, 10, 10, 10); + patternCtx.fillStyle = "#AA0"; + patternCtx.fillRect(10, 10, 10, 10); + return patternCanvas; +}; + +var filters = [ "none" , + "blur(10px)" , + "brightness(40%)" , + "contrast(20%)" , + "drop-shadow(0 0 5px green)" , + "grayscale(100%)" , + "invert(100%)" , + "opacity(50%)" , + "saturate(20%)" , + "sepia(100%)" , + "sepia(1) hue-rotate(200deg)", + "url(#url)" ]; + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.w.html b/testing/web-platform/tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.w.html new file mode 100644 index 0000000000..d6ed915b53 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.w.html @@ -0,0 +1,54 @@ + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.html b/testing/web-platform/tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.html new file mode 100644 index 0000000000..a78524c51d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.html @@ -0,0 +1,128 @@ + + +OffscreenCanvasRenderingContext2D imageSmoothingEnabled test + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.worker.js b/testing/web-platform/tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.worker.js new file mode 100644 index 0000000000..4c37e84b1f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.worker.js @@ -0,0 +1,126 @@ +// spec link: https://html.spec.whatwg.org/#the-offscreen-2d-rendering-context + +importScripts("/resources/testharness.js"); + +function createTestImage() { + var image = new OffscreenCanvas(100, 50); + var imgctx = image.getContext('2d'); + imgctx.fillStyle = "#F00"; + imgctx.fillRect(0, 0, 2, 2); + imgctx.fillStyle = "#0F0"; + imgctx.fillRect(0, 0, 1, 1); + return image; +} + +test(function() { + var offscreenCanvas = new OffscreenCanvas(100, 50); + var ctx = offscreenCanvas.getContext('2d'); + assert_true(ctx.imageSmoothingEnabled); +}, "When the context is created, imageSmoothingEnabled must be set to true."); + +test(function() { + var offscreenCanvas = new OffscreenCanvas(100, 50); + var ctx = offscreenCanvas.getContext('2d'); + ctx.imageSmoothingEnabled = false; + assert_false(ctx.imageSmoothingEnabled); +}, "On getting imageSmoothingEnabled, the user agent must return the last value it was set to."); + +test(function() { + var offscreenCanvas = new OffscreenCanvas(100, 50); + var ctx = offscreenCanvas.getContext('2d'); + var image = createTestImage(); + ctx.scale(10, 10); + ctx.drawImage(image, 0, 0); + var pixels = ctx.getImageData(9, 9, 1, 1).data; + assert_not_equals(pixels[0], 0); + assert_not_equals(pixels[1], 255); +}, "Test that image smoothing is actually on by default."); + +test(function() { + var offscreenCanvas = new OffscreenCanvas(100, 50); + var ctx = offscreenCanvas.getContext('2d'); + ctx.imageSmoothingEnabled = true; + var image = createTestImage(); + ctx.scale(10, 10); + ctx.drawImage(image, 0, 0); + var pixels = ctx.getImageData(9, 9, 1, 1).data; + assert_not_equals(pixels[0], 0); + assert_not_equals(pixels[1], 255); +}, "Test that image smoothing works when imageSmoothingEnabled is set to true"); + +test(function() { + var offscreenCanvas = new OffscreenCanvas(100, 50); + var ctx = offscreenCanvas.getContext('2d'); + var image = createTestImage(); + ctx.imageSmoothingEnabled = false; + ctx.scale(10, 10); + ctx.drawImage(image, 0, 0); + var pixels = ctx.getImageData(9, 9, 1, 1).data; + assert_array_equals(pixels, [0, 255, 0, 255]); +}, "Test that imageSmoothingEnabled = false (nearest-neighbor interpolation) works with drawImage()."); + +test(function() { + var offscreenCanvas = new OffscreenCanvas(100, 50); + var ctx = offscreenCanvas.getContext('2d'); + var image = createTestImage(); + ctx.imageSmoothingEnabled = false; + ctx.scale(10, 10); + ctx.fillStyle = ctx.createPattern(image, 'repeat'); + ctx.fillRect(0, 0, 10, 10); + var pixels = ctx.getImageData(9, 9, 1, 1).data; + assert_array_equals(pixels, [0, 255, 0, 255]); +}, "Test that imageSmoothingEnabled = false (nearest-neighbor interpolation) works with fillRect and createPattern()."); + +test(function() { + var offscreenCanvas = new OffscreenCanvas(100, 50); + var ctx = offscreenCanvas.getContext('2d'); + var image = createTestImage(); + ctx.imageSmoothingEnabled = false; + ctx.fillStyle = ctx.createPattern(image, 'repeat'); + ctx.scale(10, 10); + ctx.rect(0, 0, 10, 10); + ctx.fill(); + var pixels = ctx.getImageData(9, 9, 1, 1).data; + assert_array_equals(pixels, [0, 255, 0, 255]); +}, "Test that imageSmoothingEnabled = false (nearest-neighbor interpolation) works with fill() and createPattern()."); + +test(function() { + var offscreenCanvas = new OffscreenCanvas(100, 50); + var ctx = offscreenCanvas.getContext('2d'); + var image = createTestImage(); + ctx.strokeStyle = ctx.createPattern(image, 'repeat'); + ctx.lineWidth = 5; + ctx.imageSmoothingEnabled = false; + ctx.scale(10, 10); + ctx.beginPath(); + ctx.moveTo(0, 0); + ctx.lineTo(10, 10); + ctx.stroke(); + var pixels = ctx.getImageData(9, 9, 1, 1).data; + assert_array_equals(pixels, [0, 255, 0, 255]); +}, "Test that imageSmoothingEnabled = false (nearest-neighbor interpolation) works with stroke() and createPattern()."); + +test(function() { + var repaints = 5; + var offscreenCanvas = new OffscreenCanvas(100, 50); + var ctx = offscreenCanvas.getContext('2d'); + + function draw() { + ctx.clearRect(0, 0, 10, 10); + ctx.setTransform(1, 0, 0, 1, 0, 0); + var image = createTestImage(); + ctx.imageSmoothingEnabled = false; + ctx.scale(10, 10); + ctx.drawImage(image, 0, 0); + var pixels = ctx.getImageData(9, 9, 1, 1).data; + assert_array_equals(pixels, [0, 255, 0, 255]); + } + + while (repaints > 0) { + draw(); + repaints = repaints - 1; + } + +}, "Test that imageSmoothingEnabled = false (nearest-neighbor interpolation) still works after repaints."); + +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/layers/unclosed-layers-expected.html b/testing/web-platform/tests/html/canvas/offscreen/manual/layers/unclosed-layers-expected.html new file mode 100644 index 0000000000..873869ea72 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/layers/unclosed-layers-expected.html @@ -0,0 +1,14 @@ + +Canvas test: unclosed-layers +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  unclosed-layers

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Check that unclosed layers aren't rendered.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/layers/unclosed-layers.html b/testing/web-platform/tests/html/canvas/offscreen/manual/layers/unclosed-layers.html new file mode 100644 index 0000000000..4fee600d6c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/layers/unclosed-layers.html @@ -0,0 +1,33 @@ + + + +Canvas test: unclosed-layers +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  unclosed-layers

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Check that unclosed layers aren't rendered.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/layers/unclosed-layers.w.html b/testing/web-platform/tests/html/canvas/offscreen/manual/layers/unclosed-layers.w.html new file mode 100644 index 0000000000..a0014bb597 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/layers/unclosed-layers.w.html @@ -0,0 +1,48 @@ + + + +Canvas test: unclosed-layers +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  unclosed-layers

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Check that unclosed layers aren't rendered.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/layers/unclosed-nested-layers-expected.html b/testing/web-platform/tests/html/canvas/offscreen/manual/layers/unclosed-nested-layers-expected.html new file mode 100644 index 0000000000..8557441f7e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/layers/unclosed-nested-layers-expected.html @@ -0,0 +1,14 @@ + +Canvas test: unclosed-nested-layers +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  unclosed-nested-layers

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Check that unclosed nested layers aren't rendered.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/layers/unclosed-nested-layers.html b/testing/web-platform/tests/html/canvas/offscreen/manual/layers/unclosed-nested-layers.html new file mode 100644 index 0000000000..c6925beb74 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/layers/unclosed-nested-layers.html @@ -0,0 +1,39 @@ + + + +Canvas test: unclosed-nested-layers +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  unclosed-nested-layers

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Check that unclosed nested layers aren't rendered.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/layers/unclosed-nested-layers.w.html b/testing/web-platform/tests/html/canvas/offscreen/manual/layers/unclosed-nested-layers.w.html new file mode 100644 index 0000000000..1a1dc54052 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/layers/unclosed-nested-layers.w.html @@ -0,0 +1,54 @@ + + + +Canvas test: unclosed-nested-layers +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  unclosed-nested-layers

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Check that unclosed nested layers aren't rendered.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas-worker-font-load-crash.html b/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas-worker-font-load-crash.html new file mode 100644 index 0000000000..1baf7847de --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas-worker-font-load-crash.html @@ -0,0 +1,19 @@ + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.html b/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.html new file mode 100644 index 0000000000..a2ad1dcc7e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.html @@ -0,0 +1,51 @@ + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.worker.js b/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.worker.js new file mode 100644 index 0000000000..72cfb728f0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.worker.js @@ -0,0 +1,45 @@ +// spec link: https://html.spec.whatwg.org/#dom-offscreencanvas + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t1 = async_test("Test that calling OffscreenCanvas's constructor generates correct width and height."); +t1.step(function() { + var offscreenCanvas = new OffscreenCanvas(100, 50); + assert_equals(offscreenCanvas.width, 100); + assert_equals(offscreenCanvas.height, 50); + + offscreenCanvas.width = 50; + offscreenCanvas.height = 100; + assert_equals(offscreenCanvas.width, 50); + assert_equals(offscreenCanvas.height, 100); + t1.done(); +}); + +var t2 = async_test("Test that OffscreenCanvas constructor handles invalid arguments correctly in a worker"); +t2.step(function() { + var offscreenCanvas1 = new OffscreenCanvas(1, 1); + + offscreenCanvas1.width = null; + offscreenCanvas1.height = null; + assert_equals(offscreenCanvas1.width, 0); + assert_equals(offscreenCanvas1.height, 0); + + assert_throws_js(TypeError, function() { new OffscreenCanvas(-1, -1); }); + + var offscreenCanvas2 = new OffscreenCanvas(null, null); + assert_equals(offscreenCanvas2.width, 0); + assert_equals(offscreenCanvas2.height, 0); + + assert_throws_js(TypeError, function() { offscreenCanvas2.width = -1; }); + assert_throws_js(TypeError, function() { offscreenCanvas2.height = -1; }); + + var obj = {Name: "John Doe", Age: 30}; + assert_throws_js(TypeError, function() { offscreenCanvas2.width = obj; }); + assert_throws_js(TypeError, function() { offscreenCanvas2.height = obj; }); + assert_throws_js(TypeError, function() { new OffscreenCanvas(obj, obj); }); + t2.done(); +}); + +done(); + diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.html b/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.html new file mode 100644 index 0000000000..51c167ddca --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.html @@ -0,0 +1,80 @@ + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker.js b/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker.js new file mode 100644 index 0000000000..c413791f61 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker.js @@ -0,0 +1,77 @@ +// spec link: https://html.spec.whatwg.org/#dom-offscreencanvas-getcontext + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +test(function() { + var offscreenCanvas = new OffscreenCanvas(1, 1); + assert_throws_js(TypeError, function() { offscreenCanvas.getContext('3d'); }); +}, "Test that getContext with un-supported string throws a TypeError."); + +test(function() { + var offscreenCanvas1 = new OffscreenCanvas(1, 1); + var ctx1 = offscreenCanvas1.getContext('2d'); + assert_true(ctx1 instanceof OffscreenCanvasRenderingContext2D); + + var offscreenCanvas2 = new OffscreenCanvas(1, 1); + var ctx2 = offscreenCanvas2.getContext('webgl'); + assert_true(ctx2 instanceof WebGLRenderingContext); + + var offscreenCanvas3 = new OffscreenCanvas(1, 1); + var ctx3 = offscreenCanvas3.getContext('webgl2'); + assert_true(ctx3 instanceof WebGL2RenderingContext); +}, "Test that getContext with supported string returns correct results"); + +test(function() { + var offscreenCanvas1 = new OffscreenCanvas(1, 1); + var ctx1 = offscreenCanvas1.getContext('2d'); + var ctx2 = offscreenCanvas1.getContext('webgl'); + assert_equals(ctx2, null); + + var offscreenCanvas2 = new OffscreenCanvas(1, 1); + var ctx3 = offscreenCanvas2.getContext('webgl'); + var ctx4 = offscreenCanvas2.getContext('2d'); + assert_equals(ctx4, null); +}, "Test that getContext twice with different context type returns null the second time"); + +test(function() { + var offscreenCanvas = new OffscreenCanvas(1, 2); + var ctx = offscreenCanvas.getContext('2d'); + var dstCanvas = ctx.canvas; + assert_equals(dstCanvas.width, 1); + assert_equals(dstCanvas.height, 2); +}, "Test that 2dcontext.canvas should return the original OffscreenCanvas"); + +test(function() { + var offscreenCanvas = new OffscreenCanvas(1, 2); + var ctx = offscreenCanvas.getContext('webgl'); + var dstCanvas = ctx.canvas; + assert_equals(dstCanvas.width, 1); + assert_equals(dstCanvas.height, 2); +}, "Test that webglcontext.canvas should return the original OffscreenCanvas"); + +test(function() { + var offscreenCanvas = new OffscreenCanvas(10, 10); + var ctx = offscreenCanvas.getContext('2d', {alpha: false}); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 10, 10); + _assertPixelApprox(offscreenCanvas, 5,5, 0,127,0,255, 2); +}, "Test that OffscreenCanvasRenderingContext2D with alpha disabled makes the OffscreenCanvas opaque"); + +test(function() { + var offscreenCanvas = new OffscreenCanvas(10, 10); + var ctx = offscreenCanvas.getContext('2d', {alpha: true}); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 10, 10); + _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,127, 2); +}, "Test that OffscreenCanvasRenderingContext2D with alpha enabled preserves the alpha"); + +test(function() { + var offscreenCanvas = new OffscreenCanvas(10, 10); + var ctx = offscreenCanvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 10, 10); + _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,127, 2); +}, "Test that 'alpha' context creation attribute is true by default"); + +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.resize.html b/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.resize.html new file mode 100644 index 0000000000..3ff0eea153 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.resize.html @@ -0,0 +1,240 @@ + +Test resizing an OffscreenCanvas with a 2d context + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.lowlatency.nocrash.html b/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.lowlatency.nocrash.html new file mode 100644 index 0000000000..1960841564 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.lowlatency.nocrash.html @@ -0,0 +1,12 @@ +Transfer Low-Latency Canvas + + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.html b/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.html new file mode 100644 index 0000000000..6e1adf9591 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.html @@ -0,0 +1,112 @@ + + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.nocrash.html b/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.nocrash.html new file mode 100644 index 0000000000..09a388ed35 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.nocrash.html @@ -0,0 +1,16 @@ + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Tests that an ImageBitmap in Offscreen without content does not crash.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.w.html b/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.w.html new file mode 100644 index 0000000000..b51ce0efa2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.w.html @@ -0,0 +1,201 @@ + + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.html b/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.html new file mode 100644 index 0000000000..fea375b2ad --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.html @@ -0,0 +1,34 @@ + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.w.html b/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.w.html new file mode 100644 index 0000000000..1347e7b50b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.w.html @@ -0,0 +1,76 @@ + + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.html b/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.html new file mode 100644 index 0000000000..76796034e9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.html @@ -0,0 +1,83 @@ + + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.w.html b/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.w.html new file mode 100644 index 0000000000..38f981e8f0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.w.html @@ -0,0 +1,142 @@ + + + + + + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/transformations/2d.transformation.getTransform.html b/testing/web-platform/tests/html/canvas/offscreen/manual/transformations/2d.transformation.getTransform.html new file mode 100644 index 0000000000..b3b70ac208 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/transformations/2d.transformation.getTransform.html @@ -0,0 +1,40 @@ + + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/manual/wide-gamut-canvas/2d.color.space.p3.convertToBlobp3.canvas.html b/testing/web-platform/tests/html/canvas/offscreen/manual/wide-gamut-canvas/2d.color.space.p3.convertToBlobp3.canvas.html new file mode 100644 index 0000000000..9fc63a9f49 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/manual/wide-gamut-canvas/2d.color.space.p3.convertToBlobp3.canvas.html @@ -0,0 +1,50 @@ + +OffscreenCanvas test: 2d.color.space.p3.convertToBlob.p3.canvas + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.color.space.p3.convertToBlob.p3.canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  test if toblob returns p3 data from p3 color space canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.1.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.1.html new file mode 100644 index 0000000000..bdd2c7a65f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.1.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.arc.angle.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.angle.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arc() draws pi/2 .. -pi anticlockwise correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.1.worker.js new file mode 100644 index 0000000000..1b6a534c23 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.1.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.angle.1 +// Description:arc() draws pi/2 .. -pi anticlockwise correctly +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arc() draws pi/2 .. -pi anticlockwise correctly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(100, 0); + ctx.arc(100, 0, 150, Math.PI/2, -Math.PI, true); + ctx.fill(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.2.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.2.html new file mode 100644 index 0000000000..c92e83abd7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.2.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.arc.angle.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.angle.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arc() draws -3pi/2 .. -pi anticlockwise correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.2.worker.js new file mode 100644 index 0000000000..25598c959d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.2.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.angle.2 +// Description:arc() draws -3pi/2 .. -pi anticlockwise correctly +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arc() draws -3pi/2 .. -pi anticlockwise correctly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(100, 0); + ctx.arc(100, 0, 150, -3*Math.PI/2, -Math.PI, true); + ctx.fill(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.3.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.3.html new file mode 100644 index 0000000000..86170ac8c5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.3.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.arc.angle.3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.angle.3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arc() wraps angles mod 2pi when anticlockwise and end > start+2pi

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.3.worker.js new file mode 100644 index 0000000000..6841041d78 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.3.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.angle.3 +// Description:arc() wraps angles mod 2pi when anticlockwise and end > start+2pi +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arc() wraps angles mod 2pi when anticlockwise and end > start+2pi"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(100, 0); + ctx.arc(100, 0, 150, (512+1/2)*Math.PI, (1024-1)*Math.PI, true); + ctx.fill(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.4.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.4.html new file mode 100644 index 0000000000..e694b99f70 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.4.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.path.arc.angle.4 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.angle.4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arc() draws a full circle when clockwise and end > start+2pi

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.4.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.4.worker.js new file mode 100644 index 0000000000..502175165f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.4.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.angle.4 +// Description:arc() draws a full circle when clockwise and end > start+2pi +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arc() draws a full circle when clockwise and end > start+2pi"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.arc(50, 25, 60, (512+1/2)*Math.PI, (1024-1)*Math.PI, false); + ctx.fill(); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.5.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.5.html new file mode 100644 index 0000000000..7f0d9af19f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.5.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.arc.angle.5 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.angle.5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arc() wraps angles mod 2pi when clockwise and start > end+2pi

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.5.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.5.worker.js new file mode 100644 index 0000000000..aa2320a92a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.5.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.angle.5 +// Description:arc() wraps angles mod 2pi when clockwise and start > end+2pi +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arc() wraps angles mod 2pi when clockwise and start > end+2pi"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(100, 0); + ctx.arc(100, 0, 150, (1024-1)*Math.PI, (512+1/2)*Math.PI, false); + ctx.fill(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.6.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.6.html new file mode 100644 index 0000000000..64cf6daeef --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.6.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.path.arc.angle.6 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.angle.6

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arc() draws a full circle when anticlockwise and start > end+2pi

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.6.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.6.worker.js new file mode 100644 index 0000000000..929db397d3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.6.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.angle.6 +// Description:arc() draws a full circle when anticlockwise and start > end+2pi +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arc() draws a full circle when anticlockwise and start > end+2pi"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.arc(50, 25, 60, (1024-1)*Math.PI, (512+1/2)*Math.PI, true); + ctx.fill(); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.default.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.default.html new file mode 100644 index 0000000000..ee42c04085 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.default.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.arc.default + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.default

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arc() with missing last argument defaults to clockwise

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.default.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.default.worker.js new file mode 100644 index 0000000000..da74713e4a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.default.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.default +// Description:arc() with missing last argument defaults to clockwise +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arc() with missing last argument defaults to clockwise"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(100, 0); + ctx.arc(100, 0, 150, -Math.PI, Math.PI/2); + ctx.fill(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.empty.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.empty.html new file mode 100644 index 0000000000..25414647b2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.empty.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.arc.empty + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.empty

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arc() with an empty path does not draw a straight line to the start point

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.empty.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.empty.worker.js new file mode 100644 index 0000000000..9b1fbb1a38 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.empty.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.empty +// Description:arc() with an empty path does not draw a straight line to the start point +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arc() with an empty path does not draw a straight line to the start point"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 50; + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.arc(200, 25, 5, 0, 2*Math.PI, true); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.end.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.end.html new file mode 100644 index 0000000000..b8459053f2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.end.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.path.arc.end + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.end

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arc() adds the end point of the arc to the subpath

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.end.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.end.worker.js new file mode 100644 index 0000000000..963640a273 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.end.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.end +// Description:arc() adds the end point of the arc to the subpath +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arc() adds the end point of the arc to the subpath"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 50; + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(-100, 0); + ctx.arc(-100, 0, 25, -Math.PI/2, Math.PI/2, true); + ctx.lineTo(100, 25); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.negative.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.negative.html new file mode 100644 index 0000000000..6c81b9e0de --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.negative.html @@ -0,0 +1,29 @@ + + +OffscreenCanvas test: 2d.path.arc.negative + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.negative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arc() with negative radius throws INDEX_SIZE_ERR

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.negative.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.negative.worker.js new file mode 100644 index 0000000000..b48eb98474 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.negative.worker.js @@ -0,0 +1,24 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.negative +// Description:arc() with negative radius throws INDEX_SIZE_ERR +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arc() with negative radius throws INDEX_SIZE_ERR"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.arc(0, 0, -1, 0, 0, true); }); + var path = new Path2D(); + assert_throws_dom("INDEX_SIZE_ERR", function() { path.arc(10, 10, -5, 0, 1, false); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.nonempty.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.nonempty.html new file mode 100644 index 0000000000..4d9ebe6d87 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.nonempty.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.path.arc.nonempty + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.nonempty

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arc() with a non-empty path does draw a straight line to the start point

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.nonempty.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.nonempty.worker.js new file mode 100644 index 0000000000..af6b4c9853 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.nonempty.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.nonempty +// Description:arc() with a non-empty path does draw a straight line to the start point +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arc() with a non-empty path does draw a straight line to the start point"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 50; + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(0, 25); + ctx.arc(200, 25, 5, 0, 2*Math.PI, true); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.nonfinite.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.nonfinite.html new file mode 100644 index 0000000000..b347a1e27a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.nonfinite.html @@ -0,0 +1,77 @@ + + +OffscreenCanvas test: 2d.path.arc.nonfinite + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arc() with Infinity/NaN is ignored

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.nonfinite.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.nonfinite.worker.js new file mode 100644 index 0000000000..50ff560e34 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.nonfinite.worker.js @@ -0,0 +1,72 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.nonfinite +// Description:arc() with Infinity/NaN is ignored +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arc() with Infinity/NaN is ignored"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.moveTo(0, 0); + ctx.lineTo(100, 0); + ctx.arc(Infinity, 0, 50, 0, 2*Math.PI, true); + ctx.arc(-Infinity, 0, 50, 0, 2*Math.PI, true); + ctx.arc(NaN, 0, 50, 0, 2*Math.PI, true); + ctx.arc(0, Infinity, 50, 0, 2*Math.PI, true); + ctx.arc(0, -Infinity, 50, 0, 2*Math.PI, true); + ctx.arc(0, NaN, 50, 0, 2*Math.PI, true); + ctx.arc(0, 0, Infinity, 0, 2*Math.PI, true); + ctx.arc(0, 0, -Infinity, 0, 2*Math.PI, true); + ctx.arc(0, 0, NaN, 0, 2*Math.PI, true); + ctx.arc(0, 0, 50, Infinity, 2*Math.PI, true); + ctx.arc(0, 0, 50, -Infinity, 2*Math.PI, true); + ctx.arc(0, 0, 50, NaN, 2*Math.PI, true); + ctx.arc(0, 0, 50, 0, Infinity, true); + ctx.arc(0, 0, 50, 0, -Infinity, true); + ctx.arc(0, 0, 50, 0, NaN, true); + ctx.arc(Infinity, Infinity, 50, 0, 2*Math.PI, true); + ctx.arc(Infinity, Infinity, Infinity, 0, 2*Math.PI, true); + ctx.arc(Infinity, Infinity, Infinity, Infinity, 2*Math.PI, true); + ctx.arc(Infinity, Infinity, Infinity, Infinity, Infinity, true); + ctx.arc(Infinity, Infinity, Infinity, 0, Infinity, true); + ctx.arc(Infinity, Infinity, 50, Infinity, 2*Math.PI, true); + ctx.arc(Infinity, Infinity, 50, Infinity, Infinity, true); + ctx.arc(Infinity, Infinity, 50, 0, Infinity, true); + ctx.arc(Infinity, 0, Infinity, 0, 2*Math.PI, true); + ctx.arc(Infinity, 0, Infinity, Infinity, 2*Math.PI, true); + ctx.arc(Infinity, 0, Infinity, Infinity, Infinity, true); + ctx.arc(Infinity, 0, Infinity, 0, Infinity, true); + ctx.arc(Infinity, 0, 50, Infinity, 2*Math.PI, true); + ctx.arc(Infinity, 0, 50, Infinity, Infinity, true); + ctx.arc(Infinity, 0, 50, 0, Infinity, true); + ctx.arc(0, Infinity, Infinity, 0, 2*Math.PI, true); + ctx.arc(0, Infinity, Infinity, Infinity, 2*Math.PI, true); + ctx.arc(0, Infinity, Infinity, Infinity, Infinity, true); + ctx.arc(0, Infinity, Infinity, 0, Infinity, true); + ctx.arc(0, Infinity, 50, Infinity, 2*Math.PI, true); + ctx.arc(0, Infinity, 50, Infinity, Infinity, true); + ctx.arc(0, Infinity, 50, 0, Infinity, true); + ctx.arc(0, 0, Infinity, Infinity, 2*Math.PI, true); + ctx.arc(0, 0, Infinity, Infinity, Infinity, true); + ctx.arc(0, 0, Infinity, 0, Infinity, true); + ctx.arc(0, 0, 50, Infinity, Infinity, true); + ctx.lineTo(100, 50); + ctx.lineTo(0, 50); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 90,45, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.1.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.1.html new file mode 100644 index 0000000000..bf8a6f1f91 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.1.html @@ -0,0 +1,54 @@ + + +OffscreenCanvas test: 2d.path.arc.scale.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.scale.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Non-uniformly scaled arcs are the right shape

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.1.worker.js new file mode 100644 index 0000000000..5d9619a920 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.1.worker.js @@ -0,0 +1,49 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.scale.1 +// Description:Non-uniformly scaled arcs are the right shape +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Non-uniformly scaled arcs are the right shape"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.scale(2, 0.5); + ctx.fillStyle = '#0f0'; + ctx.beginPath(); + ctx.arc(25, 50, 56, 0, 2*Math.PI, false); + ctx.fill(); + ctx.fillStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(-25, 50); + ctx.arc(-25, 50, 24, 0, 2*Math.PI, false); + ctx.moveTo(75, 50); + ctx.arc(75, 50, 24, 0, 2*Math.PI, false); + ctx.moveTo(25, -25); + ctx.arc(25, -25, 24, 0, 2*Math.PI, false); + ctx.moveTo(25, 125); + ctx.arc(25, 125, 24, 0, 2*Math.PI, false); + ctx.fill(); + + _assertPixel(canvas, 0,0, 0,255,0,255); + _assertPixel(canvas, 50,0, 0,255,0,255); + _assertPixel(canvas, 99,0, 0,255,0,255); + _assertPixel(canvas, 0,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 99,25, 0,255,0,255); + _assertPixel(canvas, 0,49, 0,255,0,255); + _assertPixel(canvas, 50,49, 0,255,0,255); + _assertPixel(canvas, 99,49, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.2.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.2.html new file mode 100644 index 0000000000..95376882cd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.2.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.path.arc.scale.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.scale.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Highly scaled arcs are the right shape

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.2.worker.js new file mode 100644 index 0000000000..c655dad30f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.2.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.scale.2 +// Description:Highly scaled arcs are the right shape +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Highly scaled arcs are the right shape"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.scale(100, 100); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 1.2; + ctx.beginPath(); + ctx.arc(0, 0, 0.6, 0, Math.PI/2, false); + ctx.stroke(); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,25, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 50,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.1.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.1.html new file mode 100644 index 0000000000..624b307af7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.1.html @@ -0,0 +1,38 @@ + + +OffscreenCanvas test: 2d.path.arc.selfintersect.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.selfintersect.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arc() with lineWidth > 2*radius is drawn sensibly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.1.worker.js new file mode 100644 index 0000000000..6c77dbd5b1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.1.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.selfintersect.1 +// Description:arc() with lineWidth > 2*radius is drawn sensibly +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arc() with lineWidth > 2*radius is drawn sensibly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 200; + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.arc(100, 50, 25, 0, -Math.PI/2, true); + ctx.stroke(); + ctx.beginPath(); + ctx.arc(0, 0, 25, 0, -Math.PI/2, true); + ctx.stroke(); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.2.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.2.html new file mode 100644 index 0000000000..b49aa2437a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.2.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.path.arc.selfintersect.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.selfintersect.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arc() with lineWidth > 2*radius is drawn sensibly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.2.worker.js new file mode 100644 index 0000000000..2bbdacd46d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.2.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.selfintersect.2 +// Description:arc() with lineWidth > 2*radius is drawn sensibly +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arc() with lineWidth > 2*radius is drawn sensibly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 180; + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.arc(-50, 50, 25, 0, -Math.PI/2, true); + ctx.stroke(); + ctx.beginPath(); + ctx.arc(100, 0, 25, 0, -Math.PI/2, true); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 90,10, 0,255,0,255); + _assertPixel(canvas, 97,1, 0,255,0,255); + _assertPixel(canvas, 97,2, 0,255,0,255); + _assertPixel(canvas, 97,3, 0,255,0,255); + _assertPixel(canvas, 2,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.1.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.1.html new file mode 100644 index 0000000000..ceb3cb380c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.1.html @@ -0,0 +1,39 @@ + + +OffscreenCanvas test: 2d.path.arc.shape.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.shape.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arc() from 0 to pi does not draw anything in the wrong half

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.1.worker.js new file mode 100644 index 0000000000..e1058ae96d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.1.worker.js @@ -0,0 +1,34 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.shape.1 +// Description:arc() from 0 to pi does not draw anything in the wrong half +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arc() from 0 to pi does not draw anything in the wrong half"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 50; + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.arc(50, 50, 50, 0, Math.PI, false); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 20,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.2.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.2.html new file mode 100644 index 0000000000..a39fd03947 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.2.html @@ -0,0 +1,39 @@ + + +OffscreenCanvas test: 2d.path.arc.shape.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.shape.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arc() from 0 to pi draws stuff in the right half

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.2.worker.js new file mode 100644 index 0000000000..d444d9b04e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.2.worker.js @@ -0,0 +1,34 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.shape.2 +// Description:arc() from 0 to pi draws stuff in the right half +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arc() from 0 to pi draws stuff in the right half"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 100; + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.arc(50, 50, 50, 0, Math.PI, true); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 20,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.3.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.3.html new file mode 100644 index 0000000000..853814aef2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.3.html @@ -0,0 +1,38 @@ + + +OffscreenCanvas test: 2d.path.arc.shape.3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.shape.3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arc() from 0 to -pi/2 does not draw anything in the wrong quadrant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.3.worker.js new file mode 100644 index 0000000000..b8008e778b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.3.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.shape.3 +// Description:arc() from 0 to -pi/2 does not draw anything in the wrong quadrant +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arc() from 0 to -pi/2 does not draw anything in the wrong quadrant"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 100; + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.arc(0, 50, 50, 0, -Math.PI/2, false); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.4.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.4.html new file mode 100644 index 0000000000..e6221947df --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.4.html @@ -0,0 +1,38 @@ + + +OffscreenCanvas test: 2d.path.arc.shape.4 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.shape.4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arc() from 0 to -pi/2 draws stuff in the right quadrant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.4.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.4.worker.js new file mode 100644 index 0000000000..9174641c20 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.4.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.shape.4 +// Description:arc() from 0 to -pi/2 draws stuff in the right quadrant +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arc() from 0 to -pi/2 draws stuff in the right quadrant"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 150; + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.arc(-50, 50, 100, 0, -Math.PI/2, true); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.5.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.5.html new file mode 100644 index 0000000000..968a1c58c0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.5.html @@ -0,0 +1,38 @@ + + +OffscreenCanvas test: 2d.path.arc.shape.5 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.shape.5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arc() from 0 to 5pi does not draw crazy things

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.5.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.5.worker.js new file mode 100644 index 0000000000..7f40e4341a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.5.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.shape.5 +// Description:arc() from 0 to 5pi does not draw crazy things +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arc() from 0 to 5pi does not draw crazy things"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 200; + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.arc(300, 0, 100, 0, 5*Math.PI, false); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.1.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.1.html new file mode 100644 index 0000000000..ced1207a9b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.1.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.arc.twopie.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.twopie.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arc() draws nothing when end = start + 2pi-e and anticlockwise

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.1.worker.js new file mode 100644 index 0000000000..e9abf086e0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.1.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.twopie.1 +// Description:arc() draws nothing when end = start + 2pi-e and anticlockwise +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arc() draws nothing when end = start + 2pi-e and anticlockwise"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 100; + ctx.beginPath(); + ctx.arc(50, 25, 50, 0, 2*Math.PI - 1e-4, true); + ctx.stroke(); + _assertPixel(canvas, 50,20, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.2.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.2.html new file mode 100644 index 0000000000..4948b10f2f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.2.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.arc.twopie.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.twopie.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arc() draws a full circle when end = start + 2pi-e and clockwise

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.2.worker.js new file mode 100644 index 0000000000..5e9c51e5e3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.2.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.twopie.2 +// Description:arc() draws a full circle when end = start + 2pi-e and clockwise +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arc() draws a full circle when end = start + 2pi-e and clockwise"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 100; + ctx.beginPath(); + ctx.arc(50, 25, 50, 0, 2*Math.PI - 1e-4, false); + ctx.stroke(); + _assertPixel(canvas, 50,20, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.3.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.3.html new file mode 100644 index 0000000000..c4036fc06e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.3.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.arc.twopie.3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.twopie.3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arc() draws a full circle when end = start + 2pi+e and anticlockwise

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.3.worker.js new file mode 100644 index 0000000000..ad72fbd0af --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.3.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.twopie.3 +// Description:arc() draws a full circle when end = start + 2pi+e and anticlockwise +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arc() draws a full circle when end = start + 2pi+e and anticlockwise"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 100; + ctx.beginPath(); + ctx.arc(50, 25, 50, 0, 2*Math.PI + 1e-4, true); + ctx.stroke(); + _assertPixel(canvas, 50,20, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.4.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.4.html new file mode 100644 index 0000000000..392f00e652 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.4.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.arc.twopie.4 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.twopie.4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arc() draws nothing when end = start + 2pi+e and clockwise

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.4.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.4.worker.js new file mode 100644 index 0000000000..15d799209c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.4.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.twopie.4 +// Description:arc() draws nothing when end = start + 2pi+e and clockwise +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arc() draws nothing when end = start + 2pi+e and clockwise"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 100; + ctx.beginPath(); + ctx.arc(50, 25, 50, 0, 2*Math.PI + 1e-4, false); + ctx.stroke(); + _assertPixel(canvas, 50,20, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.5.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.5.html new file mode 100644 index 0000000000..17c66c527c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.5.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.path.arc.twopie.5 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.twopie.5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arc() draws correctly when start = 2 and end = start + 2pi+e and clockwise

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.5.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.5.worker.js new file mode 100644 index 0000000000..8fa29d5a97 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.5.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.twopie.5 +// Description:arc() draws correctly when start = 2 and end = start + 2pi+e and clockwise +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arc() draws correctly when start = 2 and end = start + 2pi+e and clockwise"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#fff'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#000'; + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.arc(50, 25, 50, 2, 2 + 2*Math.PI, false); + ctx.closePath(); + ctx.fill(); + _assertPixel(canvas, 95,25, 0,0,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.6.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.6.html new file mode 100644 index 0000000000..befec82704 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.6.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.path.arc.twopie.6 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.twopie.6

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arc() draws correctly when start = 5 and end = start + 2pi+e and clockwise

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.6.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.6.worker.js new file mode 100644 index 0000000000..546cbce33c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.6.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.twopie.6 +// Description:arc() draws correctly when start = 5 and end = start + 2pi+e and clockwise +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arc() draws correctly when start = 5 and end = start + 2pi+e and clockwise"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#fff'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#000'; + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.arc(50, 25, 50, 5, 5 + 2*Math.PI, false); + ctx.closePath(); + ctx.fill(); + _assertPixel(canvas, 5,25, 0,0,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.1.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.1.html new file mode 100644 index 0000000000..5757ab3ddf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.1.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.arc.zero.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.zero.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arc() draws nothing when startAngle = endAngle and anticlockwise

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.1.worker.js new file mode 100644 index 0000000000..5a6d35f691 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.1.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.zero.1 +// Description:arc() draws nothing when startAngle = endAngle and anticlockwise +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arc() draws nothing when startAngle = endAngle and anticlockwise"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 100; + ctx.beginPath(); + ctx.arc(50, 25, 50, 0, 0, true); + ctx.stroke(); + _assertPixel(canvas, 50,20, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.2.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.2.html new file mode 100644 index 0000000000..69f8472443 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.2.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.arc.zero.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.zero.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arc() draws nothing when startAngle = endAngle and clockwise

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.2.worker.js new file mode 100644 index 0000000000..a285462fc0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.2.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.zero.2 +// Description:arc() draws nothing when startAngle = endAngle and clockwise +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arc() draws nothing when startAngle = endAngle and clockwise"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 100; + ctx.beginPath(); + ctx.arc(50, 25, 50, 0, 0, false); + ctx.stroke(); + _assertPixel(canvas, 50,20, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.zeroradius.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.zeroradius.html new file mode 100644 index 0000000000..7303b7dc1c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.zeroradius.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.path.arc.zeroradius + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arc.zeroradius

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arc() with zero radius draws a line to the start point

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.zeroradius.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.zeroradius.worker.js new file mode 100644 index 0000000000..183acc1bbb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arc.zeroradius.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arc.zeroradius +// Description:arc() with zero radius draws a line to the start point +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arc() with zero radius draws a line to the start point"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00' + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 50; + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(0, 25); + ctx.arc(200, 25, 0, 0, Math.PI, true); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.1.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.1.html new file mode 100644 index 0000000000..e7558d628f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.1.html @@ -0,0 +1,46 @@ + + +OffscreenCanvas test: 2d.path.arcTo.coincide.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arcTo.coincide.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arcTo() has no effect if P0 = P1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.1.worker.js new file mode 100644 index 0000000000..80a74c6d91 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.1.worker.js @@ -0,0 +1,41 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arcTo.coincide.1 +// Description:arcTo() has no effect if P0 = P1 +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arcTo() has no effect if P0 = P1"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 50; + + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(0, 25); + ctx.arcTo(0, 25, 50, 1000, 1); + ctx.lineTo(100, 25); + ctx.stroke(); + + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.arcTo(50, 25, 100, 25, 1); + ctx.stroke(); + + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 50,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.2.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.2.html new file mode 100644 index 0000000000..18ac31524d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.2.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.path.arcTo.coincide.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arcTo.coincide.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arcTo() draws a straight line to P1 if P1 = P2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.2.worker.js new file mode 100644 index 0000000000..a35ffe6977 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.2.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arcTo.coincide.2 +// Description:arcTo() draws a straight line to P1 if P1 = P2 +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arcTo() draws a straight line to P1 if P1 = P2"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 50; + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(0, 25); + ctx.arcTo(100, 25, 100, 25, 1); + ctx.stroke(); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.1.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.1.html new file mode 100644 index 0000000000..b9bcc7b238 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.1.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.path.arcTo.collinear.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arcTo.collinear.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arcTo() with all points on a line, and P1 between P0/P2, draws a straight line to P1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.1.worker.js new file mode 100644 index 0000000000..a814b1af07 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.1.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arcTo.collinear.1 +// Description:arcTo() with all points on a line, and P1 between P0/P2, draws a straight line to P1 +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arcTo() with all points on a line, and P1 between P0/P2, draws a straight line to P1"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 50; + + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(0, 25); + ctx.arcTo(100, 25, 200, 25, 1); + ctx.stroke(); + + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(-100, 25); + ctx.arcTo(0, 25, 100, 25, 1); + ctx.stroke(); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.2.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.2.html new file mode 100644 index 0000000000..f51a7af206 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.2.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.path.arcTo.collinear.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arcTo.collinear.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arcTo() with all points on a line, and P2 between P0/P1, draws a straight line to P1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.2.worker.js new file mode 100644 index 0000000000..ba9a75ed4e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.2.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arcTo.collinear.2 +// Description:arcTo() with all points on a line, and P2 between P0/P1, draws a straight line to P1 +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arcTo() with all points on a line, and P2 between P0/P1, draws a straight line to P1"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 50; + + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(0, 25); + ctx.arcTo(100, 25, 10, 25, 1); + ctx.stroke(); + + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(100, 25); + ctx.arcTo(200, 25, 110, 25, 1); + ctx.stroke(); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.3.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.3.html new file mode 100644 index 0000000000..568d0f8f2b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.3.html @@ -0,0 +1,48 @@ + + +OffscreenCanvas test: 2d.path.arcTo.collinear.3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arcTo.collinear.3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arcTo() with all points on a line, and P0 between P1/P2, draws a straight line to P1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.3.worker.js new file mode 100644 index 0000000000..8087909cb7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.3.worker.js @@ -0,0 +1,43 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arcTo.collinear.3 +// Description:arcTo() with all points on a line, and P0 between P1/P2, draws a straight line to P1 +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arcTo() with all points on a line, and P0 between P1/P2, draws a straight line to P1"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 50; + + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(0, 25); + ctx.arcTo(100, 25, -100, 25, 1); + ctx.stroke(); + + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(100, 25); + ctx.arcTo(200, 25, 0, 25, 1); + ctx.stroke(); + + ctx.beginPath(); + ctx.moveTo(-100, 25); + ctx.arcTo(0, 25, -200, 25, 1); + ctx.stroke(); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.1.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.1.html new file mode 100644 index 0000000000..ec1bd0399d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.1.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.arcTo.ensuresubpath.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arcTo.ensuresubpath.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  If there is no subpath, the first control point is added (and nothing is drawn up to it)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.1.worker.js new file mode 100644 index 0000000000..74d71b6253 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.1.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arcTo.ensuresubpath.1 +// Description:If there is no subpath, the first control point is added (and nothing is drawn up to it) +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("If there is no subpath, the first control point is added (and nothing is drawn up to it)"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 50; + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.arcTo(100, 50, 200, 50, 0.1); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.2.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.2.html new file mode 100644 index 0000000000..60ee458524 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.2.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.path.arcTo.ensuresubpath.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arcTo.ensuresubpath.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  If there is no subpath, the first control point is added

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.2.worker.js new file mode 100644 index 0000000000..76790925af --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.2.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arcTo.ensuresubpath.2 +// Description:If there is no subpath, the first control point is added +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("If there is no subpath, the first control point is added"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 50; + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.arcTo(0, 25, 50, 250, 0.1); // adds (x1,y1), draws nothing + ctx.lineTo(100, 25); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.negative.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.negative.html new file mode 100644 index 0000000000..c35e293a6f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.negative.html @@ -0,0 +1,29 @@ + + +OffscreenCanvas test: 2d.path.arcTo.negative + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arcTo.negative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arcTo() with negative radius throws an exception

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.negative.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.negative.worker.js new file mode 100644 index 0000000000..104e7a6387 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.negative.worker.js @@ -0,0 +1,24 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arcTo.negative +// Description:arcTo() with negative radius throws an exception +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arcTo() with negative radius throws an exception"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.arcTo(0, 0, 0, 0, -1); }); + var path = new Path2D(); + assert_throws_dom("INDEX_SIZE_ERR", function() { path.arcTo(10, 10, 20, 20, -5); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.nonfinite.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.nonfinite.html new file mode 100644 index 0000000000..9d2256d79c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.nonfinite.html @@ -0,0 +1,75 @@ + + +OffscreenCanvas test: 2d.path.arcTo.nonfinite + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arcTo.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arcTo() with Infinity/NaN is ignored

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.nonfinite.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.nonfinite.worker.js new file mode 100644 index 0000000000..1d2c913cfe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.nonfinite.worker.js @@ -0,0 +1,70 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arcTo.nonfinite +// Description:arcTo() with Infinity/NaN is ignored +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arcTo() with Infinity/NaN is ignored"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.moveTo(0, 0); + ctx.lineTo(100, 0); + ctx.arcTo(Infinity, 50, 0, 50, 0); + ctx.arcTo(-Infinity, 50, 0, 50, 0); + ctx.arcTo(NaN, 50, 0, 50, 0); + ctx.arcTo(0, Infinity, 0, 50, 0); + ctx.arcTo(0, -Infinity, 0, 50, 0); + ctx.arcTo(0, NaN, 0, 50, 0); + ctx.arcTo(0, 50, Infinity, 50, 0); + ctx.arcTo(0, 50, -Infinity, 50, 0); + ctx.arcTo(0, 50, NaN, 50, 0); + ctx.arcTo(0, 50, 0, Infinity, 0); + ctx.arcTo(0, 50, 0, -Infinity, 0); + ctx.arcTo(0, 50, 0, NaN, 0); + ctx.arcTo(0, 50, 0, 50, Infinity); + ctx.arcTo(0, 50, 0, 50, -Infinity); + ctx.arcTo(0, 50, 0, 50, NaN); + ctx.arcTo(Infinity, Infinity, 0, 50, 0); + ctx.arcTo(Infinity, Infinity, Infinity, 50, 0); + ctx.arcTo(Infinity, Infinity, Infinity, Infinity, 0); + ctx.arcTo(Infinity, Infinity, Infinity, Infinity, Infinity); + ctx.arcTo(Infinity, Infinity, Infinity, 50, Infinity); + ctx.arcTo(Infinity, Infinity, 0, Infinity, 0); + ctx.arcTo(Infinity, Infinity, 0, Infinity, Infinity); + ctx.arcTo(Infinity, Infinity, 0, 50, Infinity); + ctx.arcTo(Infinity, 50, Infinity, 50, 0); + ctx.arcTo(Infinity, 50, Infinity, Infinity, 0); + ctx.arcTo(Infinity, 50, Infinity, Infinity, Infinity); + ctx.arcTo(Infinity, 50, Infinity, 50, Infinity); + ctx.arcTo(Infinity, 50, 0, Infinity, 0); + ctx.arcTo(Infinity, 50, 0, Infinity, Infinity); + ctx.arcTo(Infinity, 50, 0, 50, Infinity); + ctx.arcTo(0, Infinity, Infinity, 50, 0); + ctx.arcTo(0, Infinity, Infinity, Infinity, 0); + ctx.arcTo(0, Infinity, Infinity, Infinity, Infinity); + ctx.arcTo(0, Infinity, Infinity, 50, Infinity); + ctx.arcTo(0, Infinity, 0, Infinity, 0); + ctx.arcTo(0, Infinity, 0, Infinity, Infinity); + ctx.arcTo(0, Infinity, 0, 50, Infinity); + ctx.arcTo(0, 50, Infinity, Infinity, 0); + ctx.arcTo(0, 50, Infinity, Infinity, Infinity); + ctx.arcTo(0, 50, Infinity, 50, Infinity); + ctx.arcTo(0, 50, 0, Infinity, Infinity); + ctx.lineTo(100, 50); + ctx.lineTo(0, 50); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 90,45, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.scale.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.scale.html new file mode 100644 index 0000000000..26dfa640ff --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.scale.html @@ -0,0 +1,47 @@ + + +OffscreenCanvas test: 2d.path.arcTo.scale + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arcTo.scale

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arcTo scales the curve, not just the control points

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.scale.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.scale.worker.js new file mode 100644 index 0000000000..dc41e6d92d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.scale.worker.js @@ -0,0 +1,42 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arcTo.scale +// Description:arcTo scales the curve, not just the control points +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arcTo scales the curve, not just the control points"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(0, 50); + ctx.translate(100, 0); + ctx.scale(0.1, 1); + ctx.arcTo(50, 50, 50, 0, 50); + ctx.lineTo(-1000, 0); + ctx.fill(); + + _assertPixel(canvas, 0,0, 0,255,0,255); + _assertPixel(canvas, 50,0, 0,255,0,255); + _assertPixel(canvas, 99,0, 0,255,0,255); + _assertPixel(canvas, 0,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 99,25, 0,255,0,255); + _assertPixel(canvas, 0,49, 0,255,0,255); + _assertPixel(canvas, 50,49, 0,255,0,255); + _assertPixel(canvas, 99,49, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve1.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve1.html new file mode 100644 index 0000000000..f7d10dd61a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve1.html @@ -0,0 +1,60 @@ + + +OffscreenCanvas test: 2d.path.arcTo.shape.curve1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arcTo.shape.curve1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arcTo() curves in the right kind of shape

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve1.worker.js new file mode 100644 index 0000000000..c7e61ab576 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve1.worker.js @@ -0,0 +1,55 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arcTo.shape.curve1 +// Description:arcTo() curves in the right kind of shape +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arcTo() curves in the right kind of shape"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var tol = 1.5; // tolerance to avoid antialiasing artifacts + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.beginPath(); + ctx.moveTo(10, 25); + ctx.arcTo(75, 25, 75, 60, 20); + ctx.stroke(); + + ctx.fillStyle = '#0f0'; + ctx.beginPath(); + ctx.rect(10, 20, 45, 10); + ctx.moveTo(80, 45); + ctx.arc(55, 45, 25+tol, 0, -Math.PI/2, true); + ctx.arc(55, 45, 15-tol, -Math.PI/2, 0, false); + ctx.fill(); + + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 55,19, 0,255,0,255); + _assertPixel(canvas, 55,20, 0,255,0,255); + _assertPixel(canvas, 55,21, 0,255,0,255); + _assertPixel(canvas, 64,22, 0,255,0,255); + _assertPixel(canvas, 65,21, 0,255,0,255); + _assertPixel(canvas, 72,28, 0,255,0,255); + _assertPixel(canvas, 73,27, 0,255,0,255); + _assertPixel(canvas, 78,36, 0,255,0,255); + _assertPixel(canvas, 79,35, 0,255,0,255); + _assertPixel(canvas, 80,44, 0,255,0,255); + _assertPixel(canvas, 80,45, 0,255,0,255); + _assertPixel(canvas, 80,46, 0,255,0,255); + _assertPixel(canvas, 65,45, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve2.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve2.html new file mode 100644 index 0000000000..1a023322b2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve2.html @@ -0,0 +1,59 @@ + + +OffscreenCanvas test: 2d.path.arcTo.shape.curve2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arcTo.shape.curve2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arcTo() curves in the right kind of shape

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve2.worker.js new file mode 100644 index 0000000000..f00e506f30 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve2.worker.js @@ -0,0 +1,54 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arcTo.shape.curve2 +// Description:arcTo() curves in the right kind of shape +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arcTo() curves in the right kind of shape"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var tol = 1.5; // tolerance to avoid antialiasing artifacts + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#f00'; + ctx.beginPath(); + ctx.rect(10, 20, 45, 10); + ctx.moveTo(80, 45); + ctx.arc(55, 45, 25-tol, 0, -Math.PI/2, true); + ctx.arc(55, 45, 15+tol, -Math.PI/2, 0, false); + ctx.fill(); + + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 10; + ctx.beginPath(); + ctx.moveTo(10, 25); + ctx.arcTo(75, 25, 75, 60, 20); + ctx.stroke(); + + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 55,19, 0,255,0,255); + _assertPixel(canvas, 55,20, 0,255,0,255); + _assertPixel(canvas, 55,21, 0,255,0,255); + _assertPixel(canvas, 64,22, 0,255,0,255); + _assertPixel(canvas, 65,21, 0,255,0,255); + _assertPixel(canvas, 72,28, 0,255,0,255); + _assertPixel(canvas, 73,27, 0,255,0,255); + _assertPixel(canvas, 78,36, 0,255,0,255); + _assertPixel(canvas, 79,35, 0,255,0,255); + _assertPixel(canvas, 80,44, 0,255,0,255); + _assertPixel(canvas, 80,45, 0,255,0,255); + _assertPixel(canvas, 80,46, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.end.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.end.html new file mode 100644 index 0000000000..3f8af61215 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.end.html @@ -0,0 +1,40 @@ + + +OffscreenCanvas test: 2d.path.arcTo.shape.end + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arcTo.shape.end

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arcTo() does not draw anything from P1 to P2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.end.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.end.worker.js new file mode 100644 index 0000000000..20cc956a44 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.end.worker.js @@ -0,0 +1,35 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arcTo.shape.end +// Description:arcTo() does not draw anything from P1 to P2 +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arcTo() does not draw anything from P1 to P2"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 50; + ctx.beginPath(); + ctx.moveTo(-100, -100); + ctx.arcTo(-100, 25, 200, 25, 10); + ctx.stroke(); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.start.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.start.html new file mode 100644 index 0000000000..a426a19d8a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.start.html @@ -0,0 +1,40 @@ + + +OffscreenCanvas test: 2d.path.arcTo.shape.start + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arcTo.shape.start

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arcTo() draws a straight line from P0 to P1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.start.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.start.worker.js new file mode 100644 index 0000000000..cebf27a821 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.start.worker.js @@ -0,0 +1,35 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arcTo.shape.start +// Description:arcTo() draws a straight line from P0 to P1 +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arcTo() draws a straight line from P0 to P1"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.beginPath(); + ctx.moveTo(0, 25); + ctx.arcTo(200, 25, 200, 50, 10); + ctx.stroke(); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.transformation.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.transformation.html new file mode 100644 index 0000000000..842210138a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.transformation.html @@ -0,0 +1,46 @@ + + +OffscreenCanvas test: 2d.path.arcTo.transformation + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arcTo.transformation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arcTo joins up to the last subpath point correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.transformation.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.transformation.worker.js new file mode 100644 index 0000000000..585a500079 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.transformation.worker.js @@ -0,0 +1,41 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arcTo.transformation +// Description:arcTo joins up to the last subpath point correctly +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arcTo joins up to the last subpath point correctly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(0, 50); + ctx.translate(100, 0); + ctx.arcTo(50, 50, 50, 0, 50); + ctx.lineTo(-100, 0); + ctx.fill(); + + _assertPixel(canvas, 0,0, 0,255,0,255); + _assertPixel(canvas, 50,0, 0,255,0,255); + _assertPixel(canvas, 99,0, 0,255,0,255); + _assertPixel(canvas, 0,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 99,25, 0,255,0,255); + _assertPixel(canvas, 0,49, 0,255,0,255); + _assertPixel(canvas, 50,49, 0,255,0,255); + _assertPixel(canvas, 99,49, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.1.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.1.html new file mode 100644 index 0000000000..a367385551 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.1.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.path.arcTo.zero.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arcTo.zero.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arcTo() with zero radius draws a straight line from P0 to P1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.1.worker.js new file mode 100644 index 0000000000..8f6d979a55 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.1.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arcTo.zero.1 +// Description:arcTo() with zero radius draws a straight line from P0 to P1 +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arcTo() with zero radius draws a straight line from P0 to P1"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 50; + + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(0, 25); + ctx.arcTo(100, 25, 100, 100, 0); + ctx.stroke(); + + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(0, -25); + ctx.arcTo(50, -25, 50, 50, 0); + ctx.stroke(); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.2.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.2.html new file mode 100644 index 0000000000..87ab4e13de --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.2.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.path.arcTo.zero.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.arcTo.zero.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arcTo() with zero radius draws a straight line from P0 to P1, even when all points are collinear

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.2.worker.js new file mode 100644 index 0000000000..0a45976325 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.2.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.arcTo.zero.2 +// Description:arcTo() with zero radius draws a straight line from P0 to P1, even when all points are collinear +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("arcTo() with zero radius draws a straight line from P0 to P1, even when all points are collinear"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 50; + + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(0, 25); + ctx.arcTo(100, 25, -100, 25, 0); + ctx.stroke(); + + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(100, 25); + ctx.arcTo(200, 25, 50, 25, 0); + ctx.stroke(); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.beginPath.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.beginPath.html new file mode 100644 index 0000000000..b2043d604d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.beginPath.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.path.beginPath + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.beginPath

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.beginPath.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.beginPath.worker.js new file mode 100644 index 0000000000..35a4acc84d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.beginPath.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.beginPath +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.rect(0, 0, 100, 50); + ctx.beginPath(); + ctx.fillStyle = '#f00'; + ctx.fill(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.basic.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.basic.html new file mode 100644 index 0000000000..099919060b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.basic.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.path.bezierCurveTo.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.bezierCurveTo.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.basic.worker.js new file mode 100644 index 0000000000..e7c86a08f9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.basic.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.bezierCurveTo.basic +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.beginPath(); + ctx.moveTo(0, 25); + ctx.bezierCurveTo(100, 25, 100, 25, 100, 25); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.1.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.1.html new file mode 100644 index 0000000000..6a11d1bfbb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.1.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.path.bezierCurveTo.ensuresubpath.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.bezierCurveTo.ensuresubpath.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  If there is no subpath, the first control point is added (and nothing is drawn up to it)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.1.worker.js new file mode 100644 index 0000000000..d6ef6f3f1b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.1.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.bezierCurveTo.ensuresubpath.1 +// Description:If there is no subpath, the first control point is added (and nothing is drawn up to it) +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("If there is no subpath, the first control point is added (and nothing is drawn up to it)"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 50; + ctx.beginPath(); + ctx.bezierCurveTo(100, 50, 200, 50, 200, 50); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 95,45, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.html new file mode 100644 index 0000000000..d2afd19f66 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.path.bezierCurveTo.ensuresubpath.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.bezierCurveTo.ensuresubpath.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  If there is no subpath, the first control point is added

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.worker.js new file mode 100644 index 0000000000..6860e60f4a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.bezierCurveTo.ensuresubpath.2 +// Description:If there is no subpath, the first control point is added +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("If there is no subpath, the first control point is added"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.beginPath(); + ctx.bezierCurveTo(0, 25, 100, 25, 100, 25); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 5,45, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.nonfinite.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.nonfinite.html new file mode 100644 index 0000000000..b49e2f43f3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.nonfinite.html @@ -0,0 +1,109 @@ + + +OffscreenCanvas test: 2d.path.bezierCurveTo.nonfinite + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.bezierCurveTo.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  bezierCurveTo() with Infinity/NaN is ignored

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.nonfinite.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.nonfinite.worker.js new file mode 100644 index 0000000000..7eaf278f6c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.nonfinite.worker.js @@ -0,0 +1,104 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.bezierCurveTo.nonfinite +// Description:bezierCurveTo() with Infinity/NaN is ignored +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("bezierCurveTo() with Infinity/NaN is ignored"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.moveTo(0, 0); + ctx.lineTo(100, 0); + ctx.bezierCurveTo(Infinity, 50, 0, 50, 0, 50); + ctx.bezierCurveTo(-Infinity, 50, 0, 50, 0, 50); + ctx.bezierCurveTo(NaN, 50, 0, 50, 0, 50); + ctx.bezierCurveTo(0, Infinity, 0, 50, 0, 50); + ctx.bezierCurveTo(0, -Infinity, 0, 50, 0, 50); + ctx.bezierCurveTo(0, NaN, 0, 50, 0, 50); + ctx.bezierCurveTo(0, 50, Infinity, 50, 0, 50); + ctx.bezierCurveTo(0, 50, -Infinity, 50, 0, 50); + ctx.bezierCurveTo(0, 50, NaN, 50, 0, 50); + ctx.bezierCurveTo(0, 50, 0, Infinity, 0, 50); + ctx.bezierCurveTo(0, 50, 0, -Infinity, 0, 50); + ctx.bezierCurveTo(0, 50, 0, NaN, 0, 50); + ctx.bezierCurveTo(0, 50, 0, 50, Infinity, 50); + ctx.bezierCurveTo(0, 50, 0, 50, -Infinity, 50); + ctx.bezierCurveTo(0, 50, 0, 50, NaN, 50); + ctx.bezierCurveTo(0, 50, 0, 50, 0, Infinity); + ctx.bezierCurveTo(0, 50, 0, 50, 0, -Infinity); + ctx.bezierCurveTo(0, 50, 0, 50, 0, NaN); + ctx.bezierCurveTo(Infinity, Infinity, 0, 50, 0, 50); + ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, 0, 50); + ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, 0, 50); + ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, Infinity, 50); + ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); + ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, 0, Infinity); + ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, Infinity, 50); + ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, Infinity, Infinity); + ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, 0, Infinity); + ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, 0, 50); + ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, Infinity, 50); + ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, Infinity, Infinity); + ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, 0, Infinity); + ctx.bezierCurveTo(Infinity, Infinity, 0, 50, Infinity, 50); + ctx.bezierCurveTo(Infinity, Infinity, 0, 50, Infinity, Infinity); + ctx.bezierCurveTo(Infinity, Infinity, 0, 50, 0, Infinity); + ctx.bezierCurveTo(Infinity, 50, Infinity, 50, 0, 50); + ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, 0, 50); + ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, Infinity, 50); + ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, Infinity, Infinity); + ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, 0, Infinity); + ctx.bezierCurveTo(Infinity, 50, Infinity, 50, Infinity, 50); + ctx.bezierCurveTo(Infinity, 50, Infinity, 50, Infinity, Infinity); + ctx.bezierCurveTo(Infinity, 50, Infinity, 50, 0, Infinity); + ctx.bezierCurveTo(Infinity, 50, 0, Infinity, 0, 50); + ctx.bezierCurveTo(Infinity, 50, 0, Infinity, Infinity, 50); + ctx.bezierCurveTo(Infinity, 50, 0, Infinity, Infinity, Infinity); + ctx.bezierCurveTo(Infinity, 50, 0, Infinity, 0, Infinity); + ctx.bezierCurveTo(Infinity, 50, 0, 50, Infinity, 50); + ctx.bezierCurveTo(Infinity, 50, 0, 50, Infinity, Infinity); + ctx.bezierCurveTo(Infinity, 50, 0, 50, 0, Infinity); + ctx.bezierCurveTo(0, Infinity, Infinity, 50, 0, 50); + ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, 0, 50); + ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, Infinity, 50); + ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, Infinity, Infinity); + ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, 0, Infinity); + ctx.bezierCurveTo(0, Infinity, Infinity, 50, Infinity, 50); + ctx.bezierCurveTo(0, Infinity, Infinity, 50, Infinity, Infinity); + ctx.bezierCurveTo(0, Infinity, Infinity, 50, 0, Infinity); + ctx.bezierCurveTo(0, Infinity, 0, Infinity, 0, 50); + ctx.bezierCurveTo(0, Infinity, 0, Infinity, Infinity, 50); + ctx.bezierCurveTo(0, Infinity, 0, Infinity, Infinity, Infinity); + ctx.bezierCurveTo(0, Infinity, 0, Infinity, 0, Infinity); + ctx.bezierCurveTo(0, Infinity, 0, 50, Infinity, 50); + ctx.bezierCurveTo(0, Infinity, 0, 50, Infinity, Infinity); + ctx.bezierCurveTo(0, Infinity, 0, 50, 0, Infinity); + ctx.bezierCurveTo(0, 50, Infinity, Infinity, 0, 50); + ctx.bezierCurveTo(0, 50, Infinity, Infinity, Infinity, 50); + ctx.bezierCurveTo(0, 50, Infinity, Infinity, Infinity, Infinity); + ctx.bezierCurveTo(0, 50, Infinity, Infinity, 0, Infinity); + ctx.bezierCurveTo(0, 50, Infinity, 50, Infinity, 50); + ctx.bezierCurveTo(0, 50, Infinity, 50, Infinity, Infinity); + ctx.bezierCurveTo(0, 50, Infinity, 50, 0, Infinity); + ctx.bezierCurveTo(0, 50, 0, Infinity, Infinity, 50); + ctx.bezierCurveTo(0, 50, 0, Infinity, Infinity, Infinity); + ctx.bezierCurveTo(0, 50, 0, Infinity, 0, Infinity); + ctx.bezierCurveTo(0, 50, 0, 50, Infinity, Infinity); + ctx.lineTo(100, 50); + ctx.lineTo(0, 50); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 90,45, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.scaled.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.scaled.html new file mode 100644 index 0000000000..10a085e9de --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.scaled.html @@ -0,0 +1,40 @@ + + +OffscreenCanvas test: 2d.path.bezierCurveTo.scaled + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.bezierCurveTo.scaled

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.scaled.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.scaled.worker.js new file mode 100644 index 0000000000..5098fe83eb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.scaled.worker.js @@ -0,0 +1,35 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.bezierCurveTo.scaled +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.scale(1000, 1000); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 0.055; + ctx.beginPath(); + ctx.moveTo(-2, 3.1); + ctx.bezierCurveTo(-2, -1, 2.1, -1, 2.1, 3.1); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.shape.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.shape.html new file mode 100644 index 0000000000..fc6b9273e0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.shape.html @@ -0,0 +1,39 @@ + + +OffscreenCanvas test: 2d.path.bezierCurveTo.shape + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.bezierCurveTo.shape

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.shape.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.shape.worker.js new file mode 100644 index 0000000000..58f601c5d5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.shape.worker.js @@ -0,0 +1,34 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.bezierCurveTo.shape +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 55; + ctx.beginPath(); + ctx.moveTo(-2000, 3100); + ctx.bezierCurveTo(-2000, -1000, 2100, -1000, 2100, 3100); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.1.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.1.html new file mode 100644 index 0000000000..e90be3d73f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.1.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.path.clip.basic.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.clip.basic.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.1.worker.js new file mode 100644 index 0000000000..708608e1e0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.1.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.clip.basic.1 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.beginPath(); + ctx.rect(0, 0, 100, 50); + ctx.clip(); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.2.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.2.html new file mode 100644 index 0000000000..6426ba2d83 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.2.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.path.clip.basic.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.clip.basic.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.2.worker.js new file mode 100644 index 0000000000..1ec28b6205 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.2.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.clip.basic.2 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.beginPath(); + ctx.rect(-100, 0, 100, 50); + ctx.clip(); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.empty.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.empty.html new file mode 100644 index 0000000000..30e0d6cba4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.empty.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.path.clip.empty + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.clip.empty

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.empty.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.empty.worker.js new file mode 100644 index 0000000000..3f91a7e2e7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.empty.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.clip.empty +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.beginPath(); + ctx.clip(); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.intersect.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.intersect.html new file mode 100644 index 0000000000..94607f6d92 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.intersect.html @@ -0,0 +1,40 @@ + + +OffscreenCanvas test: 2d.path.clip.intersect + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.clip.intersect

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.intersect.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.intersect.worker.js new file mode 100644 index 0000000000..8c0fcb68bd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.intersect.worker.js @@ -0,0 +1,35 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.clip.intersect +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.beginPath(); + ctx.rect(0, 0, 50, 50); + ctx.clip(); + ctx.beginPath(); + ctx.rect(50, 0, 50, 50) + ctx.clip(); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.unaffected.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.unaffected.html new file mode 100644 index 0000000000..e9b69282af --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.unaffected.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.path.clip.unaffected + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.clip.unaffected

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.unaffected.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.unaffected.worker.js new file mode 100644 index 0000000000..d65a421d33 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.unaffected.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.clip.unaffected +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + + ctx.beginPath(); + ctx.moveTo(0, 0); + ctx.lineTo(0, 50); + ctx.lineTo(100, 50); + ctx.lineTo(100, 0); + ctx.clip(); + + ctx.lineTo(0, 0); + ctx.fill(); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.1.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.1.html new file mode 100644 index 0000000000..2fd7c1abbf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.1.html @@ -0,0 +1,45 @@ + + +OffscreenCanvas test: 2d.path.clip.winding.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.clip.winding.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.1.worker.js new file mode 100644 index 0000000000..aa89fd55c3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.1.worker.js @@ -0,0 +1,40 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.clip.winding.1 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.beginPath(); + ctx.moveTo(-10, -10); + ctx.lineTo(110, -10); + ctx.lineTo(110, 60); + ctx.lineTo(-10, 60); + ctx.lineTo(-10, -10); + ctx.lineTo(0, 0); + ctx.lineTo(0, 50); + ctx.lineTo(100, 50); + ctx.lineTo(100, 0); + ctx.clip(); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.2.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.2.html new file mode 100644 index 0000000000..eed064f84e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.2.html @@ -0,0 +1,49 @@ + + +OffscreenCanvas test: 2d.path.clip.winding.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.clip.winding.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.2.worker.js new file mode 100644 index 0000000000..5c9cac6bb6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.2.worker.js @@ -0,0 +1,44 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.clip.winding.2 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.beginPath(); + ctx.moveTo(-10, -10); + ctx.lineTo(110, -10); + ctx.lineTo(110, 60); + ctx.lineTo(-10, 60); + ctx.lineTo(-10, -10); + ctx.clip(); + + ctx.beginPath(); + ctx.moveTo(0, 0); + ctx.lineTo(0, 50); + ctx.lineTo(100, 50); + ctx.lineTo(100, 0); + ctx.lineTo(0, 0); + ctx.clip(); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.closePath.empty.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.closePath.empty.html new file mode 100644 index 0000000000..c7596a8f1c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.closePath.empty.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.path.closePath.empty + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.closePath.empty

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.closePath.empty.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.closePath.empty.worker.js new file mode 100644 index 0000000000..c9a4030e68 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.closePath.empty.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.closePath.empty +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.closePath(); + ctx.fillStyle = '#f00'; + ctx.fill(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.closePath.newline.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.closePath.newline.html new file mode 100644 index 0000000000..771f3d3ca0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.closePath.newline.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.path.closePath.newline + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.closePath.newline

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.closePath.newline.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.closePath.newline.worker.js new file mode 100644 index 0000000000..4dff932086 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.closePath.newline.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.closePath.newline +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.moveTo(-100, 25); + ctx.lineTo(-100, -100); + ctx.lineTo(200, -100); + ctx.lineTo(200, 25); + ctx.closePath(); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.closePath.nextpoint.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.closePath.nextpoint.html new file mode 100644 index 0000000000..3dffdeaf5b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.closePath.nextpoint.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.path.closePath.nextpoint + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.closePath.nextpoint

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.closePath.nextpoint.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.closePath.nextpoint.worker.js new file mode 100644 index 0000000000..86d931b671 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.closePath.nextpoint.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.closePath.nextpoint +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.moveTo(-100, 25); + ctx.lineTo(-100, -1000); + ctx.closePath(); + ctx.lineTo(1000, 25); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.ellipse.basics.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.ellipse.basics.html new file mode 100644 index 0000000000..d664c45593 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.ellipse.basics.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.path.ellipse.basics + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.ellipse.basics

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify canvas throws error when drawing ellipse with negative radii.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.ellipse.basics.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.ellipse.basics.worker.js new file mode 100644 index 0000000000..60f3e9a673 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.ellipse.basics.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.ellipse.basics +// Description:Verify canvas throws error when drawing ellipse with negative radii. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify canvas throws error when drawing ellipse with negative radii."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.ellipse(10, 10, 10, 5, 0, 0, 1, false); + ctx.ellipse(10, 10, 10, 0, 0, 0, 1, false); + ctx.ellipse(10, 10, -0, 5, 0, 0, 1, false); + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.ellipse(10, 10, -2, 5, 0, 0, 1, false); }); + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.ellipse(10, 10, 0, -1.5, 0, 0, 1, false); }); + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.ellipse(10, 10, -2, -5, 0, 0, 1, false); }); + ctx.ellipse(80, 0, 10, 4294967277, Math.PI / -84, -Math.PI / 2147483436, false); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.basic.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.basic.html new file mode 100644 index 0000000000..6f8fd51de7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.basic.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.path.fill.closed.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.fill.closed.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.basic.worker.js new file mode 100644 index 0000000000..9dad73b579 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.basic.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.fill.closed.basic +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.moveTo(0, 0); + ctx.lineTo(100, 0); + ctx.lineTo(100, 50); + ctx.lineTo(0, 50); + ctx.fill(); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.unaffected.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.unaffected.html new file mode 100644 index 0000000000..706e38d176 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.unaffected.html @@ -0,0 +1,40 @@ + + +OffscreenCanvas test: 2d.path.fill.closed.unaffected + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.fill.closed.unaffected

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.unaffected.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.unaffected.worker.js new file mode 100644 index 0000000000..b6d7982866 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.unaffected.worker.js @@ -0,0 +1,35 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.fill.closed.unaffected +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#00f'; + ctx.fillRect(0, 0, 100, 50); + + ctx.moveTo(0, 0); + ctx.lineTo(100, 0); + ctx.lineTo(100, 50); + ctx.fillStyle = '#f00'; + ctx.fill(); + ctx.lineTo(0, 50); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + _assertPixel(canvas, 90,10, 0,255,0,255); + _assertPixel(canvas, 10,40, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.overlap.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.overlap.html new file mode 100644 index 0000000000..da936fab57 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.overlap.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.path.fill.overlap + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.fill.overlap

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.overlap.png b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.overlap.png new file mode 100644 index 0000000000..e2a35d48d4 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.overlap.png differ diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.overlap.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.overlap.worker.js new file mode 100644 index 0000000000..8f30cc7af2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.overlap.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.fill.overlap +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#000'; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.rect(0, 0, 100, 50); + ctx.closePath(); + ctx.rect(10, 10, 80, 30); + ctx.fill(); + + _assertPixelApprox(canvas, 50,25, 0,127,0,255, 1); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.add.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.add.html new file mode 100644 index 0000000000..40845a4a77 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.add.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.path.fill.winding.add + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.fill.winding.add

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.add.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.add.worker.js new file mode 100644 index 0000000000..cdbfc7f3a4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.add.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.fill.winding.add +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.moveTo(-10, -10); + ctx.lineTo(110, -10); + ctx.lineTo(110, 60); + ctx.lineTo(-10, 60); + ctx.lineTo(-10, -10); + ctx.lineTo(0, 0); + ctx.lineTo(100, 0); + ctx.lineTo(100, 50); + ctx.lineTo(0, 50); + ctx.fill(); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.1.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.1.html new file mode 100644 index 0000000000..e0f9c838b1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.1.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.path.fill.winding.subtract.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.fill.winding.subtract.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.1.worker.js new file mode 100644 index 0000000000..3d6a1660de --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.1.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.fill.winding.subtract.1 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#f00'; + ctx.moveTo(-10, -10); + ctx.lineTo(110, -10); + ctx.lineTo(110, 60); + ctx.lineTo(-10, 60); + ctx.lineTo(-10, -10); + ctx.lineTo(0, 0); + ctx.lineTo(0, 50); + ctx.lineTo(100, 50); + ctx.lineTo(100, 0); + ctx.fill(); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.2.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.2.html new file mode 100644 index 0000000000..c7de03ae08 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.2.html @@ -0,0 +1,41 @@ + + +OffscreenCanvas test: 2d.path.fill.winding.subtract.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.fill.winding.subtract.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.2.worker.js new file mode 100644 index 0000000000..0e8b4c79a5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.2.worker.js @@ -0,0 +1,36 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.fill.winding.subtract.2 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#f00'; + ctx.moveTo(-10, -10); + ctx.lineTo(110, -10); + ctx.lineTo(110, 60); + ctx.lineTo(-10, 60); + ctx.moveTo(0, 0); + ctx.lineTo(0, 50); + ctx.lineTo(100, 50); + ctx.lineTo(100, 0); + ctx.fill(); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.3.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.3.html new file mode 100644 index 0000000000..3d12380357 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.3.html @@ -0,0 +1,47 @@ + + +OffscreenCanvas test: 2d.path.fill.winding.subtract.3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.fill.winding.subtract.3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.3.worker.js new file mode 100644 index 0000000000..6c9f07c76a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.3.worker.js @@ -0,0 +1,42 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.fill.winding.subtract.3 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.moveTo(-10, -10); + ctx.lineTo(110, -10); + ctx.lineTo(110, 60); + ctx.lineTo(-10, 60); + ctx.lineTo(-10, -10); + ctx.lineTo(-20, -20); + ctx.lineTo(120, -20); + ctx.lineTo(120, 70); + ctx.lineTo(-20, 70); + ctx.lineTo(-20, -20); + ctx.lineTo(0, 0); + ctx.lineTo(0, 50); + ctx.lineTo(100, 50); + ctx.lineTo(100, 0); + ctx.fill(); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.initial.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.initial.html new file mode 100644 index 0000000000..e2e02f5142 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.initial.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.path.initial + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.initial

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.initial.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.initial.worker.js new file mode 100644 index 0000000000..de1a935032 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.initial.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.initial +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.closePath(); + ctx.fillStyle = '#f00'; + ctx.fill(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.arc.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.arc.html new file mode 100644 index 0000000000..ccffcd7d76 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.arc.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.path.isPointInPath.arc + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.isPointInPath.arc

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  isPointInPath() works on arcs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.arc.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.arc.worker.js new file mode 100644 index 0000000000..13510b744f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.arc.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.isPointInPath.arc +// Description:isPointInPath() works on arcs +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("isPointInPath() works on arcs"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.arc(50, 25, 10, 0, Math.PI, false); + _assertSame(ctx.isPointInPath(50, 10), false, "ctx.isPointInPath(50, 10)", "false"); + _assertSame(ctx.isPointInPath(50, 20), false, "ctx.isPointInPath(50, 20)", "false"); + _assertSame(ctx.isPointInPath(50, 30), true, "ctx.isPointInPath(50, 30)", "true"); + _assertSame(ctx.isPointInPath(50, 40), false, "ctx.isPointInPath(50, 40)", "false"); + _assertSame(ctx.isPointInPath(30, 20), false, "ctx.isPointInPath(30, 20)", "false"); + _assertSame(ctx.isPointInPath(70, 20), false, "ctx.isPointInPath(70, 20)", "false"); + _assertSame(ctx.isPointInPath(30, 30), false, "ctx.isPointInPath(30, 30)", "false"); + _assertSame(ctx.isPointInPath(70, 30), false, "ctx.isPointInPath(70, 30)", "false"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.1.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.1.html new file mode 100644 index 0000000000..7b9673a812 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.1.html @@ -0,0 +1,29 @@ + + +OffscreenCanvas test: 2d.path.isPointInPath.basic.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.isPointInPath.basic.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  isPointInPath() detects whether the point is inside the path

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.1.worker.js new file mode 100644 index 0000000000..f51900ea6b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.1.worker.js @@ -0,0 +1,24 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.isPointInPath.basic.1 +// Description:isPointInPath() detects whether the point is inside the path +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("isPointInPath() detects whether the point is inside the path"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.rect(0, 0, 20, 20); + _assertSame(ctx.isPointInPath(10, 10), true, "ctx.isPointInPath(10, 10)", "true"); + _assertSame(ctx.isPointInPath(30, 10), false, "ctx.isPointInPath(30, 10)", "false"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.2.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.2.html new file mode 100644 index 0000000000..3710dd185d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.2.html @@ -0,0 +1,29 @@ + + +OffscreenCanvas test: 2d.path.isPointInPath.basic.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.isPointInPath.basic.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  isPointInPath() detects whether the point is inside the path

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.2.worker.js new file mode 100644 index 0000000000..6024a0dc39 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.2.worker.js @@ -0,0 +1,24 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.isPointInPath.basic.2 +// Description:isPointInPath() detects whether the point is inside the path +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("isPointInPath() detects whether the point is inside the path"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.rect(20, 0, 20, 20); + _assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false"); + _assertSame(ctx.isPointInPath(30, 10), true, "ctx.isPointInPath(30, 10)", "true"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.html new file mode 100644 index 0000000000..21cf448de2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.html @@ -0,0 +1,66 @@ + + +OffscreenCanvas test: 2d.path.isPointInPath.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.isPointInPath.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify the winding rule in isPointInPath works for for rect path.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.worker.js new file mode 100644 index 0000000000..3e2a95c15e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.worker.js @@ -0,0 +1,61 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.isPointInPath.basic +// Description:Verify the winding rule in isPointInPath works for for rect path. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify the winding rule in isPointInPath works for for rect path."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = 200; + canvas.height = 200; + + // Testing default isPointInPath + ctx.beginPath(); + ctx.rect(0, 0, 100, 100); + ctx.rect(25, 25, 50, 50); + _assertSame(ctx.isPointInPath(50, 50), true, "ctx.isPointInPath(50, 50)", "true"); + _assertSame(ctx.isPointInPath(NaN, 50), false, "ctx.isPointInPath(NaN, 50)", "false"); + _assertSame(ctx.isPointInPath(50, NaN), false, "ctx.isPointInPath(50, NaN)", "false"); + + // Testing nonzero isPointInPath + ctx.beginPath(); + ctx.rect(0, 0, 100, 100); + ctx.rect(25, 25, 50, 50); + _assertSame(ctx.isPointInPath(50, 50, 'nonzero'), true, "ctx.isPointInPath(50, 50, 'nonzero')", "true"); + + // Testing evenodd isPointInPath + ctx.beginPath(); + ctx.rect(0, 0, 100, 100); + ctx.rect(25, 25, 50, 50); + _assertSame(ctx.isPointInPath(50, 50, 'evenodd'), false, "ctx.isPointInPath(50, 50, 'evenodd')", "false"); + + // Testing extremely large scale + ctx.save(); + ctx.scale(Number.MAX_VALUE, Number.MAX_VALUE); + ctx.beginPath(); + ctx.rect(-10, -10, 20, 20); + _assertSame(ctx.isPointInPath(0, 0, 'nonzero'), true, "ctx.isPointInPath(0, 0, 'nonzero')", "true"); + _assertSame(ctx.isPointInPath(0, 0, 'evenodd'), true, "ctx.isPointInPath(0, 0, 'evenodd')", "true"); + ctx.restore(); + + // Check with non-invertible ctm. + ctx.save(); + ctx.scale(0, 0); + ctx.beginPath(); + ctx.rect(-10, -10, 20, 20); + _assertSame(ctx.isPointInPath(0, 0, 'nonzero'), false, "ctx.isPointInPath(0, 0, 'nonzero')", "false"); + _assertSame(ctx.isPointInPath(0, 0, 'evenodd'), false, "ctx.isPointInPath(0, 0, 'evenodd')", "false"); + ctx.restore(); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bezier.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bezier.html new file mode 100644 index 0000000000..d348110305 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bezier.html @@ -0,0 +1,48 @@ + + +OffscreenCanvas test: 2d.path.isPointInPath.bezier + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.isPointInPath.bezier

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  isPointInPath() works on Bezier curves

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bezier.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bezier.worker.js new file mode 100644 index 0000000000..894fe5da31 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bezier.worker.js @@ -0,0 +1,43 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.isPointInPath.bezier +// Description:isPointInPath() works on Bezier curves +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("isPointInPath() works on Bezier curves"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.moveTo(25, 25); + ctx.bezierCurveTo(50, -50, 50, 100, 75, 25); + _assertSame(ctx.isPointInPath(25, 20), false, "ctx.isPointInPath(25, 20)", "false"); + _assertSame(ctx.isPointInPath(25, 30), false, "ctx.isPointInPath(25, 30)", "false"); + _assertSame(ctx.isPointInPath(30, 20), true, "ctx.isPointInPath(30, 20)", "true"); + _assertSame(ctx.isPointInPath(30, 30), false, "ctx.isPointInPath(30, 30)", "false"); + _assertSame(ctx.isPointInPath(40, 2), false, "ctx.isPointInPath(40, 2)", "false"); + _assertSame(ctx.isPointInPath(40, 20), true, "ctx.isPointInPath(40, 20)", "true"); + _assertSame(ctx.isPointInPath(40, 30), false, "ctx.isPointInPath(40, 30)", "false"); + _assertSame(ctx.isPointInPath(40, 47), false, "ctx.isPointInPath(40, 47)", "false"); + _assertSame(ctx.isPointInPath(45, 20), true, "ctx.isPointInPath(45, 20)", "true"); + _assertSame(ctx.isPointInPath(45, 30), false, "ctx.isPointInPath(45, 30)", "false"); + _assertSame(ctx.isPointInPath(55, 20), false, "ctx.isPointInPath(55, 20)", "false"); + _assertSame(ctx.isPointInPath(55, 30), true, "ctx.isPointInPath(55, 30)", "true"); + _assertSame(ctx.isPointInPath(60, 2), false, "ctx.isPointInPath(60, 2)", "false"); + _assertSame(ctx.isPointInPath(60, 20), false, "ctx.isPointInPath(60, 20)", "false"); + _assertSame(ctx.isPointInPath(60, 30), true, "ctx.isPointInPath(60, 30)", "true"); + _assertSame(ctx.isPointInPath(60, 47), false, "ctx.isPointInPath(60, 47)", "false"); + _assertSame(ctx.isPointInPath(70, 20), false, "ctx.isPointInPath(70, 20)", "false"); + _assertSame(ctx.isPointInPath(70, 30), true, "ctx.isPointInPath(70, 30)", "true"); + _assertSame(ctx.isPointInPath(75, 20), false, "ctx.isPointInPath(75, 20)", "false"); + _assertSame(ctx.isPointInPath(75, 30), false, "ctx.isPointInPath(75, 30)", "false"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bigarc.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bigarc.html new file mode 100644 index 0000000000..fcb4ca8827 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bigarc.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.path.isPointInPath.bigarc + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.isPointInPath.bigarc

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  isPointInPath() works on unclosed arcs larger than 2pi

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bigarc.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bigarc.worker.js new file mode 100644 index 0000000000..40233790c8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bigarc.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.isPointInPath.bigarc +// Description:isPointInPath() works on unclosed arcs larger than 2pi +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("isPointInPath() works on unclosed arcs larger than 2pi"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.arc(50, 25, 10, 0, 7, false); + _assertSame(ctx.isPointInPath(50, 10), false, "ctx.isPointInPath(50, 10)", "false"); + _assertSame(ctx.isPointInPath(50, 20), true, "ctx.isPointInPath(50, 20)", "true"); + _assertSame(ctx.isPointInPath(50, 30), true, "ctx.isPointInPath(50, 30)", "true"); + _assertSame(ctx.isPointInPath(50, 40), false, "ctx.isPointInPath(50, 40)", "false"); + _assertSame(ctx.isPointInPath(30, 20), false, "ctx.isPointInPath(30, 20)", "false"); + _assertSame(ctx.isPointInPath(70, 20), false, "ctx.isPointInPath(70, 20)", "false"); + _assertSame(ctx.isPointInPath(30, 30), false, "ctx.isPointInPath(30, 30)", "false"); + _assertSame(ctx.isPointInPath(70, 30), false, "ctx.isPointInPath(70, 30)", "false"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.edge.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.edge.html new file mode 100644 index 0000000000..aa367b4e56 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.edge.html @@ -0,0 +1,39 @@ + + +OffscreenCanvas test: 2d.path.isPointInPath.edge + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.isPointInPath.edge

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  isPointInPath() counts points on the path as being inside

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.edge.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.edge.worker.js new file mode 100644 index 0000000000..3918a6fe83 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.edge.worker.js @@ -0,0 +1,34 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.isPointInPath.edge +// Description:isPointInPath() counts points on the path as being inside +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("isPointInPath() counts points on the path as being inside"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.rect(0, 0, 20, 20); + _assertSame(ctx.isPointInPath(0, 0), true, "ctx.isPointInPath(0, 0)", "true"); + _assertSame(ctx.isPointInPath(10, 0), true, "ctx.isPointInPath(10, 0)", "true"); + _assertSame(ctx.isPointInPath(20, 0), true, "ctx.isPointInPath(20, 0)", "true"); + _assertSame(ctx.isPointInPath(20, 10), true, "ctx.isPointInPath(20, 10)", "true"); + _assertSame(ctx.isPointInPath(20, 20), true, "ctx.isPointInPath(20, 20)", "true"); + _assertSame(ctx.isPointInPath(10, 20), true, "ctx.isPointInPath(10, 20)", "true"); + _assertSame(ctx.isPointInPath(0, 20), true, "ctx.isPointInPath(0, 20)", "true"); + _assertSame(ctx.isPointInPath(0, 10), true, "ctx.isPointInPath(0, 10)", "true"); + _assertSame(ctx.isPointInPath(10, -0.01), false, "ctx.isPointInPath(10, -0.01)", "false"); + _assertSame(ctx.isPointInPath(10, 20.01), false, "ctx.isPointInPath(10, 20.01)", "false"); + _assertSame(ctx.isPointInPath(-0.01, 10), false, "ctx.isPointInPath(-0.01, 10)", "false"); + _assertSame(ctx.isPointInPath(20.01, 10), false, "ctx.isPointInPath(20.01, 10)", "false"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.empty.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.empty.html new file mode 100644 index 0000000000..d2ebf1e7e1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.empty.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.path.isPointInPath.empty + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.isPointInPath.empty

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  isPointInPath() works when there is no path

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.empty.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.empty.worker.js new file mode 100644 index 0000000000..319836dcb5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.empty.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.isPointInPath.empty +// Description:isPointInPath() works when there is no path +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("isPointInPath() works when there is no path"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.isPointInPath(0, 0), false, "ctx.isPointInPath(0, 0)", "false"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.nonfinite.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.nonfinite.html new file mode 100644 index 0000000000..ef12d057ed --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.nonfinite.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.isPointInPath.nonfinite + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.isPointInPath.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  isPointInPath() returns false for non-finite arguments

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.nonfinite.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.nonfinite.worker.js new file mode 100644 index 0000000000..dfa6eec766 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.nonfinite.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.isPointInPath.nonfinite +// Description:isPointInPath() returns false for non-finite arguments +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("isPointInPath() returns false for non-finite arguments"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.rect(-100, -50, 200, 100); + _assertSame(ctx.isPointInPath(Infinity, 0), false, "ctx.isPointInPath(Infinity, 0)", "false"); + _assertSame(ctx.isPointInPath(-Infinity, 0), false, "ctx.isPointInPath(-Infinity, 0)", "false"); + _assertSame(ctx.isPointInPath(NaN, 0), false, "ctx.isPointInPath(NaN, 0)", "false"); + _assertSame(ctx.isPointInPath(0, Infinity), false, "ctx.isPointInPath(0, Infinity)", "false"); + _assertSame(ctx.isPointInPath(0, -Infinity), false, "ctx.isPointInPath(0, -Infinity)", "false"); + _assertSame(ctx.isPointInPath(0, NaN), false, "ctx.isPointInPath(0, NaN)", "false"); + _assertSame(ctx.isPointInPath(NaN, NaN), false, "ctx.isPointInPath(NaN, NaN)", "false"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.outside.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.outside.html new file mode 100644 index 0000000000..ce2ab819dd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.outside.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.isPointInPath.outside + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.isPointInPath.outside

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  isPointInPath() works on paths outside the canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.outside.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.outside.worker.js new file mode 100644 index 0000000000..d4db12ef37 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.outside.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.isPointInPath.outside +// Description:isPointInPath() works on paths outside the canvas +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("isPointInPath() works on paths outside the canvas"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.rect(0, -100, 20, 20); + ctx.rect(20, -10, 20, 20); + _assertSame(ctx.isPointInPath(10, -110), false, "ctx.isPointInPath(10, -110)", "false"); + _assertSame(ctx.isPointInPath(10, -90), true, "ctx.isPointInPath(10, -90)", "true"); + _assertSame(ctx.isPointInPath(10, -70), false, "ctx.isPointInPath(10, -70)", "false"); + _assertSame(ctx.isPointInPath(30, -20), false, "ctx.isPointInPath(30, -20)", "false"); + _assertSame(ctx.isPointInPath(30, 0), true, "ctx.isPointInPath(30, 0)", "true"); + _assertSame(ctx.isPointInPath(30, 20), false, "ctx.isPointInPath(30, 20)", "false"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.subpath.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.subpath.html new file mode 100644 index 0000000000..c4abd92764 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.subpath.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.isPointInPath.subpath + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.isPointInPath.subpath

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  isPointInPath() uses the current path, not just the subpath

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.subpath.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.subpath.worker.js new file mode 100644 index 0000000000..82df3b7c70 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.subpath.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.isPointInPath.subpath +// Description:isPointInPath() uses the current path, not just the subpath +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("isPointInPath() uses the current path, not just the subpath"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.rect(0, 0, 20, 20); + ctx.beginPath(); + ctx.rect(20, 0, 20, 20); + ctx.closePath(); + ctx.rect(40, 0, 20, 20); + _assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false"); + _assertSame(ctx.isPointInPath(30, 10), true, "ctx.isPointInPath(30, 10)", "true"); + _assertSame(ctx.isPointInPath(50, 10), true, "ctx.isPointInPath(50, 10)", "true"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.1.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.1.html new file mode 100644 index 0000000000..bccaa842e5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.1.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.isPointInPath.transform.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.isPointInPath.transform.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  isPointInPath() handles transformations correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.1.worker.js new file mode 100644 index 0000000000..0774fd0d62 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.1.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.isPointInPath.transform.1 +// Description:isPointInPath() handles transformations correctly +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("isPointInPath() handles transformations correctly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.translate(50, 0); + ctx.rect(0, 0, 20, 20); + _assertSame(ctx.isPointInPath(-40, 10), false, "ctx.isPointInPath(-40, 10)", "false"); + _assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false"); + _assertSame(ctx.isPointInPath(49, 10), false, "ctx.isPointInPath(49, 10)", "false"); + _assertSame(ctx.isPointInPath(51, 10), true, "ctx.isPointInPath(51, 10)", "true"); + _assertSame(ctx.isPointInPath(69, 10), true, "ctx.isPointInPath(69, 10)", "true"); + _assertSame(ctx.isPointInPath(71, 10), false, "ctx.isPointInPath(71, 10)", "false"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.2.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.2.html new file mode 100644 index 0000000000..1e587c1d8a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.2.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.isPointInPath.transform.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.isPointInPath.transform.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  isPointInPath() handles transformations correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.2.worker.js new file mode 100644 index 0000000000..ff4c42c450 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.2.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.isPointInPath.transform.2 +// Description:isPointInPath() handles transformations correctly +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("isPointInPath() handles transformations correctly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.rect(50, 0, 20, 20); + ctx.translate(50, 0); + _assertSame(ctx.isPointInPath(-40, 10), false, "ctx.isPointInPath(-40, 10)", "false"); + _assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false"); + _assertSame(ctx.isPointInPath(49, 10), false, "ctx.isPointInPath(49, 10)", "false"); + _assertSame(ctx.isPointInPath(51, 10), true, "ctx.isPointInPath(51, 10)", "true"); + _assertSame(ctx.isPointInPath(69, 10), true, "ctx.isPointInPath(69, 10)", "true"); + _assertSame(ctx.isPointInPath(71, 10), false, "ctx.isPointInPath(71, 10)", "false"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.3.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.3.html new file mode 100644 index 0000000000..826d7e23c9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.3.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.isPointInPath.transform.3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.isPointInPath.transform.3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  isPointInPath() handles transformations correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.3.worker.js new file mode 100644 index 0000000000..f6750e9109 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.3.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.isPointInPath.transform.3 +// Description:isPointInPath() handles transformations correctly +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("isPointInPath() handles transformations correctly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.scale(-1, 1); + ctx.rect(-70, 0, 20, 20); + _assertSame(ctx.isPointInPath(-40, 10), false, "ctx.isPointInPath(-40, 10)", "false"); + _assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false"); + _assertSame(ctx.isPointInPath(49, 10), false, "ctx.isPointInPath(49, 10)", "false"); + _assertSame(ctx.isPointInPath(51, 10), true, "ctx.isPointInPath(51, 10)", "true"); + _assertSame(ctx.isPointInPath(69, 10), true, "ctx.isPointInPath(69, 10)", "true"); + _assertSame(ctx.isPointInPath(71, 10), false, "ctx.isPointInPath(71, 10)", "false"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.4.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.4.html new file mode 100644 index 0000000000..97792d6889 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.4.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.path.isPointInPath.transform.4 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.isPointInPath.transform.4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  isPointInPath() handles transformations correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.4.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.4.worker.js new file mode 100644 index 0000000000..f43a8a3d1e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.4.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.isPointInPath.transform.4 +// Description:isPointInPath() handles transformations correctly +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("isPointInPath() handles transformations correctly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.translate(50, 0); + ctx.rect(50, 0, 20, 20); + ctx.translate(0, 50); + _assertSame(ctx.isPointInPath(60, 10), false, "ctx.isPointInPath(60, 10)", "false"); + _assertSame(ctx.isPointInPath(110, 10), true, "ctx.isPointInPath(110, 10)", "true"); + _assertSame(ctx.isPointInPath(110, 60), false, "ctx.isPointInPath(110, 60)", "false"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.unclosed.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.unclosed.html new file mode 100644 index 0000000000..3920c7de4b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.unclosed.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.path.isPointInPath.unclosed + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.isPointInPath.unclosed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  isPointInPath() works on unclosed subpaths

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.unclosed.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.unclosed.worker.js new file mode 100644 index 0000000000..7b5ffc4a79 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.unclosed.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.isPointInPath.unclosed +// Description:isPointInPath() works on unclosed subpaths +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("isPointInPath() works on unclosed subpaths"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.moveTo(0, 0); + ctx.lineTo(20, 0); + ctx.lineTo(20, 20); + ctx.lineTo(0, 20); + _assertSame(ctx.isPointInPath(10, 10), true, "ctx.isPointInPath(10, 10)", "true"); + _assertSame(ctx.isPointInPath(30, 10), false, "ctx.isPointInPath(30, 10)", "false"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.winding.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.winding.html new file mode 100644 index 0000000000..b2741a5069 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.winding.html @@ -0,0 +1,47 @@ + + +OffscreenCanvas test: 2d.path.isPointInPath.winding + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.isPointInPath.winding

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  isPointInPath() uses the non-zero winding number rule

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.winding.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.winding.worker.js new file mode 100644 index 0000000000..094bc05910 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.winding.worker.js @@ -0,0 +1,42 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.isPointInPath.winding +// Description:isPointInPath() uses the non-zero winding number rule +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("isPointInPath() uses the non-zero winding number rule"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + // Create a square ring, using opposite windings to make a hole in the centre + ctx.moveTo(0, 0); + ctx.lineTo(50, 0); + ctx.lineTo(50, 50); + ctx.lineTo(0, 50); + ctx.lineTo(0, 0); + ctx.lineTo(10, 10); + ctx.lineTo(10, 40); + ctx.lineTo(40, 40); + ctx.lineTo(40, 10); + ctx.lineTo(10, 10); + + _assertSame(ctx.isPointInPath(5, 5), true, "ctx.isPointInPath(5, 5)", "true"); + _assertSame(ctx.isPointInPath(25, 5), true, "ctx.isPointInPath(25, 5)", "true"); + _assertSame(ctx.isPointInPath(45, 5), true, "ctx.isPointInPath(45, 5)", "true"); + _assertSame(ctx.isPointInPath(5, 25), true, "ctx.isPointInPath(5, 25)", "true"); + _assertSame(ctx.isPointInPath(25, 25), false, "ctx.isPointInPath(25, 25)", "false"); + _assertSame(ctx.isPointInPath(45, 25), true, "ctx.isPointInPath(45, 25)", "true"); + _assertSame(ctx.isPointInPath(5, 45), true, "ctx.isPointInPath(5, 45)", "true"); + _assertSame(ctx.isPointInPath(25, 45), true, "ctx.isPointInPath(25, 45)", "true"); + _assertSame(ctx.isPointInPath(45, 45), true, "ctx.isPointInPath(45, 45)", "true"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.html new file mode 100644 index 0000000000..95f7fd721d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.path.isPointInStroke.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.isPointInStroke.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  detects whether point is in the area contained by the stroke of the path

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.worker.js new file mode 100644 index 0000000000..844f0ef154 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.isPointInStroke.basic +// Description:detects whether point is in the area contained by the stroke of the path +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("detects whether point is in the area contained by the stroke of the path"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + +var canvas = new OffscreenCanvas(100, 50); +var ctx = canvas.getContext('2d'); + +ctx.strokeStyle = '#0f0'; +ctx.beginPath(); +ctx.rect(0, 0, 20, 20); +_assertSame(ctx.isPointInStroke(0, 0), true, "ctx.isPointInStroke(0, 0)", "true"); +_assertSame(ctx.isPointInStroke(30, 10), false, "ctx.isPointInStroke(30, 10)", "false"); + +var path = new Path2D(); +path.rect(20, 20, 100, 100); +_assertSame(ctx.isPointInStroke(path, 20, 20), true, "ctx.isPointInStroke(path, 20, 20)", "true"); +_assertSame(ctx.isPointInStroke(path, 120, 20), true, "ctx.isPointInStroke(path, 120, 20)", "true"); +t.done(); + +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.scaleddashes.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.scaleddashes.html new file mode 100644 index 0000000000..1ed13b32de --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.scaleddashes.html @@ -0,0 +1,40 @@ + + +OffscreenCanvas test: 2d.path.isPointInStroke.scaleddashes + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.isPointInStroke.scaleddashes

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  isPointInStroke() should return correct results on dashed paths at high scale factors

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.scaleddashes.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.scaleddashes.worker.js new file mode 100644 index 0000000000..240905308e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.scaleddashes.worker.js @@ -0,0 +1,35 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.isPointInStroke.scaleddashes +// Description:isPointInStroke() should return correct results on dashed paths at high scale factors +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("isPointInStroke() should return correct results on dashed paths at high scale factors"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var scale = 20; + ctx.setLineDash([10, 21.4159]); // dash from t=0 to t=10 along the circle + ctx.scale(scale, scale); + ctx.ellipse(6, 10, 5, 5, 0, 2*Math.PI, false); + ctx.stroke(); + + // hit-test the beginning of the dash (t=0) + _assertSame(ctx.isPointInStroke(11*scale, 10*scale), true, "ctx.isPointInStroke(11*scale, 10*scale)", "true"); + // hit-test the middle of the dash (t=5) + _assertSame(ctx.isPointInStroke(8.70*scale, 14.21*scale), true, "ctx.isPointInStroke(8.70*scale, 14.21*scale)", "true"); + // hit-test the end of the dash (t=9.8) + _assertSame(ctx.isPointInStroke(4.10*scale, 14.63*scale), true, "ctx.isPointInStroke(4.10*scale, 14.63*scale)", "true"); + // hit-test past the end of the dash (t=10.2) + _assertSame(ctx.isPointInStroke(3.74*scale, 14.46*scale), false, "ctx.isPointInStroke(3.74*scale, 14.46*scale)", "false"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.invalid.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.invalid.html new file mode 100644 index 0000000000..0b4c635fc8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.invalid.html @@ -0,0 +1,51 @@ + + +OffscreenCanvas test: 2d.path.isPointInpath.invalid + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.isPointInpath.invalid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify isPointInPath throws exceptions with invalid inputs.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.invalid.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.invalid.worker.js new file mode 100644 index 0000000000..f09eeb7526 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.invalid.worker.js @@ -0,0 +1,46 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.isPointInpath.invalid +// Description:Verify isPointInPath throws exceptions with invalid inputs. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify isPointInPath throws exceptions with invalid inputs."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = 200; + canvas.height = 200; + path = new Path2D(); + path.rect(0, 0, 100, 100); + path.rect(25, 25, 50, 50); + // Testing invalid enumeration isPointInPath (w/ and w/o Path object'); + assert_throws_js(TypeError, function() { ctx.isPointInPath(path, 50, 50, 'gazonk'); }); + assert_throws_js(TypeError, function() { ctx.isPointInPath(50, 50, 'gazonk'); }); + + // Testing invalid type isPointInPath with Path object'); + assert_throws_js(TypeError, function() { ctx.isPointInPath(null, 50, 50); }); + assert_throws_js(TypeError, function() { ctx.isPointInPath(null, 50, 50, 'nonzero'); }); + assert_throws_js(TypeError, function() { ctx.isPointInPath(null, 50, 50, 'evenodd'); }); + assert_throws_js(TypeError, function() { ctx.isPointInPath(null, 50, 50, null); }); + assert_throws_js(TypeError, function() { ctx.isPointInPath(path, 50, 50, null); }); + assert_throws_js(TypeError, function() { ctx.isPointInPath(undefined, 50, 50); }); + assert_throws_js(TypeError, function() { ctx.isPointInPath(undefined, 50, 50, 'nonzero'); }); + assert_throws_js(TypeError, function() { ctx.isPointInPath(undefined, 50, 50, 'evenodd'); }); + assert_throws_js(TypeError, function() { ctx.isPointInPath(undefined, 50, 50, undefined); }); + assert_throws_js(TypeError, function() { ctx.isPointInPath([], 50, 50); }); + assert_throws_js(TypeError, function() { ctx.isPointInPath([], 50, 50, 'nonzero'); }); + assert_throws_js(TypeError, function() { ctx.isPointInPath([], 50, 50, 'evenodd'); }); + assert_throws_js(TypeError, function() { ctx.isPointInPath({}, 50, 50); }); + assert_throws_js(TypeError, function() { ctx.isPointInPath({}, 50, 50, 'nonzero'); }); + assert_throws_js(TypeError, function() { ctx.isPointInPath({}, 50, 50, 'evenodd'); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.multi.path.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.multi.path.html new file mode 100644 index 0000000000..945855231b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.multi.path.html @@ -0,0 +1,49 @@ + + +OffscreenCanvas test: 2d.path.isPointInpath.multi.path + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.isPointInpath.multi.path

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify the winding rule in isPointInPath works for path object.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.multi.path.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.multi.path.worker.js new file mode 100644 index 0000000000..d3d4e60747 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.multi.path.worker.js @@ -0,0 +1,44 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.isPointInpath.multi.path +// Description:Verify the winding rule in isPointInPath works for path object. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify the winding rule in isPointInPath works for path object."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = 200; + canvas.height = 200; + + // Testing default isPointInPath with Path object'); + path = new Path2D(); + path.rect(0, 0, 100, 100); + path.rect(25, 25, 50, 50); + _assertSame(ctx.isPointInPath(path, 50, 50), true, "ctx.isPointInPath(path, 50, 50)", "true"); + _assertSame(ctx.isPointInPath(path, 50, 50, undefined), true, "ctx.isPointInPath(path, 50, 50, undefined)", "true"); + _assertSame(ctx.isPointInPath(path, NaN, 50), false, "ctx.isPointInPath(path, NaN, 50)", "false"); + _assertSame(ctx.isPointInPath(path, 50, NaN), false, "ctx.isPointInPath(path, 50, NaN)", "false"); + + // Testing nonzero isPointInPath with Path object'); + path = new Path2D(); + path.rect(0, 0, 100, 100); + path.rect(25, 25, 50, 50); + _assertSame(ctx.isPointInPath(path, 50, 50, 'nonzero'), true, "ctx.isPointInPath(path, 50, 50, 'nonzero')", "true"); + + // Testing evenodd isPointInPath with Path object'); + path = new Path2D(); + path.rect(0, 0, 100, 100); + path.rect(25, 25, 50, 50); + assert_false(ctx.isPointInPath(path, 50, 50, 'evenodd')); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.basic.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.basic.html new file mode 100644 index 0000000000..e0bc64617f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.basic.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.path.lineTo.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.lineTo.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.basic.worker.js new file mode 100644 index 0000000000..6e02a1f149 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.basic.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.lineTo.basic +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.beginPath(); + ctx.moveTo(0, 25); + ctx.lineTo(100, 25); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.1.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.1.html new file mode 100644 index 0000000000..2561a2f555 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.1.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.lineTo.ensuresubpath.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.lineTo.ensuresubpath.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  If there is no subpath, the point is added and nothing is drawn

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.1.worker.js new file mode 100644 index 0000000000..ae4d85735e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.1.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.lineTo.ensuresubpath.1 +// Description:If there is no subpath, the point is added and nothing is drawn +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("If there is no subpath, the point is added and nothing is drawn"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 50; + ctx.beginPath(); + ctx.lineTo(100, 50); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.2.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.2.html new file mode 100644 index 0000000000..9ca14a1393 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.2.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.path.lineTo.ensuresubpath.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.lineTo.ensuresubpath.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  If there is no subpath, the point is added and used for subsequent drawing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.2.worker.js new file mode 100644 index 0000000000..b6af21235f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.2.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.lineTo.ensuresubpath.2 +// Description:If there is no subpath, the point is added and used for subsequent drawing +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("If there is no subpath, the point is added and used for subsequent drawing"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.beginPath(); + ctx.lineTo(0, 25); + ctx.lineTo(100, 25); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nextpoint.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nextpoint.html new file mode 100644 index 0000000000..a649d3a86d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nextpoint.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.path.lineTo.nextpoint + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.lineTo.nextpoint

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nextpoint.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nextpoint.worker.js new file mode 100644 index 0000000000..9e4e24a06d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nextpoint.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.lineTo.nextpoint +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.beginPath(); + ctx.moveTo(-100, -100); + ctx.lineTo(0, 25); + ctx.lineTo(100, 25); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.details.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.details.html new file mode 100644 index 0000000000..35bc80d336 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.details.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.path.lineTo.nonfinite.details + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.lineTo.nonfinite.details

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  lineTo() with Infinity/NaN for first arg still converts the second arg

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.details.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.details.worker.js new file mode 100644 index 0000000000..5052c74b94 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.details.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.lineTo.nonfinite.details +// Description:lineTo() with Infinity/NaN for first arg still converts the second arg +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("lineTo() with Infinity/NaN for first arg still converts the second arg"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + for (var arg1 of [Infinity, -Infinity, NaN]) { + var converted = false; + ctx.lineTo(arg1, { valueOf: function() { converted = true; return 0; } }); + _assert(converted, "converted"); + } + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.html new file mode 100644 index 0000000000..5a144dd7f6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.html @@ -0,0 +1,41 @@ + + +OffscreenCanvas test: 2d.path.lineTo.nonfinite + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.lineTo.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  lineTo() with Infinity/NaN is ignored

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.worker.js new file mode 100644 index 0000000000..82921b7cd9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.worker.js @@ -0,0 +1,36 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.lineTo.nonfinite +// Description:lineTo() with Infinity/NaN is ignored +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("lineTo() with Infinity/NaN is ignored"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.moveTo(0, 0); + ctx.lineTo(100, 0); + ctx.lineTo(Infinity, 50); + ctx.lineTo(-Infinity, 50); + ctx.lineTo(NaN, 50); + ctx.lineTo(0, Infinity); + ctx.lineTo(0, -Infinity); + ctx.lineTo(0, NaN); + ctx.lineTo(Infinity, Infinity); + ctx.lineTo(100, 50); + ctx.lineTo(0, 50); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 90,45, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.basic.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.basic.html new file mode 100644 index 0000000000..f9777c6ca8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.basic.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.path.moveTo.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.moveTo.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.basic.worker.js new file mode 100644 index 0000000000..0b1df374b6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.basic.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.moveTo.basic +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.rect(0, 0, 10, 50); + ctx.moveTo(100, 0); + ctx.lineTo(10, 0); + ctx.lineTo(10, 50); + ctx.lineTo(100, 50); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 90,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.multiple.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.multiple.html new file mode 100644 index 0000000000..0b56cbbfef --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.multiple.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.path.moveTo.multiple + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.moveTo.multiple

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.multiple.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.multiple.worker.js new file mode 100644 index 0000000000..9f49ea8a1b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.multiple.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.moveTo.multiple +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.moveTo(0, 25); + ctx.moveTo(100, 25); + ctx.moveTo(0, 25); + ctx.lineTo(100, 25); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.newsubpath.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.newsubpath.html new file mode 100644 index 0000000000..c2594c006e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.newsubpath.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.path.moveTo.newsubpath + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.moveTo.newsubpath

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.newsubpath.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.newsubpath.worker.js new file mode 100644 index 0000000000..e3c9c8529d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.newsubpath.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.moveTo.newsubpath +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.beginPath(); + ctx.moveTo(0, 0); + ctx.moveTo(100, 0); + ctx.moveTo(100, 50); + ctx.moveTo(0, 50); + ctx.fillStyle = '#f00'; + ctx.fill(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.nonfinite.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.nonfinite.html new file mode 100644 index 0000000000..ea3eb34c76 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.nonfinite.html @@ -0,0 +1,40 @@ + + +OffscreenCanvas test: 2d.path.moveTo.nonfinite + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.moveTo.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  moveTo() with Infinity/NaN is ignored

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.nonfinite.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.nonfinite.worker.js new file mode 100644 index 0000000000..97e2bd72e3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.moveTo.nonfinite.worker.js @@ -0,0 +1,35 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.moveTo.nonfinite +// Description:moveTo() with Infinity/NaN is ignored +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("moveTo() with Infinity/NaN is ignored"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.moveTo(0, 0); + ctx.lineTo(100, 0); + ctx.moveTo(Infinity, 50); + ctx.moveTo(-Infinity, 50); + ctx.moveTo(NaN, 50); + ctx.moveTo(0, Infinity); + ctx.moveTo(0, -Infinity); + ctx.moveTo(0, NaN); + ctx.moveTo(Infinity, Infinity); + ctx.lineTo(100, 50); + ctx.lineTo(0, 50); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.basic.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.basic.html new file mode 100644 index 0000000000..4d14ce5585 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.basic.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.path.quadraticCurveTo.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.quadraticCurveTo.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.basic.worker.js new file mode 100644 index 0000000000..161e5f1a65 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.basic.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.quadraticCurveTo.basic +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.beginPath(); + ctx.moveTo(0, 25); + ctx.quadraticCurveTo(100, 25, 100, 25); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.1.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.1.html new file mode 100644 index 0000000000..3e916f00c7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.1.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.path.quadraticCurveTo.ensuresubpath.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.quadraticCurveTo.ensuresubpath.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  If there is no subpath, the first control point is added (and nothing is drawn up to it)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.1.worker.js new file mode 100644 index 0000000000..95dcf2bed1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.1.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.quadraticCurveTo.ensuresubpath.1 +// Description:If there is no subpath, the first control point is added (and nothing is drawn up to it) +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("If there is no subpath, the first control point is added (and nothing is drawn up to it)"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 50; + ctx.beginPath(); + ctx.quadraticCurveTo(100, 50, 200, 50); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 95,45, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.2.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.2.html new file mode 100644 index 0000000000..2fb05a2658 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.2.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.path.quadraticCurveTo.ensuresubpath.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.quadraticCurveTo.ensuresubpath.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  If there is no subpath, the first control point is added

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.2.worker.js new file mode 100644 index 0000000000..4beaf9dae2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.2.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.quadraticCurveTo.ensuresubpath.2 +// Description:If there is no subpath, the first control point is added +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("If there is no subpath, the first control point is added"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.beginPath(); + ctx.quadraticCurveTo(0, 25, 100, 25); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 5,45, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.nonfinite.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.nonfinite.html new file mode 100644 index 0000000000..ee4f333a08 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.nonfinite.html @@ -0,0 +1,57 @@ + + +OffscreenCanvas test: 2d.path.quadraticCurveTo.nonfinite + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.quadraticCurveTo.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  quadraticCurveTo() with Infinity/NaN is ignored

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.nonfinite.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.nonfinite.worker.js new file mode 100644 index 0000000000..a61eb9a8ca --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.nonfinite.worker.js @@ -0,0 +1,52 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.quadraticCurveTo.nonfinite +// Description:quadraticCurveTo() with Infinity/NaN is ignored +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("quadraticCurveTo() with Infinity/NaN is ignored"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.moveTo(0, 0); + ctx.lineTo(100, 0); + ctx.quadraticCurveTo(Infinity, 50, 0, 50); + ctx.quadraticCurveTo(-Infinity, 50, 0, 50); + ctx.quadraticCurveTo(NaN, 50, 0, 50); + ctx.quadraticCurveTo(0, Infinity, 0, 50); + ctx.quadraticCurveTo(0, -Infinity, 0, 50); + ctx.quadraticCurveTo(0, NaN, 0, 50); + ctx.quadraticCurveTo(0, 50, Infinity, 50); + ctx.quadraticCurveTo(0, 50, -Infinity, 50); + ctx.quadraticCurveTo(0, 50, NaN, 50); + ctx.quadraticCurveTo(0, 50, 0, Infinity); + ctx.quadraticCurveTo(0, 50, 0, -Infinity); + ctx.quadraticCurveTo(0, 50, 0, NaN); + ctx.quadraticCurveTo(Infinity, Infinity, 0, 50); + ctx.quadraticCurveTo(Infinity, Infinity, Infinity, 50); + ctx.quadraticCurveTo(Infinity, Infinity, Infinity, Infinity); + ctx.quadraticCurveTo(Infinity, Infinity, 0, Infinity); + ctx.quadraticCurveTo(Infinity, 50, Infinity, 50); + ctx.quadraticCurveTo(Infinity, 50, Infinity, Infinity); + ctx.quadraticCurveTo(Infinity, 50, 0, Infinity); + ctx.quadraticCurveTo(0, Infinity, Infinity, 50); + ctx.quadraticCurveTo(0, Infinity, Infinity, Infinity); + ctx.quadraticCurveTo(0, Infinity, 0, Infinity); + ctx.quadraticCurveTo(0, 50, Infinity, Infinity); + ctx.lineTo(100, 50); + ctx.lineTo(0, 50); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 90,45, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.scaled.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.scaled.html new file mode 100644 index 0000000000..92c9377d6f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.scaled.html @@ -0,0 +1,40 @@ + + +OffscreenCanvas test: 2d.path.quadraticCurveTo.scaled + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.quadraticCurveTo.scaled

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.scaled.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.scaled.worker.js new file mode 100644 index 0000000000..04fd6e904d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.scaled.worker.js @@ -0,0 +1,35 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.quadraticCurveTo.scaled +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.scale(1000, 1000); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 0.055; + ctx.beginPath(); + ctx.moveTo(-1, 1.05); + ctx.quadraticCurveTo(0, -1, 1.2, 1.05); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.shape.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.shape.html new file mode 100644 index 0000000000..ea42d669cb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.shape.html @@ -0,0 +1,39 @@ + + +OffscreenCanvas test: 2d.path.quadraticCurveTo.shape + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.quadraticCurveTo.shape

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.shape.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.shape.worker.js new file mode 100644 index 0000000000..9f2afea09d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.shape.worker.js @@ -0,0 +1,34 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.quadraticCurveTo.shape +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 55; + ctx.beginPath(); + ctx.moveTo(-1000, 1050); + ctx.quadraticCurveTo(0, -1000, 1200, 1050); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.basic.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.basic.html new file mode 100644 index 0000000000..e8d874709d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.basic.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.path.rect.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.rect.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.basic.worker.js new file mode 100644 index 0000000000..c8eb3838f9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.basic.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.rect.basic +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.rect(0, 0, 100, 50); + ctx.fill(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.closed.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.closed.html new file mode 100644 index 0000000000..6f61874390 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.closed.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.rect.closed + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.rect.closed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.closed.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.closed.worker.js new file mode 100644 index 0000000000..f40868730b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.closed.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.rect.closed +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 200; + ctx.lineJoin = 'miter'; + ctx.rect(100, 50, 100, 100); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.end.1.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.end.1.html new file mode 100644 index 0000000000..e4d5ece132 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.end.1.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.rect.end.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.rect.end.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.end.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.end.1.worker.js new file mode 100644 index 0000000000..fcf9d0526f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.end.1.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.rect.end.1 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 100; + ctx.rect(200, 100, 400, 1000); + ctx.lineTo(-2000, -1000); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.end.2.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.end.2.html new file mode 100644 index 0000000000..d6bad78abb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.end.2.html @@ -0,0 +1,39 @@ + + +OffscreenCanvas test: 2d.path.rect.end.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.rect.end.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.end.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.end.2.worker.js new file mode 100644 index 0000000000..84c1b71d71 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.end.2.worker.js @@ -0,0 +1,34 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.rect.end.2 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 450; + ctx.lineCap = 'round'; + ctx.lineJoin = 'bevel'; + ctx.rect(150, 150, 2000, 2000); + ctx.lineTo(160, 160); + ctx.stroke(); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.negative.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.negative.html new file mode 100644 index 0000000000..730e2e887a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.negative.html @@ -0,0 +1,39 @@ + + +OffscreenCanvas test: 2d.path.rect.negative + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.rect.negative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.negative.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.negative.worker.js new file mode 100644 index 0000000000..44449e85e2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.negative.worker.js @@ -0,0 +1,34 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.rect.negative +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.beginPath(); + ctx.fillStyle = '#0f0'; + ctx.rect(0, 0, 50, 25); + ctx.rect(100, 0, -50, 25); + ctx.rect(0, 50, 50, -25); + ctx.rect(100, 50, -50, -25); + ctx.fill(); + _assertPixel(canvas, 25,12, 0,255,0,255); + _assertPixel(canvas, 75,12, 0,255,0,255); + _assertPixel(canvas, 25,37, 0,255,0,255); + _assertPixel(canvas, 75,37, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.newsubpath.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.newsubpath.html new file mode 100644 index 0000000000..05b972e045 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.newsubpath.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.path.rect.newsubpath + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.rect.newsubpath

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.newsubpath.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.newsubpath.worker.js new file mode 100644 index 0000000000..bdf4a926c1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.newsubpath.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.rect.newsubpath +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.beginPath(); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 50; + ctx.moveTo(-100, 25); + ctx.lineTo(-50, 25); + ctx.rect(200, 25, 1, 1); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.nonfinite.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.nonfinite.html new file mode 100644 index 0000000000..16d76aaf18 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.nonfinite.html @@ -0,0 +1,57 @@ + + +OffscreenCanvas test: 2d.path.rect.nonfinite + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.rect.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  rect() with Infinity/NaN is ignored

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.nonfinite.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.nonfinite.worker.js new file mode 100644 index 0000000000..307a5ec08f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.nonfinite.worker.js @@ -0,0 +1,52 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.rect.nonfinite +// Description:rect() with Infinity/NaN is ignored +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("rect() with Infinity/NaN is ignored"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.moveTo(0, 0); + ctx.lineTo(100, 0); + ctx.rect(Infinity, 50, 1, 1); + ctx.rect(-Infinity, 50, 1, 1); + ctx.rect(NaN, 50, 1, 1); + ctx.rect(0, Infinity, 1, 1); + ctx.rect(0, -Infinity, 1, 1); + ctx.rect(0, NaN, 1, 1); + ctx.rect(0, 50, Infinity, 1); + ctx.rect(0, 50, -Infinity, 1); + ctx.rect(0, 50, NaN, 1); + ctx.rect(0, 50, 1, Infinity); + ctx.rect(0, 50, 1, -Infinity); + ctx.rect(0, 50, 1, NaN); + ctx.rect(Infinity, Infinity, 1, 1); + ctx.rect(Infinity, Infinity, Infinity, 1); + ctx.rect(Infinity, Infinity, Infinity, Infinity); + ctx.rect(Infinity, Infinity, 1, Infinity); + ctx.rect(Infinity, 50, Infinity, 1); + ctx.rect(Infinity, 50, Infinity, Infinity); + ctx.rect(Infinity, 50, 1, Infinity); + ctx.rect(0, Infinity, Infinity, 1); + ctx.rect(0, Infinity, Infinity, Infinity); + ctx.rect(0, Infinity, 1, Infinity); + ctx.rect(0, 50, Infinity, Infinity); + ctx.lineTo(100, 50); + ctx.lineTo(0, 50); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 90,45, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.selfintersect.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.selfintersect.html new file mode 100644 index 0000000000..af97fa6d38 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.selfintersect.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.rect.selfintersect + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.rect.selfintersect

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.selfintersect.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.selfintersect.worker.js new file mode 100644 index 0000000000..495d016e80 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.selfintersect.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.rect.selfintersect +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 90; + ctx.beginPath(); + ctx.rect(45, 20, 10, 10); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.winding.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.winding.html new file mode 100644 index 0000000000..a7f79c5223 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.winding.html @@ -0,0 +1,39 @@ + + +OffscreenCanvas test: 2d.path.rect.winding + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.rect.winding

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.winding.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.winding.worker.js new file mode 100644 index 0000000000..45ff0427e1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.winding.worker.js @@ -0,0 +1,34 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.rect.winding +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.beginPath(); + ctx.fillStyle = '#f00'; + ctx.rect(0, 0, 50, 50); + ctx.rect(100, 50, -50, -50); + ctx.rect(0, 25, 100, -25); + ctx.rect(100, 25, -100, 25); + ctx.fill(); + _assertPixel(canvas, 25,12, 0,255,0,255); + _assertPixel(canvas, 75,12, 0,255,0,255); + _assertPixel(canvas, 25,37, 0,255,0,255); + _assertPixel(canvas, 75,37, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.1.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.1.html new file mode 100644 index 0000000000..45dac2079d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.1.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.rect.zero.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.rect.zero.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.1.worker.js new file mode 100644 index 0000000000..de6fb58c8a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.1.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.rect.zero.1 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 100; + ctx.beginPath(); + ctx.rect(0, 50, 100, 0); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.2.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.2.html new file mode 100644 index 0000000000..0386ea06e7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.2.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.rect.zero.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.rect.zero.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.2.worker.js new file mode 100644 index 0000000000..8e323d2dd0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.2.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.rect.zero.2 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 100; + ctx.beginPath(); + ctx.rect(50, -100, 0, 250); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.3.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.3.html new file mode 100644 index 0000000000..1299040929 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.3.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.rect.zero.3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.rect.zero.3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.3.worker.js new file mode 100644 index 0000000000..5e6f490c73 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.3.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.rect.zero.3 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 100; + ctx.beginPath(); + ctx.rect(50, 25, 0, 0); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.4.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.4.html new file mode 100644 index 0000000000..93da1300de --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.4.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.rect.zero.4 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.rect.zero.4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.4.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.4.worker.js new file mode 100644 index 0000000000..e19da3b917 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.4.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.rect.zero.4 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.rect(100, 25, 0, 0); + ctx.lineTo(0, 25); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.5.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.5.html new file mode 100644 index 0000000000..45a7f03813 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.5.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.rect.zero.5 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.rect.zero.5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.5.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.5.worker.js new file mode 100644 index 0000000000..d39a741573 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.5.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.rect.zero.5 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 50; + ctx.moveTo(0, 0); + ctx.rect(100, 25, 0, 0); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.6.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.6.html new file mode 100644 index 0000000000..ac74e20660 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.6.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.path.rect.zero.6 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.rect.zero.6

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.6.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.6.worker.js new file mode 100644 index 0000000000..a567359c30 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.6.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.rect.zero.6 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineJoin = 'miter'; + ctx.miterLimit = 1.5; + ctx.lineWidth = 200; + ctx.beginPath(); + ctx.rect(100, 25, 1000, 0); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.html new file mode 100644 index 0000000000..f7e80a0119 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.html @@ -0,0 +1,55 @@ + + +OffscreenCanvas test: 2d.path.roundrect.1.radius.dompoint + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.1.radius.dompoint

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when one radius is given to roundRect(), specified as a DOMPoint, it applies to all corners.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.html new file mode 100644 index 0000000000..4ea78c32d1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.html @@ -0,0 +1,55 @@ + + +OffscreenCanvas test: 2d.path.roundrect.1.radius.dompoint.single argument + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.1.radius.dompoint.single argument

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when one radius is given to roundRect() as a non-array argument, specified as a DOMPoint, it applies to all corners.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.worker.js new file mode 100644 index 0000000000..b93d88e89c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.worker.js @@ -0,0 +1,50 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.1.radius.dompoint.single argument +// Description:Verify that when one radius is given to roundRect() as a non-array argument, specified as a DOMPoint, it applies to all corners. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when one radius is given to roundRect() as a non-array argument, specified as a DOMPoint, it applies to all corners."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, new DOMPoint(40, 20)); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-left corner + _assertPixel(canvas, 20,1, 255,0,0,255); + _assertPixel(canvas, 41,1, 0,255,0,255); + _assertPixel(canvas, 1,10, 255,0,0,255); + _assertPixel(canvas, 1,21, 0,255,0,255); + + // top-right corner + _assertPixel(canvas, 79,1, 255,0,0,255); + _assertPixel(canvas, 58,1, 0,255,0,255); + _assertPixel(canvas, 98,10, 255,0,0,255); + _assertPixel(canvas, 98,21, 0,255,0,255); + + // bottom-right corner + _assertPixel(canvas, 79,48, 255,0,0,255); + _assertPixel(canvas, 58,48, 0,255,0,255); + _assertPixel(canvas, 98,39, 255,0,0,255); + _assertPixel(canvas, 98,28, 0,255,0,255); + + // bottom-left corner + _assertPixel(canvas, 20,48, 255,0,0,255); + _assertPixel(canvas, 41,48, 0,255,0,255); + _assertPixel(canvas, 1,39, 255,0,0,255); + _assertPixel(canvas, 1,28, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.worker.js new file mode 100644 index 0000000000..06d787437e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.worker.js @@ -0,0 +1,50 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.1.radius.dompoint +// Description:Verify that when one radius is given to roundRect(), specified as a DOMPoint, it applies to all corners. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when one radius is given to roundRect(), specified as a DOMPoint, it applies to all corners."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20)]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-left corner + _assertPixel(canvas, 20,1, 255,0,0,255); + _assertPixel(canvas, 41,1, 0,255,0,255); + _assertPixel(canvas, 1,10, 255,0,0,255); + _assertPixel(canvas, 1,21, 0,255,0,255); + + // top-right corner + _assertPixel(canvas, 79,1, 255,0,0,255); + _assertPixel(canvas, 58,1, 0,255,0,255); + _assertPixel(canvas, 98,10, 255,0,0,255); + _assertPixel(canvas, 98,21, 0,255,0,255); + + // bottom-right corner + _assertPixel(canvas, 79,48, 255,0,0,255); + _assertPixel(canvas, 58,48, 0,255,0,255); + _assertPixel(canvas, 98,39, 255,0,0,255); + _assertPixel(canvas, 98,28, 0,255,0,255); + + // bottom-left corner + _assertPixel(canvas, 20,48, 255,0,0,255); + _assertPixel(canvas, 41,48, 0,255,0,255); + _assertPixel(canvas, 1,39, 255,0,0,255); + _assertPixel(canvas, 1,28, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.html new file mode 100644 index 0000000000..97084a446f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.html @@ -0,0 +1,55 @@ + + +OffscreenCanvas test: 2d.path.roundrect.1.radius.dompointinit + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.1.radius.dompointinit

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when one radius is given to roundRect(), specified as a DOMPointInit, applies to all corners.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.html new file mode 100644 index 0000000000..10c5c14cff --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.html @@ -0,0 +1,55 @@ + + +OffscreenCanvas test: 2d.path.roundrect.1.radius.dompointinit.single.argument + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.1.radius.dompointinit.single.argument

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when one radius is given to roundRect() as a non-array argument, specified as a DOMPointInit, applies to all corners.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.worker.js new file mode 100644 index 0000000000..a62370677b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.worker.js @@ -0,0 +1,50 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.1.radius.dompointinit.single.argument +// Description:Verify that when one radius is given to roundRect() as a non-array argument, specified as a DOMPointInit, applies to all corners. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when one radius is given to roundRect() as a non-array argument, specified as a DOMPointInit, applies to all corners."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, {x: 40, y: 20}); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-left corner + _assertPixel(canvas, 20,1, 255,0,0,255); + _assertPixel(canvas, 41,1, 0,255,0,255); + _assertPixel(canvas, 1,10, 255,0,0,255); + _assertPixel(canvas, 1,21, 0,255,0,255); + + // top-right corner + _assertPixel(canvas, 79,1, 255,0,0,255); + _assertPixel(canvas, 58,1, 0,255,0,255); + _assertPixel(canvas, 98,10, 255,0,0,255); + _assertPixel(canvas, 98,21, 0,255,0,255); + + // bottom-right corner + _assertPixel(canvas, 79,48, 255,0,0,255); + _assertPixel(canvas, 58,48, 0,255,0,255); + _assertPixel(canvas, 98,39, 255,0,0,255); + _assertPixel(canvas, 98,28, 0,255,0,255); + + // bottom-left corner + _assertPixel(canvas, 20,48, 255,0,0,255); + _assertPixel(canvas, 41,48, 0,255,0,255); + _assertPixel(canvas, 1,39, 255,0,0,255); + _assertPixel(canvas, 1,28, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.worker.js new file mode 100644 index 0000000000..56c8e1fcef --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.worker.js @@ -0,0 +1,50 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.1.radius.dompointinit +// Description:Verify that when one radius is given to roundRect(), specified as a DOMPointInit, applies to all corners. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when one radius is given to roundRect(), specified as a DOMPointInit, applies to all corners."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-left corner + _assertPixel(canvas, 20,1, 255,0,0,255); + _assertPixel(canvas, 41,1, 0,255,0,255); + _assertPixel(canvas, 1,10, 255,0,0,255); + _assertPixel(canvas, 1,21, 0,255,0,255); + + // top-right corner + _assertPixel(canvas, 79,1, 255,0,0,255); + _assertPixel(canvas, 58,1, 0,255,0,255); + _assertPixel(canvas, 98,10, 255,0,0,255); + _assertPixel(canvas, 98,21, 0,255,0,255); + + // bottom-right corner + _assertPixel(canvas, 79,48, 255,0,0,255); + _assertPixel(canvas, 58,48, 0,255,0,255); + _assertPixel(canvas, 98,39, 255,0,0,255); + _assertPixel(canvas, 98,28, 0,255,0,255); + + // bottom-left corner + _assertPixel(canvas, 20,48, 255,0,0,255); + _assertPixel(canvas, 41,48, 0,255,0,255); + _assertPixel(canvas, 1,39, 255,0,0,255); + _assertPixel(canvas, 1,28, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.html new file mode 100644 index 0000000000..33574eeaa0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.path.roundrect.1.radius.double + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.1.radius.double

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when one radius is given to roundRect(), specified as a double, it applies to all corners.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.single.argument.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.single.argument.html new file mode 100644 index 0000000000..b2c826ff38 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.single.argument.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.path.roundrect.1.radius.double.single.argument + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.1.radius.double.single.argument

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when one radius is given to roundRect() as a non-array argument, specified as a double, it applies to all corners.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.single.argument.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.single.argument.worker.js new file mode 100644 index 0000000000..04350e81aa --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.single.argument.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.1.radius.double.single.argument +// Description:Verify that when one radius is given to roundRect() as a non-array argument, specified as a double, it applies to all corners. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when one radius is given to roundRect() as a non-array argument, specified as a double, it applies to all corners."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, 20); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 1,1, 255,0,0,255); + _assertPixel(canvas, 98,1, 255,0,0,255); + _assertPixel(canvas, 98,48, 255,0,0,255); + _assertPixel(canvas, 1,48, 255,0,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.worker.js new file mode 100644 index 0000000000..ef9da08d61 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.1.radius.double +// Description:Verify that when one radius is given to roundRect(), specified as a double, it applies to all corners. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when one radius is given to roundRect(), specified as a double, it applies to all corners."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [20]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 1,1, 255,0,0,255); + _assertPixel(canvas, 98,1, 255,0,0,255); + _assertPixel(canvas, 98,48, 255,0,0,255); + _assertPixel(canvas, 1,48, 255,0,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompoint.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompoint.html new file mode 100644 index 0000000000..7f67c42ed4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompoint.html @@ -0,0 +1,47 @@ + + +OffscreenCanvas test: 2d.path.roundrect.2.radii.1.dompoint + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.2.radii.1.dompoint

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left and bottom-right corners.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompoint.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompoint.worker.js new file mode 100644 index 0000000000..5d0387d0d1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompoint.worker.js @@ -0,0 +1,42 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.2.radii.1.dompoint +// Description:Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left and bottom-right corners. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left and bottom-right corners."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20), 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-left corner + _assertPixel(canvas, 20,1, 255,0,0,255); + _assertPixel(canvas, 41,1, 0,255,0,255); + _assertPixel(canvas, 1,10, 255,0,0,255); + _assertPixel(canvas, 1,21, 0,255,0,255); + + // bottom-right corner + _assertPixel(canvas, 79,48, 255,0,0,255); + _assertPixel(canvas, 58,48, 0,255,0,255); + _assertPixel(canvas, 98,39, 255,0,0,255); + _assertPixel(canvas, 98,28, 0,255,0,255); + + // other corners + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.html new file mode 100644 index 0000000000..2ac0347d96 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.html @@ -0,0 +1,47 @@ + + +OffscreenCanvas test: 2d.path.roundrect.2.radii.1.dompointinit + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.2.radii.1.dompointinit

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left and bottom-right corners.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.worker.js new file mode 100644 index 0000000000..240a36e846 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.worker.js @@ -0,0 +1,42 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.2.radii.1.dompointinit +// Description:Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left and bottom-right corners. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left and bottom-right corners."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-left corner + _assertPixel(canvas, 20,1, 255,0,0,255); + _assertPixel(canvas, 41,1, 0,255,0,255); + _assertPixel(canvas, 1,10, 255,0,0,255); + _assertPixel(canvas, 1,21, 0,255,0,255); + + // bottom-right corner + _assertPixel(canvas, 79,48, 255,0,0,255); + _assertPixel(canvas, 58,48, 0,255,0,255); + _assertPixel(canvas, 98,39, 255,0,0,255); + _assertPixel(canvas, 98,28, 0,255,0,255); + + // other corners + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.double.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.double.html new file mode 100644 index 0000000000..791e59ee7e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.double.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.path.roundrect.2.radii.1.double + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.2.radii.1.double

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when two radii are given to roundRect(), the first radius, specified as a double, applies to the top-left and bottom-right corners.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.double.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.double.worker.js new file mode 100644 index 0000000000..0fc351c3d6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.double.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.2.radii.1.double +// Description:Verify that when two radii are given to roundRect(), the first radius, specified as a double, applies to the top-left and bottom-right corners. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when two radii are given to roundRect(), the first radius, specified as a double, applies to the top-left and bottom-right corners."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [20, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 1,1, 255,0,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 98,48, 255,0,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompoint.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompoint.html new file mode 100644 index 0000000000..d0b085e170 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompoint.html @@ -0,0 +1,47 @@ + + +OffscreenCanvas test: 2d.path.roundrect.2.radii.2.dompoint + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.2.radii.2.dompoint

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when two radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottom-left corners.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompoint.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompoint.worker.js new file mode 100644 index 0000000000..4c6bb06bdb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompoint.worker.js @@ -0,0 +1,42 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.2.radii.2.dompoint +// Description:Verify that when two radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottom-left corners. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when two radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottom-left corners."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, new DOMPoint(40, 20)]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-right corner + _assertPixel(canvas, 79,1, 255,0,0,255); + _assertPixel(canvas, 58,1, 0,255,0,255); + _assertPixel(canvas, 98,10, 255,0,0,255); + _assertPixel(canvas, 98,21, 0,255,0,255); + + // bottom-left corner + _assertPixel(canvas, 20,48, 255,0,0,255); + _assertPixel(canvas, 41,48, 0,255,0,255); + _assertPixel(canvas, 1,39, 255,0,0,255); + _assertPixel(canvas, 1,28, 0,255,0,255); + + // other corners + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.html new file mode 100644 index 0000000000..380dd26997 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.html @@ -0,0 +1,47 @@ + + +OffscreenCanvas test: 2d.path.roundrect.2.radii.2.dompointinit + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.2.radii.2.dompointinit

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when two radii are given to roundRect(), the second radius, specified as a DOMPointInit, applies to the top-right and bottom-left corners.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.worker.js new file mode 100644 index 0000000000..e8cdd2c015 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.worker.js @@ -0,0 +1,42 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.2.radii.2.dompointinit +// Description:Verify that when two radii are given to roundRect(), the second radius, specified as a DOMPointInit, applies to the top-right and bottom-left corners. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when two radii are given to roundRect(), the second radius, specified as a DOMPointInit, applies to the top-right and bottom-left corners."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-right corner + _assertPixel(canvas, 79,1, 255,0,0,255); + _assertPixel(canvas, 58,1, 0,255,0,255); + _assertPixel(canvas, 98,10, 255,0,0,255); + _assertPixel(canvas, 98,21, 0,255,0,255); + + // bottom-left corner + _assertPixel(canvas, 20,48, 255,0,0,255); + _assertPixel(canvas, 41,48, 0,255,0,255); + _assertPixel(canvas, 1,39, 255,0,0,255); + _assertPixel(canvas, 1,28, 0,255,0,255); + + // other corners + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.double.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.double.html new file mode 100644 index 0000000000..b7b25727b9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.double.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.path.roundrect.2.radii.2.double + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.2.radii.2.double

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when two radii are given to roundRect(), the second radius, specified as a double, applies to the top-right and bottom-left corners.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.double.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.double.worker.js new file mode 100644 index 0000000000..756328682d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.double.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.2.radii.2.double +// Description:Verify that when two radii are given to roundRect(), the second radius, specified as a double, applies to the top-right and bottom-left corners. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when two radii are given to roundRect(), the second radius, specified as a double, applies to the top-right and bottom-left corners."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, 20]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 255,0,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + _assertPixel(canvas, 1,48, 255,0,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompoint.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompoint.html new file mode 100644 index 0000000000..b7f3e53261 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompoint.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.path.roundrect.3.radii.1.dompoint + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.3.radii.1.dompoint

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when three radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left corner.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompoint.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompoint.worker.js new file mode 100644 index 0000000000..9ac4d731c3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompoint.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.3.radii.1.dompoint +// Description:Verify that when three radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left corner. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when three radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left corner."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20), 0, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-left corner + _assertPixel(canvas, 20,1, 255,0,0,255); + _assertPixel(canvas, 41,1, 0,255,0,255); + _assertPixel(canvas, 1,10, 255,0,0,255); + _assertPixel(canvas, 1,21, 0,255,0,255); + + // other corners + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompointinit.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompointinit.html new file mode 100644 index 0000000000..93f89159b1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompointinit.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.path.roundrect.3.radii.1.dompointinit + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.3.radii.1.dompointinit

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when three radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left corner.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompointinit.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompointinit.worker.js new file mode 100644 index 0000000000..9d00729ce9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompointinit.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.3.radii.1.dompointinit +// Description:Verify that when three radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left corner. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when three radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left corner."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-left corner + _assertPixel(canvas, 20,1, 255,0,0,255); + _assertPixel(canvas, 41,1, 0,255,0,255); + _assertPixel(canvas, 1,10, 255,0,0,255); + _assertPixel(canvas, 1,21, 0,255,0,255); + + // other corners + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.double.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.double.html new file mode 100644 index 0000000000..976458bc5f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.double.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.path.roundrect.3.radii.1.double + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.3.radii.1.double

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when three radii are given to roundRect(), the first radius, specified as a double, applies to the top-left corner.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.double.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.double.worker.js new file mode 100644 index 0000000000..c4e1c4fc03 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.double.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.3.radii.1.double +// Description:Verify that when three radii are given to roundRect(), the first radius, specified as a double, applies to the top-left corner. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when three radii are given to roundRect(), the first radius, specified as a double, applies to the top-left corner."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [20, 0, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 1,1, 255,0,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompoint.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompoint.html new file mode 100644 index 0000000000..1a89c28d15 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompoint.html @@ -0,0 +1,47 @@ + + +OffscreenCanvas test: 2d.path.roundrect.3.radii.2.dompoint + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.3.radii.2.dompoint

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when three radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottom-left corners.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompoint.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompoint.worker.js new file mode 100644 index 0000000000..4e4df3a601 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompoint.worker.js @@ -0,0 +1,42 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.3.radii.2.dompoint +// Description:Verify that when three radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottom-left corners. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when three radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottom-left corners."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, new DOMPoint(40, 20), 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-right corner + _assertPixel(canvas, 79,1, 255,0,0,255); + _assertPixel(canvas, 58,1, 0,255,0,255); + _assertPixel(canvas, 98,10, 255,0,0,255); + _assertPixel(canvas, 98,21, 0,255,0,255); + + // bottom-left corner + _assertPixel(canvas, 20,48, 255,0,0,255); + _assertPixel(canvas, 41,48, 0,255,0,255); + _assertPixel(canvas, 1,39, 255,0,0,255); + _assertPixel(canvas, 1,28, 0,255,0,255); + + // other corners + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.html new file mode 100644 index 0000000000..82ceb6a7bc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.html @@ -0,0 +1,47 @@ + + +OffscreenCanvas test: 2d.path.roundrect.3.radii.2.dompointinit + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.3.radii.2.dompointinit

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when three radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottom-left corners.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.worker.js new file mode 100644 index 0000000000..1333e2386d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.worker.js @@ -0,0 +1,42 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.3.radii.2.dompointinit +// Description:Verify that when three radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottom-left corners. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when three radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottom-left corners."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-right corner + _assertPixel(canvas, 79,1, 255,0,0,255); + _assertPixel(canvas, 58,1, 0,255,0,255); + _assertPixel(canvas, 98,10, 255,0,0,255); + _assertPixel(canvas, 98,21, 0,255,0,255); + + // bottom-left corner + _assertPixel(canvas, 20,48, 255,0,0,255); + _assertPixel(canvas, 41,48, 0,255,0,255); + _assertPixel(canvas, 1,39, 255,0,0,255); + _assertPixel(canvas, 1,28, 0,255,0,255); + + // other corners + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.double.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.double.html new file mode 100644 index 0000000000..b466956d58 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.double.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.path.roundrect.3.radii.2.double + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.3.radii.2.double

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when three radii are given to roundRect(), the second radius, specified as a double, applies to the top-right and bottom-left corners.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.double.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.double.worker.js new file mode 100644 index 0000000000..027dbae52a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.double.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.3.radii.2.double +// Description:Verify that when three radii are given to roundRect(), the second radius, specified as a double, applies to the top-right and bottom-left corners. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when three radii are given to roundRect(), the second radius, specified as a double, applies to the top-right and bottom-left corners."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, 20, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 255,0,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + _assertPixel(canvas, 1,48, 255,0,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompoint.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompoint.html new file mode 100644 index 0000000000..897aeb2685 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompoint.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.path.roundrect.3.radii.3.dompoint + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.3.radii.3.dompoint

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when three radii are given to roundRect(), the third radius, specified as a DOMPoint, applies to the bottom-right corner.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompoint.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompoint.worker.js new file mode 100644 index 0000000000..8a80623fc9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompoint.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.3.radii.3.dompoint +// Description:Verify that when three radii are given to roundRect(), the third radius, specified as a DOMPoint, applies to the bottom-right corner. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when three radii are given to roundRect(), the third radius, specified as a DOMPoint, applies to the bottom-right corner."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, 0, new DOMPoint(40, 20)]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // bottom-right corner + _assertPixel(canvas, 79,48, 255,0,0,255); + _assertPixel(canvas, 58,48, 0,255,0,255); + _assertPixel(canvas, 98,39, 255,0,0,255); + _assertPixel(canvas, 98,28, 0,255,0,255); + + // other corners + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompointinit.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompointinit.html new file mode 100644 index 0000000000..e1e055cb64 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompointinit.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.path.roundrect.3.radii.3.dompointinit + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.3.radii.3.dompointinit

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when three radii are given to roundRect(), the third radius, specified as a DOMPointInit, applies to the bottom-right corner.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompointinit.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompointinit.worker.js new file mode 100644 index 0000000000..d3b188dd7f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompointinit.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.3.radii.3.dompointinit +// Description:Verify that when three radii are given to roundRect(), the third radius, specified as a DOMPointInit, applies to the bottom-right corner. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when three radii are given to roundRect(), the third radius, specified as a DOMPointInit, applies to the bottom-right corner."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, 0, {x: 40, y: 20}]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // bottom-right corner + _assertPixel(canvas, 79,48, 255,0,0,255); + _assertPixel(canvas, 58,48, 0,255,0,255); + _assertPixel(canvas, 98,39, 255,0,0,255); + _assertPixel(canvas, 98,28, 0,255,0,255); + + // other corners + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.double.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.double.html new file mode 100644 index 0000000000..a0e0553364 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.double.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.path.roundrect.3.radii.3.double + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.3.radii.3.double

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when three radii are given to roundRect(), the third radius, specified as a double, applies to the bottom-right corner.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.double.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.double.worker.js new file mode 100644 index 0000000000..177e7c5f6d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.double.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.3.radii.3.double +// Description:Verify that when three radii are given to roundRect(), the third radius, specified as a double, applies to the bottom-right corner. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when three radii are given to roundRect(), the third radius, specified as a double, applies to the bottom-right corner."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, 0, 20]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 98,48, 255,0,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompoint.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompoint.html new file mode 100644 index 0000000000..72e8d6ce33 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompoint.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.path.roundrect.4.radii.1.dompoint + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.4.radii.1.dompoint

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when four radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left corner.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompoint.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompoint.worker.js new file mode 100644 index 0000000000..f27f696f1c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompoint.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.4.radii.1.dompoint +// Description:Verify that when four radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left corner. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when four radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left corner."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20), 0, 0, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-left corner + _assertPixel(canvas, 20,1, 255,0,0,255); + _assertPixel(canvas, 41,1, 0,255,0,255); + _assertPixel(canvas, 1,10, 255,0,0,255); + _assertPixel(canvas, 1,21, 0,255,0,255); + + // other corners + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompointinit.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompointinit.html new file mode 100644 index 0000000000..df6bb11e02 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompointinit.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.path.roundrect.4.radii.1.dompointinit + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.4.radii.1.dompointinit

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when four radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left corner.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompointinit.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompointinit.worker.js new file mode 100644 index 0000000000..2f9d2eb30f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompointinit.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.4.radii.1.dompointinit +// Description:Verify that when four radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left corner. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when four radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left corner."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0, 0, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-left corner + _assertPixel(canvas, 20,1, 255,0,0,255); + _assertPixel(canvas, 41,1, 0,255,0,255); + _assertPixel(canvas, 1,10, 255,0,0,255); + _assertPixel(canvas, 1,21, 0,255,0,255); + + // other corners + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.double.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.double.html new file mode 100644 index 0000000000..b669a7bb6a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.double.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.path.roundrect.4.radii.1.double + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.4.radii.1.double

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when four radii are given to roundRect(), the first radius, specified as a double, applies to the top-left corner.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.double.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.double.worker.js new file mode 100644 index 0000000000..9658a39cfb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.double.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.4.radii.1.double +// Description:Verify that when four radii are given to roundRect(), the first radius, specified as a double, applies to the top-left corner. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when four radii are given to roundRect(), the first radius, specified as a double, applies to the top-left corner."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [20, 0, 0, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 1,1, 255,0,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompoint.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompoint.html new file mode 100644 index 0000000000..b387d88990 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompoint.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.path.roundrect.4.radii.2.dompoint + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.4.radii.2.dompoint

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when four radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right corner.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompoint.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompoint.worker.js new file mode 100644 index 0000000000..83d3f66b3c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompoint.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.4.radii.2.dompoint +// Description:Verify that when four radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right corner. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when four radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right corner."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, new DOMPoint(40, 20), 0, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-right corner + _assertPixel(canvas, 79,1, 255,0,0,255); + _assertPixel(canvas, 58,1, 0,255,0,255); + _assertPixel(canvas, 98,10, 255,0,0,255); + _assertPixel(canvas, 98,21, 0,255,0,255); + + // other corners + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompointinit.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompointinit.html new file mode 100644 index 0000000000..76719124e2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompointinit.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.path.roundrect.4.radii.2.dompointinit + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.4.radii.2.dompointinit

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when four radii are given to roundRect(), the second radius, specified as a DOMPointInit, applies to the top-right corner.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompointinit.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompointinit.worker.js new file mode 100644 index 0000000000..21766040b4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompointinit.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.4.radii.2.dompointinit +// Description:Verify that when four radii are given to roundRect(), the second radius, specified as a DOMPointInit, applies to the top-right corner. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when four radii are given to roundRect(), the second radius, specified as a DOMPointInit, applies to the top-right corner."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}, 0, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-right corner + _assertPixel(canvas, 79,1, 255,0,0,255); + _assertPixel(canvas, 58,1, 0,255,0,255); + _assertPixel(canvas, 98,10, 255,0,0,255); + _assertPixel(canvas, 98,21, 0,255,0,255); + + // other corners + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.double.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.double.html new file mode 100644 index 0000000000..001cb8429c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.double.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.path.roundrect.4.radii.2.double + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.4.radii.2.double

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when four radii are given to roundRect(), the second radius, specified as a double, applies to the top-right corner.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.double.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.double.worker.js new file mode 100644 index 0000000000..b9935a1bd9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.double.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.4.radii.2.double +// Description:Verify that when four radii are given to roundRect(), the second radius, specified as a double, applies to the top-right corner. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when four radii are given to roundRect(), the second radius, specified as a double, applies to the top-right corner."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, 20, 0, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 255,0,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompoint.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompoint.html new file mode 100644 index 0000000000..5c8c686086 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompoint.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.path.roundrect.4.radii.3.dompoint + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.4.radii.3.dompoint

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when four radii are given to roundRect(), the third radius, specified as a DOMPoint, applies to the bottom-right corner.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompoint.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompoint.worker.js new file mode 100644 index 0000000000..819b1a3986 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompoint.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.4.radii.3.dompoint +// Description:Verify that when four radii are given to roundRect(), the third radius, specified as a DOMPoint, applies to the bottom-right corner. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when four radii are given to roundRect(), the third radius, specified as a DOMPoint, applies to the bottom-right corner."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, 0, new DOMPoint(40, 20), 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // bottom-right corner + _assertPixel(canvas, 79,48, 255,0,0,255); + _assertPixel(canvas, 58,48, 0,255,0,255); + _assertPixel(canvas, 98,39, 255,0,0,255); + _assertPixel(canvas, 98,28, 0,255,0,255); + + // other corners + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompointinit.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompointinit.html new file mode 100644 index 0000000000..1b94b7d7ed --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompointinit.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.path.roundrect.4.radii.3.dompointinit + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.4.radii.3.dompointinit

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when four radii are given to roundRect(), the third radius, specified as a DOMPointInit, applies to the bottom-right corner.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompointinit.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompointinit.worker.js new file mode 100644 index 0000000000..e4bd04aa29 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompointinit.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.4.radii.3.dompointinit +// Description:Verify that when four radii are given to roundRect(), the third radius, specified as a DOMPointInit, applies to the bottom-right corner. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when four radii are given to roundRect(), the third radius, specified as a DOMPointInit, applies to the bottom-right corner."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, 0, {x: 40, y: 20}, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // bottom-right corner + _assertPixel(canvas, 79,48, 255,0,0,255); + _assertPixel(canvas, 58,48, 0,255,0,255); + _assertPixel(canvas, 98,39, 255,0,0,255); + _assertPixel(canvas, 98,28, 0,255,0,255); + + // other corners + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.double.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.double.html new file mode 100644 index 0000000000..2a76d2b7b1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.double.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.path.roundrect.4.radii.3.double + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.4.radii.3.double

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when four radii are given to roundRect(), the third radius, specified as a double, applies to the bottom-right corner.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.double.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.double.worker.js new file mode 100644 index 0000000000..ada627b469 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.double.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.4.radii.3.double +// Description:Verify that when four radii are given to roundRect(), the third radius, specified as a double, applies to the bottom-right corner. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when four radii are given to roundRect(), the third radius, specified as a double, applies to the bottom-right corner."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, 0, 20, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 98,48, 255,0,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompoint.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompoint.html new file mode 100644 index 0000000000..ce86e45e8b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompoint.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.path.roundrect.4.radii.4.dompoint + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.4.radii.4.dompoint

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when four radii are given to roundRect(), the fourth radius, specified as a DOMPoint, applies to the bottom-left corner.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompoint.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompoint.worker.js new file mode 100644 index 0000000000..770291c6f9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompoint.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.4.radii.4.dompoint +// Description:Verify that when four radii are given to roundRect(), the fourth radius, specified as a DOMPoint, applies to the bottom-left corner. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when four radii are given to roundRect(), the fourth radius, specified as a DOMPoint, applies to the bottom-left corner."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, 0, 0, new DOMPoint(40, 20)]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // bottom-left corner + _assertPixel(canvas, 20,48, 255,0,0,255); + _assertPixel(canvas, 41,48, 0,255,0,255); + _assertPixel(canvas, 1,39, 255,0,0,255); + _assertPixel(canvas, 1,28, 0,255,0,255); + + // other corners + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompointinit.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompointinit.html new file mode 100644 index 0000000000..f0ec6c3b99 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompointinit.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.path.roundrect.4.radii.4.dompointinit + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.4.radii.4.dompointinit

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when four radii are given to roundRect(), the fourth radius, specified as a DOMPointInit, applies to the bottom-left corner.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompointinit.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompointinit.worker.js new file mode 100644 index 0000000000..48310c6a30 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompointinit.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.4.radii.4.dompointinit +// Description:Verify that when four radii are given to roundRect(), the fourth radius, specified as a DOMPointInit, applies to the bottom-left corner. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when four radii are given to roundRect(), the fourth radius, specified as a DOMPointInit, applies to the bottom-left corner."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, 0, 0, {x: 40, y: 20}]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // bottom-left corner + _assertPixel(canvas, 20,48, 255,0,0,255); + _assertPixel(canvas, 41,48, 0,255,0,255); + _assertPixel(canvas, 1,39, 255,0,0,255); + _assertPixel(canvas, 1,28, 0,255,0,255); + + // other corners + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.double.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.double.html new file mode 100644 index 0000000000..6940622cf0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.double.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.path.roundrect.4.radii.4.double + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.4.radii.4.double

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify that when four radii are given to roundRect(), the fourth radius, specified as a double, applies to the bottom-left corner.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.double.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.double.worker.js new file mode 100644 index 0000000000..e97ebd98ff --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.double.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.4.radii.4.double +// Description:Verify that when four radii are given to roundRect(), the fourth radius, specified as a double, applies to the bottom-left corner. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify that when four radii are given to roundRect(), the fourth radius, specified as a double, applies to the bottom-left corner."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, 0, 0, 20]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + _assertPixel(canvas, 1,48, 255,0,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.badinput.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.badinput.html new file mode 100644 index 0000000000..97b322971c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.badinput.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.roundrect.badinput + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.badinput

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  roundRect() throws or does not throw errors given the strange inputs.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.badinput.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.badinput.worker.js new file mode 100644 index 0000000000..461dee89ad --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.badinput.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.badinput +// Description:roundRect() throws or does not throw errors given the strange inputs. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("roundRect() throws or does not throw errors given the strange inputs."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.roundRect(0, 0, 100, 100, { foo: "bar" }); //=> DOMPointInit + ctx.roundRect(0, 0, 100, 100, undefined); //=> "missing" -> 0 + ctx.roundRect(0, 0, 100, 100, [[]]); //=> « DOMPointInit » + ctx.roundRect(0, 0, 100, 100, [[25]]); //=> « DOMPointInit » + ctx.roundRect(0, 0, 100, 100, [undefined]); //=> « DOMPointInit » + assert_throws_js(TypeError, function() { ctx.roundRect(0, 0, 100, 100, 0n); }); + assert_throws_js(TypeError, function() { ctx.roundRect(0, 0, 100, 100, { x: 0n }); }); + assert_throws_js(TypeError, function() { ctx.roundRect(0, 0, 100, 100, [{ x: 0n }]); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.closed.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.closed.html new file mode 100644 index 0000000000..7407ead9cf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.closed.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.roundrect.closed + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.closed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.closed.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.closed.worker.js new file mode 100644 index 0000000000..5a9530a683 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.closed.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.closed +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 200; + ctx.lineJoin = 'miter'; + ctx.roundRect(100, 50, 100, 100, [0]); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.1.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.1.html new file mode 100644 index 0000000000..d73b82bee4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.1.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.roundrect.end.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.end.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.1.worker.js new file mode 100644 index 0000000000..9428df5bbd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.1.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.end.1 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 100; + ctx.roundRect(200, 100, 400, 1000, [0]); + ctx.lineTo(-2000, -1000); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.2.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.2.html new file mode 100644 index 0000000000..ce9b44ead1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.2.html @@ -0,0 +1,39 @@ + + +OffscreenCanvas test: 2d.path.roundrect.end.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.end.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.2.worker.js new file mode 100644 index 0000000000..28f1ca1787 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.2.worker.js @@ -0,0 +1,34 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.end.2 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 450; + ctx.lineCap = 'round'; + ctx.lineJoin = 'bevel'; + ctx.roundRect(150, 150, 2000, 2000, [0]); + ctx.lineTo(160, 160); + ctx.stroke(); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.3.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.3.html new file mode 100644 index 0000000000..72183ecd05 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.3.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.path.roundrect.end.3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.end.3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.3.worker.js new file mode 100644 index 0000000000..57cb328cfa --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.3.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.end.3 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 100; + ctx.roundRect(101, 51, 2000, 2000, [500, 500, 500, 500]); + ctx.lineTo(-1, -1); + ctx.stroke(); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.4.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.4.html new file mode 100644 index 0000000000..c4fdee5958 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.4.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.path.roundrect.end.4 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.end.4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.4.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.4.worker.js new file mode 100644 index 0000000000..a97a37d157 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.4.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.end.4 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.roundRect(-1, -1, 2000, 2000, [1000, 1000, 1000, 1000]); + ctx.lineTo(-150, -150); + ctx.stroke(); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.negative.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.negative.html new file mode 100644 index 0000000000..aa83657244 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.negative.html @@ -0,0 +1,45 @@ + + +OffscreenCanvas test: 2d.path.roundrect.negative + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.negative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.negative.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.negative.worker.js new file mode 100644 index 0000000000..14459238ed --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.negative.worker.js @@ -0,0 +1,40 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.negative +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.beginPath(); + ctx.fillStyle = '#0f0'; + ctx.roundRect(0, 0, 50, 25, [10, 0, 0, 0]); + ctx.roundRect(100, 0, -50, 25, [10, 0, 0, 0]); + ctx.roundRect(0, 50, 50, -25, [10, 0, 0, 0]); + ctx.roundRect(100, 50, -50, -25, [10, 0, 0, 0]); + ctx.fill(); + // All rects drawn + _assertPixel(canvas, 25,12, 0,255,0,255); + _assertPixel(canvas, 75,12, 0,255,0,255); + _assertPixel(canvas, 25,37, 0,255,0,255); + _assertPixel(canvas, 75,37, 0,255,0,255); + // Correct corners are rounded. + _assertPixel(canvas, 1,1, 255,0,0,255); + _assertPixel(canvas, 98,1, 255,0,0,255); + _assertPixel(canvas, 1,48, 255,0,0,255); + _assertPixel(canvas, 98,48, 255,0,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.newsubpath.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.newsubpath.html new file mode 100644 index 0000000000..3ad7e5bb5b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.newsubpath.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.path.roundrect.newsubpath + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.newsubpath

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.newsubpath.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.newsubpath.worker.js new file mode 100644 index 0000000000..757327c60d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.newsubpath.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.newsubpath +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.beginPath(); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 50; + ctx.moveTo(-100, 25); + ctx.lineTo(-50, 25); + ctx.roundRect(200, 25, 1, 1, [0]); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.nonfinite.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.nonfinite.html new file mode 100644 index 0000000000..adddc7b9b8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.nonfinite.html @@ -0,0 +1,116 @@ + + +OffscreenCanvas test: 2d.path.roundrect.nonfinite + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  roundRect() with Infinity/NaN is ignored

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.nonfinite.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.nonfinite.worker.js new file mode 100644 index 0000000000..d6d44d6ffe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.nonfinite.worker.js @@ -0,0 +1,111 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.nonfinite +// Description:roundRect() with Infinity/NaN is ignored +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("roundRect() with Infinity/NaN is ignored"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50) + ctx.moveTo(0, 0); + ctx.lineTo(100, 0); + ctx.roundRect(Infinity, 50, 1, 1, [0]); + ctx.roundRect(-Infinity, 50, 1, 1, [0]); + ctx.roundRect(NaN, 50, 1, 1, [0]); + ctx.roundRect(0, Infinity, 1, 1, [0]); + ctx.roundRect(0, -Infinity, 1, 1, [0]); + ctx.roundRect(0, NaN, 1, 1, [0]); + ctx.roundRect(0, 50, Infinity, 1, [0]); + ctx.roundRect(0, 50, -Infinity, 1, [0]); + ctx.roundRect(0, 50, NaN, 1, [0]); + ctx.roundRect(0, 50, 1, Infinity, [0]); + ctx.roundRect(0, 50, 1, -Infinity, [0]); + ctx.roundRect(0, 50, 1, NaN, [0]); + ctx.roundRect(0, 50, 1, 1, [Infinity]); + ctx.roundRect(0, 50, 1, 1, [-Infinity]); + ctx.roundRect(0, 50, 1, 1, [NaN]); + ctx.roundRect(0, 50, 1, 1, [Infinity,0]); + ctx.roundRect(0, 50, 1, 1, [-Infinity,0]); + ctx.roundRect(0, 50, 1, 1, [NaN,0]); + ctx.roundRect(0, 50, 1, 1, [0,Infinity]); + ctx.roundRect(0, 50, 1, 1, [0,-Infinity]); + ctx.roundRect(0, 50, 1, 1, [0,NaN]); + ctx.roundRect(0, 50, 1, 1, [Infinity,0,0]); + ctx.roundRect(0, 50, 1, 1, [-Infinity,0,0]); + ctx.roundRect(0, 50, 1, 1, [NaN,0,0]); + ctx.roundRect(0, 50, 1, 1, [0,Infinity,0]); + ctx.roundRect(0, 50, 1, 1, [0,-Infinity,0]); + ctx.roundRect(0, 50, 1, 1, [0,NaN,0]); + ctx.roundRect(0, 50, 1, 1, [0,0,Infinity]); + ctx.roundRect(0, 50, 1, 1, [0,0,-Infinity]); + ctx.roundRect(0, 50, 1, 1, [0,0,NaN]); + ctx.roundRect(0, 50, 1, 1, [Infinity,0,0,0]); + ctx.roundRect(0, 50, 1, 1, [-Infinity,0,0,0]); + ctx.roundRect(0, 50, 1, 1, [NaN,0,0,0]); + ctx.roundRect(0, 50, 1, 1, [0,Infinity,0,0]); + ctx.roundRect(0, 50, 1, 1, [0,-Infinity,0,0]); + ctx.roundRect(0, 50, 1, 1, [0,NaN,0,0]); + ctx.roundRect(0, 50, 1, 1, [0,0,Infinity,0]); + ctx.roundRect(0, 50, 1, 1, [0,0,-Infinity,0]); + ctx.roundRect(0, 50, 1, 1, [0,0,NaN,0]); + ctx.roundRect(0, 50, 1, 1, [0,0,0,Infinity]); + ctx.roundRect(0, 50, 1, 1, [0,0,0,-Infinity]); + ctx.roundRect(0, 50, 1, 1, [0,0,0,NaN]); + ctx.roundRect(Infinity, Infinity, 1, 1, [0]); + ctx.roundRect(Infinity, Infinity, Infinity, 1, [0]); + ctx.roundRect(Infinity, Infinity, Infinity, Infinity, [0]); + ctx.roundRect(Infinity, Infinity, Infinity, Infinity, [Infinity]); + ctx.roundRect(Infinity, Infinity, Infinity, 1, [Infinity]); + ctx.roundRect(Infinity, Infinity, 1, Infinity, [0]); + ctx.roundRect(Infinity, Infinity, 1, Infinity, [Infinity]); + ctx.roundRect(Infinity, Infinity, 1, 1, [Infinity]); + ctx.roundRect(Infinity, 50, Infinity, 1, [0]); + ctx.roundRect(Infinity, 50, Infinity, Infinity, [0]); + ctx.roundRect(Infinity, 50, Infinity, Infinity, [Infinity]); + ctx.roundRect(Infinity, 50, Infinity, 1, [Infinity]); + ctx.roundRect(Infinity, 50, 1, Infinity, [0]); + ctx.roundRect(Infinity, 50, 1, Infinity, [Infinity]); + ctx.roundRect(Infinity, 50, 1, 1, [Infinity]); + ctx.roundRect(0, Infinity, Infinity, 1, [0]); + ctx.roundRect(0, Infinity, Infinity, Infinity, [0]); + ctx.roundRect(0, Infinity, Infinity, Infinity, [Infinity]); + ctx.roundRect(0, Infinity, Infinity, 1, [Infinity]); + ctx.roundRect(0, Infinity, 1, Infinity, [0]); + ctx.roundRect(0, Infinity, 1, Infinity, [Infinity]); + ctx.roundRect(0, Infinity, 1, 1, [Infinity]); + ctx.roundRect(0, 50, Infinity, Infinity, [0]); + ctx.roundRect(0, 50, Infinity, Infinity, [Infinity]); + ctx.roundRect(0, 50, Infinity, 1, [Infinity]); + ctx.roundRect(0, 50, 1, Infinity, [Infinity]); + ctx.roundRect(0, 0, 100, 100, [new DOMPoint(10, Infinity)]); + ctx.roundRect(0, 0, 100, 100, [new DOMPoint(10, -Infinity)]); + ctx.roundRect(0, 0, 100, 100, [new DOMPoint(10, NaN)]); + ctx.roundRect(0, 0, 100, 100, [new DOMPoint(Infinity, 10)]); + ctx.roundRect(0, 0, 100, 100, [new DOMPoint(-Infinity, 10)]); + ctx.roundRect(0, 0, 100, 100, [new DOMPoint(NaN, 10)]); + ctx.roundRect(0, 0, 100, 100, [{x: 10, y: Infinity}]); + ctx.roundRect(0, 0, 100, 100, [{x: 10, y: -Infinity}]); + ctx.roundRect(0, 0, 100, 100, [{x: 10, y: NaN}]); + ctx.roundRect(0, 0, 100, 100, [{x: Infinity, y: 10}]); + ctx.roundRect(0, 0, 100, 100, [{x: -Infinity, y: 10}]); + ctx.roundRect(0, 0, 100, 100, [{x: NaN, y: 10}]); + ctx.lineTo(100, 50); + ctx.lineTo(0, 50); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 90,45, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.1.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.1.html new file mode 100644 index 0000000000..db4d871f9f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.1.html @@ -0,0 +1,40 @@ + + +OffscreenCanvas test: 2d.path.roundrect.radius.intersecting.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.radius.intersecting.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Check that roundRects with intersecting corner arcs are rendered correctly.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.1.worker.js new file mode 100644 index 0000000000..27076dbe21 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.1.worker.js @@ -0,0 +1,35 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.radius.intersecting.1 +// Description:Check that roundRects with intersecting corner arcs are rendered correctly. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Check that roundRects with intersecting corner arcs are rendered correctly."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [40, 40, 40, 40]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 2,25, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 50,48, 0,255,0,255); + _assertPixel(canvas, 97,25, 0,255,0,255); + _assertPixel(canvas, 1,1, 255,0,0,255); + _assertPixel(canvas, 98,1, 255,0,0,255); + _assertPixel(canvas, 1,48, 255,0,0,255); + _assertPixel(canvas, 98,48, 255,0,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.2.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.2.html new file mode 100644 index 0000000000..985942ca36 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.2.html @@ -0,0 +1,40 @@ + + +OffscreenCanvas test: 2d.path.roundrect.radius.intersecting.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.radius.intersecting.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Check that roundRects with intersecting corner arcs are rendered correctly.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.2.worker.js new file mode 100644 index 0000000000..5b6de579ae --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.2.worker.js @@ -0,0 +1,35 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.radius.intersecting.2 +// Description:Check that roundRects with intersecting corner arcs are rendered correctly. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Check that roundRects with intersecting corner arcs are rendered correctly."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [1000, 1000, 1000, 1000]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 2,25, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 50,48, 0,255,0,255); + _assertPixel(canvas, 97,25, 0,255,0,255); + _assertPixel(canvas, 1,1, 255,0,0,255); + _assertPixel(canvas, 98,1, 255,0,0,255); + _assertPixel(canvas, 1,48, 255,0,0,255); + _assertPixel(canvas, 98,48, 255,0,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.negative.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.negative.html new file mode 100644 index 0000000000..60a7bebd24 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.negative.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.path.roundrect.radius.negative + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.radius.negative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  roundRect() with negative radius throws an exception

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.negative.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.negative.worker.js new file mode 100644 index 0000000000..554a1ac078 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.negative.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.radius.negative +// Description:roundRect() with negative radius throws an exception +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("roundRect() with negative radius throws an exception"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [-1])}); + assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [1, -1])}); + assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [new DOMPoint(-1, 1), 1])}); + assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [new DOMPoint(1, -1)])}); + assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [{x: -1, y: 1}, 1])}); + assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [{x: 1, y: -1}])}); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.noargument.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.noargument.html new file mode 100644 index 0000000000..26a69afad0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.noargument.html @@ -0,0 +1,50 @@ + + +OffscreenCanvas test: 2d.path.roundrect.radius.noargument + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.radius.noargument

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Check that roundRect draws a rectangle when no radii are provided.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.noargument.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.noargument.worker.js new file mode 100644 index 0000000000..1f6227786b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.noargument.worker.js @@ -0,0 +1,45 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.radius.noargument +// Description:Check that roundRect draws a rectangle when no radii are provided. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Check that roundRect draws a rectangle when no radii are provided."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(10, 10, 80, 30); + ctx.fillStyle = '#0f0'; + ctx.fill(); + // upper left corner (10, 10) + _assertPixel(canvas, 10,9, 255,0,0,255); + _assertPixel(canvas, 9,10, 255,0,0,255); + _assertPixel(canvas, 10,10, 0,255,0,255); + + // upper right corner (89, 10) + _assertPixel(canvas, 90,10, 255,0,0,255); + _assertPixel(canvas, 89,9, 255,0,0,255); + _assertPixel(canvas, 89,10, 0,255,0,255); + + // lower right corner (89, 39) + _assertPixel(canvas, 89,40, 255,0,0,255); + _assertPixel(canvas, 90,39, 255,0,0,255); + _assertPixel(canvas, 89,39, 0,255,0,255); + + // lower left corner (10, 30) + _assertPixel(canvas, 9,39, 255,0,0,255); + _assertPixel(canvas, 10,40, 255,0,0,255); + _assertPixel(canvas, 10,39, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.none.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.none.html new file mode 100644 index 0000000000..763113e438 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.none.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.path.roundrect.radius.none + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.radius.none

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Check that roundRect throws an RangeError if radii is an empty array.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.none.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.none.worker.js new file mode 100644 index 0000000000..fefd1b4dd3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.none.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.radius.none +// Description:Check that roundRect throws an RangeError if radii is an empty array. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Check that roundRect throws an RangeError if radii is an empty array."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 100, 50, [])}); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.toomany.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.toomany.html new file mode 100644 index 0000000000..ce330875fb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.toomany.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.path.roundrect.radius.toomany + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.radius.toomany

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Check that roundRect throws an IndeSizeError if radii has more than four items.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.toomany.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.toomany.worker.js new file mode 100644 index 0000000000..e1250afac7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.toomany.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.radius.toomany +// Description:Check that roundRect throws an IndeSizeError if radii has more than four items. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Check that roundRect throws an IndeSizeError if radii has more than four items."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 100, 50, [0, 0, 0, 0, 0])}); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.selfintersect.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.selfintersect.html new file mode 100644 index 0000000000..15ee6f4958 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.selfintersect.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.roundrect.selfintersect + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.selfintersect

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.selfintersect.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.selfintersect.worker.js new file mode 100644 index 0000000000..91741110fc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.selfintersect.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.selfintersect +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.roundRect(0, 0, 100, 50, [0]); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 90; + ctx.beginPath(); + ctx.roundRect(45, 20, 10, 10, [0]); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.winding.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.winding.html new file mode 100644 index 0000000000..47ecd777dc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.winding.html @@ -0,0 +1,39 @@ + + +OffscreenCanvas test: 2d.path.roundrect.winding + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.winding

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.winding.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.winding.worker.js new file mode 100644 index 0000000000..737e99f373 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.winding.worker.js @@ -0,0 +1,34 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.winding +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.beginPath(); + ctx.fillStyle = '#f00'; + ctx.roundRect(0, 0, 50, 50, [0]); + ctx.roundRect(100, 50, -50, -50, [0]); + ctx.roundRect(0, 25, 100, -25, [0]); + ctx.roundRect(100, 25, -100, 25, [0]); + ctx.fill(); + _assertPixel(canvas, 25,12, 0,255,0,255); + _assertPixel(canvas, 75,12, 0,255,0,255); + _assertPixel(canvas, 25,37, 0,255,0,255); + _assertPixel(canvas, 75,37, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.1.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.1.html new file mode 100644 index 0000000000..772339dcc6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.1.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.roundrect.zero.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.zero.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.1.worker.js new file mode 100644 index 0000000000..afcaa20769 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.1.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.zero.1 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 100; + ctx.beginPath(); + ctx.roundRect(0, 50, 100, 0, [0]); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.2.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.2.html new file mode 100644 index 0000000000..2aad5aad41 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.2.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.roundrect.zero.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.zero.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.2.worker.js new file mode 100644 index 0000000000..dec178bd20 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.2.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.zero.2 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 100; + ctx.beginPath(); + ctx.roundRect(50, -100, 0, 250, [0]); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.3.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.3.html new file mode 100644 index 0000000000..485384aaff --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.3.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.roundrect.zero.3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.zero.3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.3.worker.js new file mode 100644 index 0000000000..88adb5c437 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.3.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.zero.3 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 100; + ctx.beginPath(); + ctx.roundRect(50, 25, 0, 0, [0]); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.4.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.4.html new file mode 100644 index 0000000000..dfd4821a84 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.4.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.roundrect.zero.4 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.zero.4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.4.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.4.worker.js new file mode 100644 index 0000000000..fe8cc149c5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.4.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.zero.4 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.roundRect(100, 25, 0, 0, [0]); + ctx.lineTo(0, 25); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.5.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.5.html new file mode 100644 index 0000000000..931a737e3b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.5.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.path.roundrect.zero.5 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.zero.5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.5.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.5.worker.js new file mode 100644 index 0000000000..1fd61246a9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.5.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.zero.5 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 50; + ctx.moveTo(0, 0); + ctx.roundRect(100, 25, 0, 0, [0]); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.6.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.6.html new file mode 100644 index 0000000000..25ed23d329 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.6.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.path.roundrect.zero.6 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.roundrect.zero.6

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.6.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.6.worker.js new file mode 100644 index 0000000000..c4b6fba5b0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.6.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.roundrect.zero.6 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineJoin = 'miter'; + ctx.miterLimit = 1.5; + ctx.lineWidth = 200; + ctx.beginPath(); + ctx.roundRect(100, 25, 1000, 0, [0]); + ctx.stroke(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.empty.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.empty.html new file mode 100644 index 0000000000..29a95da20d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.empty.html @@ -0,0 +1,40 @@ + + +OffscreenCanvas test: 2d.path.stroke.empty + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.stroke.empty

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Empty subpaths are not stroked

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.empty.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.empty.worker.js new file mode 100644 index 0000000000..56ee68f185 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.empty.worker.js @@ -0,0 +1,35 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.stroke.empty +// Description:Empty subpaths are not stroked +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Empty subpaths are not stroked"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 100; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(40, 25); + ctx.moveTo(60, 25); + ctx.stroke(); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.overlap.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.overlap.html new file mode 100644 index 0000000000..c3847464bb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.overlap.html @@ -0,0 +1,38 @@ + + +OffscreenCanvas test: 2d.path.stroke.overlap + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.stroke.overlap

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Stroked subpaths are combined before being drawn

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.overlap.png b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.overlap.png new file mode 100644 index 0000000000..e2a35d48d4 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.overlap.png differ diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.overlap.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.overlap.worker.js new file mode 100644 index 0000000000..0e59d3bfc0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.overlap.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.stroke.overlap +// Description:Stroked subpaths are combined before being drawn +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Stroked subpaths are combined before being drawn"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#000'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.lineWidth = 50; + ctx.moveTo(0, 20); + ctx.lineTo(100, 20); + ctx.moveTo(0, 30); + ctx.lineTo(100, 30); + ctx.stroke(); + + _assertPixelApprox(canvas, 50,25, 0,127,0,255, 1); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.arc.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.arc.html new file mode 100644 index 0000000000..40a73b85fb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.arc.html @@ -0,0 +1,45 @@ + + +OffscreenCanvas test: 2d.path.stroke.prune.arc + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.stroke.prune.arc

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Zero-length line segments from arcTo and arc are removed before stroking

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.arc.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.arc.worker.js new file mode 100644 index 0000000000..880e8146ba --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.arc.worker.js @@ -0,0 +1,40 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.stroke.prune.arc +// Description:Zero-length line segments from arcTo and arc are removed before stroking +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Zero-length line segments from arcTo and arc are removed before stroking"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 100; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.arcTo(50, 25, 150, 25, 10); + ctx.stroke(); + + ctx.beginPath(); + ctx.moveTo(60, 25); + ctx.arc(50, 25, 10, 0, 0, false); + ctx.stroke(); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closed.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closed.html new file mode 100644 index 0000000000..2a3b40068d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closed.html @@ -0,0 +1,41 @@ + + +OffscreenCanvas test: 2d.path.stroke.prune.closed + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.stroke.prune.closed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Zero-length line segments from closed paths are removed before stroking

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closed.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closed.worker.js new file mode 100644 index 0000000000..e1d271bf6a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closed.worker.js @@ -0,0 +1,36 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.stroke.prune.closed +// Description:Zero-length line segments from closed paths are removed before stroking +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Zero-length line segments from closed paths are removed before stroking"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 100; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.lineTo(50, 25); + ctx.closePath(); + ctx.stroke(); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.corner.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.corner.html new file mode 100644 index 0000000000..45db65d6d1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.corner.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.path.stroke.prune.corner + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.stroke.prune.corner

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Zero-length line segments are removed before stroking with miters

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.corner.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.corner.worker.js new file mode 100644 index 0000000000..fff4ba19e9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.corner.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.stroke.prune.corner +// Description:Zero-length line segments are removed before stroking with miters +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Zero-length line segments are removed before stroking with miters"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 400; + ctx.lineJoin = 'miter'; + ctx.miterLimit = 1.4; + + ctx.beginPath(); + ctx.moveTo(-1000, 200); + ctx.lineTo(-100, 200); + ctx.lineTo(-100, 200); + ctx.lineTo(-100, 200); + ctx.lineTo(-100, 1000); + ctx.stroke(); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.curve.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.curve.html new file mode 100644 index 0000000000..946395f1c1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.curve.html @@ -0,0 +1,45 @@ + + +OffscreenCanvas test: 2d.path.stroke.prune.curve + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.stroke.prune.curve

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Zero-length line segments from quadraticCurveTo and bezierCurveTo are removed before stroking

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.curve.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.curve.worker.js new file mode 100644 index 0000000000..ed960fdbe7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.curve.worker.js @@ -0,0 +1,40 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.stroke.prune.curve +// Description:Zero-length line segments from quadraticCurveTo and bezierCurveTo are removed before stroking +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Zero-length line segments from quadraticCurveTo and bezierCurveTo are removed before stroking"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 100; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.quadraticCurveTo(50, 25, 50, 25); + ctx.stroke(); + + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.bezierCurveTo(50, 25, 50, 25, 50, 25); + ctx.stroke(); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.line.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.line.html new file mode 100644 index 0000000000..1f0a892455 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.line.html @@ -0,0 +1,40 @@ + + +OffscreenCanvas test: 2d.path.stroke.prune.line + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.stroke.prune.line

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Zero-length line segments from lineTo are removed before stroking

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.line.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.line.worker.js new file mode 100644 index 0000000000..a00e73bcbb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.line.worker.js @@ -0,0 +1,35 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.stroke.prune.line +// Description:Zero-length line segments from lineTo are removed before stroking +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Zero-length line segments from lineTo are removed before stroking"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 100; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.lineTo(50, 25); + ctx.stroke(); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.rect.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.rect.html new file mode 100644 index 0000000000..ffce538d91 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.rect.html @@ -0,0 +1,41 @@ + + +OffscreenCanvas test: 2d.path.stroke.prune.rect + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.stroke.prune.rect

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Zero-length line segments from rect and strokeRect are removed before stroking

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.rect.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.rect.worker.js new file mode 100644 index 0000000000..87bb533ff9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.rect.worker.js @@ -0,0 +1,36 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.stroke.prune.rect +// Description:Zero-length line segments from rect and strokeRect are removed before stroking +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Zero-length line segments from rect and strokeRect are removed before stroking"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 100; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.rect(50, 25, 0, 0); + ctx.stroke(); + + ctx.strokeRect(50, 25, 0, 0); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale1.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale1.html new file mode 100644 index 0000000000..47639065d3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale1.html @@ -0,0 +1,54 @@ + + +OffscreenCanvas test: 2d.path.stroke.scale1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.stroke.scale1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Stroke line widths are scaled by the current transformation matrix

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale1.worker.js new file mode 100644 index 0000000000..3725fdf6e8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale1.worker.js @@ -0,0 +1,49 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.stroke.scale1 +// Description:Stroke line widths are scaled by the current transformation matrix +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Stroke line widths are scaled by the current transformation matrix"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.beginPath(); + ctx.rect(25, 12.5, 50, 25); + ctx.save(); + ctx.scale(50, 25); + ctx.strokeStyle = '#0f0'; + ctx.stroke(); + ctx.restore(); + + ctx.beginPath(); + ctx.rect(-25, -12.5, 150, 75); + ctx.save(); + ctx.scale(50, 25); + ctx.strokeStyle = '#f00'; + ctx.stroke(); + ctx.restore(); + + _assertPixel(canvas, 0,0, 0,255,0,255); + _assertPixel(canvas, 50,0, 0,255,0,255); + _assertPixel(canvas, 99,0, 0,255,0,255); + _assertPixel(canvas, 0,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 99,25, 0,255,0,255); + _assertPixel(canvas, 0,49, 0,255,0,255); + _assertPixel(canvas, 50,49, 0,255,0,255); + _assertPixel(canvas, 99,49, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale2.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale2.html new file mode 100644 index 0000000000..447a6dfadc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale2.html @@ -0,0 +1,56 @@ + + +OffscreenCanvas test: 2d.path.stroke.scale2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.stroke.scale2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Stroke line widths are scaled by the current transformation matrix

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale2.worker.js new file mode 100644 index 0000000000..5223de7816 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale2.worker.js @@ -0,0 +1,51 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.stroke.scale2 +// Description:Stroke line widths are scaled by the current transformation matrix +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Stroke line widths are scaled by the current transformation matrix"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.beginPath(); + ctx.rect(25, 12.5, 50, 25); + ctx.save(); + ctx.rotate(Math.PI/2); + ctx.scale(25, 50); + ctx.strokeStyle = '#0f0'; + ctx.stroke(); + ctx.restore(); + + ctx.beginPath(); + ctx.rect(-25, -12.5, 150, 75); + ctx.save(); + ctx.rotate(Math.PI/2); + ctx.scale(25, 50); + ctx.strokeStyle = '#f00'; + ctx.stroke(); + ctx.restore(); + + _assertPixel(canvas, 0,0, 0,255,0,255); + _assertPixel(canvas, 50,0, 0,255,0,255); + _assertPixel(canvas, 99,0, 0,255,0,255); + _assertPixel(canvas, 0,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 99,25, 0,255,0,255); + _assertPixel(canvas, 0,49, 0,255,0,255); + _assertPixel(canvas, 50,49, 0,255,0,255); + _assertPixel(canvas, 99,49, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.skew.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.skew.html new file mode 100644 index 0000000000..1fb118b122 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.skew.html @@ -0,0 +1,70 @@ + + +OffscreenCanvas test: 2d.path.stroke.skew + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.stroke.skew

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Strokes lines are skewed by the current transformation matrix

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.skew.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.skew.worker.js new file mode 100644 index 0000000000..e65b796d06 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.skew.worker.js @@ -0,0 +1,65 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.stroke.skew +// Description:Strokes lines are skewed by the current transformation matrix +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Strokes lines are skewed by the current transformation matrix"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.save(); + ctx.beginPath(); + ctx.moveTo(49, -50); + ctx.lineTo(201, -50); + ctx.rotate(Math.PI/4); + ctx.scale(1, 283); + ctx.strokeStyle = '#0f0'; + ctx.stroke(); + ctx.restore(); + + ctx.save(); + ctx.beginPath(); + ctx.translate(-150, 0); + ctx.moveTo(49, -50); + ctx.lineTo(199, -50); + ctx.rotate(Math.PI/4); + ctx.scale(1, 142); + ctx.strokeStyle = '#f00'; + ctx.stroke(); + ctx.restore(); + + ctx.save(); + ctx.beginPath(); + ctx.translate(-150, 0); + ctx.moveTo(49, -50); + ctx.lineTo(199, -50); + ctx.rotate(Math.PI/4); + ctx.scale(1, 142); + ctx.strokeStyle = '#f00'; + ctx.stroke(); + ctx.restore(); + + _assertPixel(canvas, 0,0, 0,255,0,255); + _assertPixel(canvas, 50,0, 0,255,0,255); + _assertPixel(canvas, 99,0, 0,255,0,255); + _assertPixel(canvas, 0,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 99,25, 0,255,0,255); + _assertPixel(canvas, 0,49, 0,255,0,255); + _assertPixel(canvas, 50,49, 0,255,0,255); + _assertPixel(canvas, 99,49, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.unaffected.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.unaffected.html new file mode 100644 index 0000000000..3fc9cfad88 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.unaffected.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.path.stroke.unaffected + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.stroke.unaffected

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Stroking does not start a new path or subpath

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.unaffected.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.unaffected.worker.js new file mode 100644 index 0000000000..d9df1ada94 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.unaffected.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.stroke.unaffected +// Description:Stroking does not start a new path or subpath +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Stroking does not start a new path or subpath"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineWidth = 50; + ctx.moveTo(-100, 25); + ctx.lineTo(-100, -100); + ctx.lineTo(200, -100); + ctx.lineTo(200, 25); + ctx.strokeStyle = '#f00'; + ctx.stroke(); + + ctx.closePath(); + ctx.strokeStyle = '#0f0'; + ctx.stroke(); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.union.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.union.html new file mode 100644 index 0000000000..6b980acff2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.union.html @@ -0,0 +1,38 @@ + + +OffscreenCanvas test: 2d.path.stroke.union + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.stroke.union

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Strokes in opposite directions are unioned, not subtracted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.union.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.union.worker.js new file mode 100644 index 0000000000..3b05feec03 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.stroke.union.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.stroke.union +// Description:Strokes in opposite directions are unioned, not subtracted +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Strokes in opposite directions are unioned, not subtracted"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 40; + ctx.moveTo(0, 10); + ctx.lineTo(100, 10); + ctx.moveTo(100, 40); + ctx.lineTo(0, 40); + ctx.stroke(); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.transformation.basic.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.transformation.basic.html new file mode 100644 index 0000000000..27f00aae03 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.transformation.basic.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.path.transformation.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.transformation.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.transformation.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.transformation.basic.worker.js new file mode 100644 index 0000000000..3ae4c876d5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.transformation.basic.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.transformation.basic +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.translate(-100, 0); + ctx.rect(100, 0, 100, 50); + ctx.translate(0, -100); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.transformation.changing.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.transformation.changing.html new file mode 100644 index 0000000000..786a5cf589 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.transformation.changing.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.path.transformation.changing + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.transformation.changing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Transformations are applied while building paths, not when drawing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.transformation.changing.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.transformation.changing.worker.js new file mode 100644 index 0000000000..2d8993c685 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.transformation.changing.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.transformation.changing +// Description:Transformations are applied while building paths, not when drawing +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Transformations are applied while building paths, not when drawing"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.moveTo(0, 0); + ctx.translate(100, 0); + ctx.lineTo(0, 0); + ctx.translate(0, 50); + ctx.lineTo(0, 0); + ctx.translate(-100, 0); + ctx.lineTo(0, 0); + ctx.translate(1000, 1000); + ctx.rotate(Math.PI/2); + ctx.scale(0.1, 0.1); + ctx.fill(); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.transformation.multiple.html b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.transformation.multiple.html new file mode 100644 index 0000000000..636491bb0e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.transformation.multiple.html @@ -0,0 +1,47 @@ + + +OffscreenCanvas test: 2d.path.transformation.multiple + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.path.transformation.multiple

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Transformations are applied while building paths, not when drawing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.transformation.multiple.worker.js b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.transformation.multiple.worker.js new file mode 100644 index 0000000000..a9fb37d0de --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/path-objects/2d.path.transformation.multiple.worker.js @@ -0,0 +1,42 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.path.transformation.multiple +// Description:Transformations are applied while building paths, not when drawing +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Transformations are applied while building paths, not when drawing"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#f00'; + ctx.translate(-100, 0); + ctx.rect(0, 0, 100, 50); + ctx.fill(); + ctx.translate(100, 0); + ctx.fill(); + + ctx.beginPath(); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 50; + ctx.translate(0, -50); + ctx.moveTo(0, 25); + ctx.lineTo(100, 25); + ctx.stroke(); + ctx.translate(0, 50); + ctx.stroke(); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.basic.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.basic.html new file mode 100644 index 0000000000..f6932386df --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.basic.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.imageData.create1.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.create1.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  createImageData(imgdata) exists and returns something

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.basic.worker.js new file mode 100644 index 0000000000..30f3ed21b1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.basic.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.create1.basic +// Description:createImageData(imgdata) exists and returns something +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("createImageData(imgdata) exists and returns something"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertDifferent(ctx.createImageData(ctx.createImageData(1, 1)), null, "ctx.createImageData(ctx.createImageData(1, 1))", "null"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.initial.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.initial.html new file mode 100644 index 0000000000..627b09b8bd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.initial.html @@ -0,0 +1,38 @@ + + +OffscreenCanvas test: 2d.imageData.create1.initial + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.create1.initial

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  createImageData(imgdata) returns transparent black data of the right size

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.initial.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.initial.worker.js new file mode 100644 index 0000000000..da0856a487 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.initial.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.create1.initial +// Description:createImageData(imgdata) returns transparent black data of the right size +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("createImageData(imgdata) returns transparent black data of the right size"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var imgdata1 = ctx.getImageData(0, 0, 10, 20); + var imgdata2 = ctx.createImageData(imgdata1); + _assertSame(imgdata2.data.length, imgdata1.data.length, "imgdata2.data.length", "imgdata1.data.length"); + _assertSame(imgdata2.width, imgdata1.width, "imgdata2.width", "imgdata1.width"); + _assertSame(imgdata2.height, imgdata1.height, "imgdata2.height", "imgdata1.height"); + var isTransparentBlack = true; + for (var i = 0; i < imgdata2.data.length; ++i) + if (imgdata2.data[i] !== 0) + isTransparentBlack = false; + _assert(isTransparentBlack, "isTransparentBlack"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.zero.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.zero.html new file mode 100644 index 0000000000..b5a95172b6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.zero.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.imageData.create1.zero + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.create1.zero

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  createImageData(null) throws TypeError

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.zero.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.zero.worker.js new file mode 100644 index 0000000000..1eabd9ebf3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.zero.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.create1.zero +// Description:createImageData(null) throws TypeError +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("createImageData(null) throws TypeError"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_js(TypeError, function() { ctx.createImageData(null); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.basic.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.basic.html new file mode 100644 index 0000000000..7c265f5209 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.basic.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.imageData.create2.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.create2.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  createImageData(sw, sh) exists and returns something

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.basic.worker.js new file mode 100644 index 0000000000..26ca82929c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.basic.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.create2.basic +// Description:createImageData(sw, sh) exists and returns something +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("createImageData(sw, sh) exists and returns something"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertDifferent(ctx.createImageData(1, 1), null, "ctx.createImageData(1, 1)", "null"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.double.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.double.html new file mode 100644 index 0000000000..ca54641a30 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.double.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.imageData.create2.double + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.create2.double

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  createImageData(w, h) double is converted to long

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.double.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.double.worker.js new file mode 100644 index 0000000000..2f3416d0f0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.double.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.create2.double +// Description:createImageData(w, h) double is converted to long +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("createImageData(w, h) double is converted to long"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var imgdata1 = ctx.createImageData(10.01, 10.99); + var imgdata2 = ctx.createImageData(-10.01, -10.99); + _assertSame(imgdata1.width, 10, "imgdata1.width", "10"); + _assertSame(imgdata1.height, 10, "imgdata1.height", "10"); + _assertSame(imgdata2.width, 10, "imgdata2.width", "10"); + _assertSame(imgdata2.height, 10, "imgdata2.height", "10"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.initial.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.initial.html new file mode 100644 index 0000000000..566a9a30db --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.initial.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.imageData.create2.initial + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.create2.initial

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  createImageData(sw, sh) returns transparent black data of the right size

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.initial.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.initial.worker.js new file mode 100644 index 0000000000..472e1dfd2e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.initial.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.create2.initial +// Description:createImageData(sw, sh) returns transparent black data of the right size +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("createImageData(sw, sh) returns transparent black data of the right size"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var imgdata = ctx.createImageData(10, 20); + _assertSame(imgdata.data.length, imgdata.width*imgdata.height*4, "imgdata.data.length", "imgdata.width*imgdata.height*4"); + _assert(imgdata.width < imgdata.height, "imgdata.width < imgdata.height"); + _assert(imgdata.width > 0, "imgdata.width > 0"); + var isTransparentBlack = true; + for (var i = 0; i < imgdata.data.length; ++i) + if (imgdata.data[i] !== 0) + isTransparentBlack = false; + _assert(isTransparentBlack, "isTransparentBlack"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.large.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.large.html new file mode 100644 index 0000000000..75b8f737fd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.large.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.imageData.create2.large + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.create2.large

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  createImageData(sw, sh) works for sizes much larger than the canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.large.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.large.worker.js new file mode 100644 index 0000000000..e2b85bfb69 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.large.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.create2.large +// Description:createImageData(sw, sh) works for sizes much larger than the canvas +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("createImageData(sw, sh) works for sizes much larger than the canvas"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var imgdata = ctx.createImageData(1000, 2000); + _assertSame(imgdata.data.length, imgdata.width*imgdata.height*4, "imgdata.data.length", "imgdata.width*imgdata.height*4"); + _assert(imgdata.width < imgdata.height, "imgdata.width < imgdata.height"); + _assert(imgdata.width > 0, "imgdata.width > 0"); + var isTransparentBlack = true; + for (var i = 0; i < imgdata.data.length; i += 7813) // check ~1024 points (assuming normal scaling) + if (imgdata.data[i] !== 0) + isTransparentBlack = false; + _assert(isTransparentBlack, "isTransparentBlack"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.negative.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.negative.html new file mode 100644 index 0000000000..b41153c282 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.negative.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.imageData.create2.negative + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.create2.negative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  createImageData(sw, sh) takes the absolute magnitude of the size arguments

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.negative.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.negative.worker.js new file mode 100644 index 0000000000..62ed60e102 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.negative.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.create2.negative +// Description:createImageData(sw, sh) takes the absolute magnitude of the size arguments +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("createImageData(sw, sh) takes the absolute magnitude of the size arguments"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var imgdata1 = ctx.createImageData(10, 20); + var imgdata2 = ctx.createImageData(-10, 20); + var imgdata3 = ctx.createImageData(10, -20); + var imgdata4 = ctx.createImageData(-10, -20); + _assertSame(imgdata1.data.length, imgdata2.data.length, "imgdata1.data.length", "imgdata2.data.length"); + _assertSame(imgdata2.data.length, imgdata3.data.length, "imgdata2.data.length", "imgdata3.data.length"); + _assertSame(imgdata3.data.length, imgdata4.data.length, "imgdata3.data.length", "imgdata4.data.length"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.nonfinite.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.nonfinite.html new file mode 100644 index 0000000000..dd6f6d8350 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.nonfinite.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.imageData.create2.nonfinite + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.create2.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  createImageData() throws TypeError if arguments are not finite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in "Web IDL" (draft) + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.nonfinite.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.nonfinite.worker.js new file mode 100644 index 0000000000..18825588bb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.nonfinite.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.create2.nonfinite +// Description:createImageData() throws TypeError if arguments are not finite +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in "Web IDL" (draft) + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("createImageData() throws TypeError if arguments are not finite"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_js(TypeError, function() { ctx.createImageData(Infinity, 10); }); + assert_throws_js(TypeError, function() { ctx.createImageData(-Infinity, 10); }); + assert_throws_js(TypeError, function() { ctx.createImageData(NaN, 10); }); + assert_throws_js(TypeError, function() { ctx.createImageData(10, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createImageData(10, -Infinity); }); + assert_throws_js(TypeError, function() { ctx.createImageData(10, NaN); }); + assert_throws_js(TypeError, function() { ctx.createImageData(Infinity, Infinity); }); + var posinfobj = { valueOf: function() { return Infinity; } }, + neginfobj = { valueOf: function() { return -Infinity; } }, + nanobj = { valueOf: function() { return -Infinity; } }; + assert_throws_js(TypeError, function() { ctx.createImageData(posinfobj, 10); }); + assert_throws_js(TypeError, function() { ctx.createImageData(neginfobj, 10); }); + assert_throws_js(TypeError, function() { ctx.createImageData(nanobj, 10); }); + assert_throws_js(TypeError, function() { ctx.createImageData(10, posinfobj); }); + assert_throws_js(TypeError, function() { ctx.createImageData(10, neginfobj); }); + assert_throws_js(TypeError, function() { ctx.createImageData(10, nanobj); }); + assert_throws_js(TypeError, function() { ctx.createImageData(posinfobj, posinfobj); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.round.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.round.html new file mode 100644 index 0000000000..0ecb2fb686 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.round.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.imageData.create2.round + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.create2.round

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  createImageData(w, h) is rounded the same as getImageData(0, 0, w, h)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.round.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.round.worker.js new file mode 100644 index 0000000000..b416a02bf2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.round.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.create2.round +// Description:createImageData(w, h) is rounded the same as getImageData(0, 0, w, h) +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("createImageData(w, h) is rounded the same as getImageData(0, 0, w, h)"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var imgdata1 = ctx.createImageData(10.01, 10.99); + var imgdata2 = ctx.getImageData(0, 0, 10.01, 10.99); + _assertSame(imgdata1.width, imgdata2.width, "imgdata1.width", "imgdata2.width"); + _assertSame(imgdata1.height, imgdata2.height, "imgdata1.height", "imgdata2.height"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.zero.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.zero.html new file mode 100644 index 0000000000..2f7082a7f0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.zero.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.imageData.create2.zero + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.create2.zero

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  createImageData(sw, sh) throws INDEX_SIZE_ERR if size is zero

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.zero.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.zero.worker.js new file mode 100644 index 0000000000..7f57c33898 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.zero.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.create2.zero +// Description:createImageData(sw, sh) throws INDEX_SIZE_ERR if size is zero +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("createImageData(sw, sh) throws INDEX_SIZE_ERR if size is zero"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(10, 0); }); + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(0, 10); }); + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(0, 0); }); + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(0.99, 10); }); + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(10, 0.1); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.basic.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.basic.html new file mode 100644 index 0000000000..d810e64e38 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.basic.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.imageData.get.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.get.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  getImageData() exists and returns something

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.basic.worker.js new file mode 100644 index 0000000000..f28268be17 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.basic.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.get.basic +// Description:getImageData() exists and returns something +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("getImageData() exists and returns something"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertDifferent(ctx.getImageData(0, 0, 100, 50), null, "ctx.getImageData(0, 0, 100, 50)", "null"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.clamp.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.clamp.html new file mode 100644 index 0000000000..825d00a5c4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.clamp.html @@ -0,0 +1,38 @@ + + +OffscreenCanvas test: 2d.imageData.get.clamp + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.get.clamp

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  getImageData() clamps colors to the range [0, 255]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.clamp.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.clamp.worker.js new file mode 100644 index 0000000000..fb4e76584a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.clamp.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.get.clamp +// Description:getImageData() clamps colors to the range [0, 255] +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("getImageData() clamps colors to the range [0, 255]"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgb(-100, -200, -300)'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = 'rgb(256, 300, 400)'; + ctx.fillRect(20, 10, 60, 10); + var imgdata1 = ctx.getImageData(10, 5, 1, 1); + _assertSame(imgdata1.data[0], 0, "imgdata1.data[\""+(0)+"\"]", "0"); + _assertSame(imgdata1.data[1], 0, "imgdata1.data[\""+(1)+"\"]", "0"); + _assertSame(imgdata1.data[2], 0, "imgdata1.data[\""+(2)+"\"]", "0"); + var imgdata2 = ctx.getImageData(30, 15, 1, 1); + _assertSame(imgdata2.data[0], 255, "imgdata2.data[\""+(0)+"\"]", "255"); + _assertSame(imgdata2.data[1], 255, "imgdata2.data[\""+(1)+"\"]", "255"); + _assertSame(imgdata2.data[2], 255, "imgdata2.data[\""+(2)+"\"]", "255"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.double.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.double.html new file mode 100644 index 0000000000..64fc7c7c12 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.double.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.imageData.get.double + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.get.double

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  createImageData(w, h) double is converted to long

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.double.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.double.worker.js new file mode 100644 index 0000000000..316dce7f80 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.double.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.get.double +// Description:createImageData(w, h) double is converted to long +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("createImageData(w, h) double is converted to long"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var imgdata1 = ctx.getImageData(0, 0, 10.01, 10.99); + var imgdata2 = ctx.getImageData(0, 0, -10.01, -10.99); + _assertSame(imgdata1.width, 10, "imgdata1.width", "10"); + _assertSame(imgdata1.height, 10, "imgdata1.height", "10"); + _assertSame(imgdata2.width, 10, "imgdata2.width", "10"); + _assertSame(imgdata2.height, 10, "imgdata2.height", "10"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.invalid.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.invalid.html new file mode 100644 index 0000000000..dfc5d106ee --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.invalid.html @@ -0,0 +1,45 @@ + + +OffscreenCanvas test: 2d.imageData.get.invalid + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.get.invalid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Verify getImageData() behavior in invalid cases.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.invalid.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.invalid.worker.js new file mode 100644 index 0000000000..5206899b6a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.invalid.worker.js @@ -0,0 +1,40 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.get.invalid +// Description:Verify getImageData() behavior in invalid cases. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Verify getImageData() behavior in invalid cases."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + imageData = ctx.getImageData(0,0,2,2); + var testValues = [NaN, true, false, "\"garbage\"", "-1", + "0", "1", "2", Infinity, -Infinity, + -5, -0.5, 0, 0.5, 5, + 5.4, 255, 256, null, undefined]; + var testResults = [0, 1, 0, 0, 0, + 0, 1, 2, 255, 0, + 0, 0, 0, 0, 5, + 5, 255, 255, 0, 0]; + for (var i = 0; i < testValues.length; i++) { + imageData.data[0] = testValues[i]; + _assert(imageData.data[0] == testResults[i], "imageData.data[\""+(0)+"\"] == testResults[\""+(i)+"\"]"); + } + imageData.data['foo']='garbage'; + _assert(imageData.data['foo'] == 'garbage', "imageData.data['foo'] == 'garbage'"); + imageData.data[-1]='garbage'; + _assert(imageData.data[-1] == undefined, "imageData.data[-1] == undefined"); + imageData.data[17]='garbage'; + _assert(imageData.data[17] == undefined, "imageData.data[\""+(17)+"\"] == undefined"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.large.crash.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.large.crash.html new file mode 100644 index 0000000000..3e05c3c92b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.large.crash.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.imageData.get.large.crash + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.get.large.crash

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test that canvas crash when image data cannot be allocated.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.large.crash.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.large.crash.worker.js new file mode 100644 index 0000000000..62c1771dba --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.large.crash.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.get.large.crash +// Description:Test that canvas crash when image data cannot be allocated. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Test that canvas crash when image data cannot be allocated."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_js(TypeError, function() { ctx.getImageData(10, 0xffffffff, 2147483647, 10); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.length.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.length.html new file mode 100644 index 0000000000..47b5fcd166 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.length.html @@ -0,0 +1,28 @@ + + +OffscreenCanvas test: 2d.imageData.get.length + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.get.length

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  getImageData() returns a correctly-sized Uint8ClampedArray

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.length.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.length.worker.js new file mode 100644 index 0000000000..74ed6015f0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.length.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.get.length +// Description:getImageData() returns a correctly-sized Uint8ClampedArray +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("getImageData() returns a correctly-sized Uint8ClampedArray"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var imgdata = ctx.getImageData(0, 0, 10, 10); + _assertSame(imgdata.data.length, imgdata.width*imgdata.height*4, "imgdata.data.length", "imgdata.width*imgdata.height*4"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonfinite.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonfinite.html new file mode 100644 index 0000000000..62cad61848 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonfinite.html @@ -0,0 +1,75 @@ + + +OffscreenCanvas test: 2d.imageData.get.nonfinite + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.get.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  getImageData() throws TypeError if arguments are not finite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in "Web IDL" (draft) + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonfinite.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonfinite.worker.js new file mode 100644 index 0000000000..98b4913a13 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonfinite.worker.js @@ -0,0 +1,70 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.get.nonfinite +// Description:getImageData() throws TypeError if arguments are not finite +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in "Web IDL" (draft) + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("getImageData() throws TypeError if arguments are not finite"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, 10, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.getImageData(-Infinity, 10, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.getImageData(NaN, 10, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.getImageData(10, Infinity, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.getImageData(10, -Infinity, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.getImageData(10, NaN, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, Infinity, 10); }); + assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, -Infinity, 10); }); + assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, NaN, 10); }); + assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, Infinity); }); + assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, -Infinity); }); + assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, NaN); }); + assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, Infinity, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, Infinity, Infinity, 10); }); + assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, Infinity, 10, Infinity); }); + assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, 10, Infinity, 10); }); + assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, 10, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, 10, 10, Infinity); }); + assert_throws_js(TypeError, function() { ctx.getImageData(10, Infinity, Infinity, 10); }); + assert_throws_js(TypeError, function() { ctx.getImageData(10, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.getImageData(10, Infinity, 10, Infinity); }); + assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, Infinity, Infinity); }); + var posinfobj = { valueOf: function() { return Infinity; } }, + neginfobj = { valueOf: function() { return -Infinity; } }, + nanobj = { valueOf: function() { return -Infinity; } }; + assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, 10, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.getImageData(neginfobj, 10, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.getImageData(nanobj, 10, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.getImageData(10, posinfobj, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.getImageData(10, neginfobj, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.getImageData(10, nanobj, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, posinfobj, 10); }); + assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, neginfobj, 10); }); + assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, nanobj, 10); }); + assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, posinfobj); }); + assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, neginfobj); }); + assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, nanobj); }); + assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, posinfobj, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, posinfobj, posinfobj, 10); }); + assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, posinfobj, posinfobj, posinfobj); }); + assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, posinfobj, 10, posinfobj); }); + assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, 10, posinfobj, 10); }); + assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, 10, posinfobj, posinfobj); }); + assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, 10, 10, posinfobj); }); + assert_throws_js(TypeError, function() { ctx.getImageData(10, posinfobj, posinfobj, 10); }); + assert_throws_js(TypeError, function() { ctx.getImageData(10, posinfobj, posinfobj, posinfobj); }); + assert_throws_js(TypeError, function() { ctx.getImageData(10, posinfobj, 10, posinfobj); }); + assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, posinfobj, posinfobj); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonpremul.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonpremul.html new file mode 100644 index 0000000000..3a97d9dc05 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonpremul.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.imageData.get.nonpremul + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.get.nonpremul

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  getImageData() returns non-premultiplied colors

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonpremul.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonpremul.worker.js new file mode 100644 index 0000000000..1a8da5efb0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonpremul.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.get.nonpremul +// Description:getImageData() returns non-premultiplied colors +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("getImageData() returns non-premultiplied colors"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(255, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + var imgdata = ctx.getImageData(10, 10, 10, 10); + _assert(imgdata.data[0] > 200, "imgdata.data[\""+(0)+"\"] > 200"); + _assert(imgdata.data[1] > 200, "imgdata.data[\""+(1)+"\"] > 200"); + _assert(imgdata.data[2] > 200, "imgdata.data[\""+(2)+"\"] > 200"); + _assert(imgdata.data[3] > 100, "imgdata.data[\""+(3)+"\"] > 100"); + _assert(imgdata.data[3] < 200, "imgdata.data[\""+(3)+"\"] < 200"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.alpha.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.alpha.html new file mode 100644 index 0000000000..04eb67902f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.alpha.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.imageData.get.order.alpha + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.get.order.alpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  getImageData() returns A in the fourth component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.alpha.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.alpha.worker.js new file mode 100644 index 0000000000..4338436a6d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.alpha.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.get.order.alpha +// Description:getImageData() returns A in the fourth component +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("getImageData() returns A in the fourth component"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 0, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + var imgdata = ctx.getImageData(0, 0, 10, 10); + _assert(imgdata.data[3] < 200, "imgdata.data[\""+(3)+"\"] < 200"); + _assert(imgdata.data[3] > 100, "imgdata.data[\""+(3)+"\"] > 100"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.cols.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.cols.html new file mode 100644 index 0000000000..f5b315c60a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.cols.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.imageData.get.order.cols + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.get.order.cols

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  getImageData() returns leftmost columns first

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.cols.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.cols.worker.js new file mode 100644 index 0000000000..6a070e2516 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.cols.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.get.order.cols +// Description:getImageData() returns leftmost columns first +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("getImageData() returns leftmost columns first"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#fff'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#000'; + ctx.fillRect(0, 0, 2, 50); + var imgdata = ctx.getImageData(0, 0, 10, 10); + _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0"); + _assertSame(imgdata.data[Math.round(imgdata.width/2*4)], 255, "imgdata.data[Math.round(imgdata.width/2*4)]", "255"); + _assertSame(imgdata.data[Math.round((imgdata.height/2)*imgdata.width*4)], 0, "imgdata.data[Math.round((imgdata.height/2)*imgdata.width*4)]", "0"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rgb.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rgb.html new file mode 100644 index 0000000000..661b437fb1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rgb.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.imageData.get.order.rgb + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.get.order.rgb

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  getImageData() returns R then G then B

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rgb.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rgb.worker.js new file mode 100644 index 0000000000..4e5974f9f8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rgb.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.get.order.rgb +// Description:getImageData() returns R then G then B +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("getImageData() returns R then G then B"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#48c'; + ctx.fillRect(0, 0, 100, 50); + var imgdata = ctx.getImageData(0, 0, 10, 10); + _assertSame(imgdata.data[0], 0x44, "imgdata.data[\""+(0)+"\"]", "0x44"); + _assertSame(imgdata.data[1], 0x88, "imgdata.data[\""+(1)+"\"]", "0x88"); + _assertSame(imgdata.data[2], 0xCC, "imgdata.data[\""+(2)+"\"]", "0xCC"); + _assertSame(imgdata.data[3], 255, "imgdata.data[\""+(3)+"\"]", "255"); + _assertSame(imgdata.data[4], 0x44, "imgdata.data[\""+(4)+"\"]", "0x44"); + _assertSame(imgdata.data[5], 0x88, "imgdata.data[\""+(5)+"\"]", "0x88"); + _assertSame(imgdata.data[6], 0xCC, "imgdata.data[\""+(6)+"\"]", "0xCC"); + _assertSame(imgdata.data[7], 255, "imgdata.data[\""+(7)+"\"]", "255"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rows.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rows.html new file mode 100644 index 0000000000..6d8ee2eba5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rows.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.imageData.get.order.rows + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.get.order.rows

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  getImageData() returns topmost rows first

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rows.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rows.worker.js new file mode 100644 index 0000000000..1d3226a503 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rows.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.get.order.rows +// Description:getImageData() returns topmost rows first +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("getImageData() returns topmost rows first"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#fff'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#000'; + ctx.fillRect(0, 0, 100, 2); + var imgdata = ctx.getImageData(0, 0, 10, 10); + _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0"); + _assertSame(imgdata.data[Math.floor(imgdata.width/2*4)], 0, "imgdata.data[Math.floor(imgdata.width/2*4)]", "0"); + _assertSame(imgdata.data[(imgdata.height/2)*imgdata.width*4], 255, "imgdata.data[(imgdata.height/2)*imgdata.width*4]", "255"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.range.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.range.html new file mode 100644 index 0000000000..8db1a42ca1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.range.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.imageData.get.range + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.get.range

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  getImageData() returns values in the range [0, 255]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.range.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.range.worker.js new file mode 100644 index 0000000000..2e962beeae --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.range.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.get.range +// Description:getImageData() returns values in the range [0, 255] +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("getImageData() returns values in the range [0, 255]"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#000'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#fff'; + ctx.fillRect(20, 10, 60, 10); + var imgdata1 = ctx.getImageData(10, 5, 1, 1); + _assertSame(imgdata1.data[0], 0, "imgdata1.data[\""+(0)+"\"]", "0"); + var imgdata2 = ctx.getImageData(30, 15, 1, 1); + _assertSame(imgdata2.data[0], 255, "imgdata2.data[\""+(0)+"\"]", "255"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.rounding.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.rounding.html new file mode 100644 index 0000000000..f939ba82df --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.rounding.html @@ -0,0 +1,45 @@ + + +OffscreenCanvas test: 2d.imageData.get.rounding + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.get.rounding

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Test the handling of non-integer source coordinates in getImageData().

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.rounding.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.rounding.worker.js new file mode 100644 index 0000000000..b2cd08ade2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.rounding.worker.js @@ -0,0 +1,40 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.get.rounding +// Description:Test the handling of non-integer source coordinates in getImageData(). +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Test the handling of non-integer source coordinates in getImageData()."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + function testDimensions(sx, sy, sw, sh, width, height) + { + imageData = ctx.getImageData(sx, sy, sw, sh); + _assert(imageData.width == width, "imageData.width == width"); + _assert(imageData.height == height, "imageData.height == height"); + } + + testDimensions(0, 0, 20, 10, 20, 10); + + testDimensions(.1, .2, 20, 10, 20, 10); + testDimensions(.9, .8, 20, 10, 20, 10); + + testDimensions(0, 0, 20.9, 10.9, 20, 10); + testDimensions(0, 0, 20.1, 10.1, 20, 10); + + testDimensions(-1, -1, 20, 10, 20, 10); + + testDimensions(-1.1, 0, 20, 10, 20, 10); + testDimensions(-1.9, 0, 20, 10, 20, 10); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.negative.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.negative.html new file mode 100644 index 0000000000..a4b9c7e41c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.negative.html @@ -0,0 +1,46 @@ + + +OffscreenCanvas test: 2d.imageData.get.source.negative + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.get.source.negative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  getImageData() works with negative width and height, and returns top-to-bottom left-to-right

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.negative.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.negative.worker.js new file mode 100644 index 0000000000..62929918ec --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.negative.worker.js @@ -0,0 +1,41 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.get.source.negative +// Description:getImageData() works with negative width and height, and returns top-to-bottom left-to-right +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("getImageData() works with negative width and height, and returns top-to-bottom left-to-right"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#000'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#fff'; + ctx.fillRect(20, 10, 60, 10); + + var imgdata1 = ctx.getImageData(85, 25, -10, -10); + _assertSame(imgdata1.data[0], 255, "imgdata1.data[\""+(0)+"\"]", "255"); + _assertSame(imgdata1.data[1], 255, "imgdata1.data[\""+(1)+"\"]", "255"); + _assertSame(imgdata1.data[2], 255, "imgdata1.data[\""+(2)+"\"]", "255"); + _assertSame(imgdata1.data[3], 255, "imgdata1.data[\""+(3)+"\"]", "255"); + _assertSame(imgdata1.data[imgdata1.data.length-4+0], 0, "imgdata1.data[imgdata1.data.length-4+0]", "0"); + _assertSame(imgdata1.data[imgdata1.data.length-4+1], 0, "imgdata1.data[imgdata1.data.length-4+1]", "0"); + _assertSame(imgdata1.data[imgdata1.data.length-4+2], 0, "imgdata1.data[imgdata1.data.length-4+2]", "0"); + _assertSame(imgdata1.data[imgdata1.data.length-4+3], 255, "imgdata1.data[imgdata1.data.length-4+3]", "255"); + + var imgdata2 = ctx.getImageData(0, 0, -1, -1); + _assertSame(imgdata2.data[0], 0, "imgdata2.data[\""+(0)+"\"]", "0"); + _assertSame(imgdata2.data[1], 0, "imgdata2.data[\""+(1)+"\"]", "0"); + _assertSame(imgdata2.data[2], 0, "imgdata2.data[\""+(2)+"\"]", "0"); + _assertSame(imgdata2.data[3], 0, "imgdata2.data[\""+(3)+"\"]", "0"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.outside.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.outside.html new file mode 100644 index 0000000000..ca11da80d5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.outside.html @@ -0,0 +1,86 @@ + + +OffscreenCanvas test: 2d.imageData.get.source.outside + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.get.source.outside

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  getImageData() returns transparent black outside the canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.outside.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.outside.worker.js new file mode 100644 index 0000000000..35fa83d668 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.outside.worker.js @@ -0,0 +1,81 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.get.source.outside +// Description:getImageData() returns transparent black outside the canvas +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("getImageData() returns transparent black outside the canvas"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#08f'; + ctx.fillRect(0, 0, 100, 50); + + var imgdata1 = ctx.getImageData(-10, 5, 1, 1); + _assertSame(imgdata1.data[0], 0, "imgdata1.data[\""+(0)+"\"]", "0"); + _assertSame(imgdata1.data[1], 0, "imgdata1.data[\""+(1)+"\"]", "0"); + _assertSame(imgdata1.data[2], 0, "imgdata1.data[\""+(2)+"\"]", "0"); + _assertSame(imgdata1.data[3], 0, "imgdata1.data[\""+(3)+"\"]", "0"); + + var imgdata2 = ctx.getImageData(10, -5, 1, 1); + _assertSame(imgdata2.data[0], 0, "imgdata2.data[\""+(0)+"\"]", "0"); + _assertSame(imgdata2.data[1], 0, "imgdata2.data[\""+(1)+"\"]", "0"); + _assertSame(imgdata2.data[2], 0, "imgdata2.data[\""+(2)+"\"]", "0"); + _assertSame(imgdata2.data[3], 0, "imgdata2.data[\""+(3)+"\"]", "0"); + + var imgdata3 = ctx.getImageData(200, 5, 1, 1); + _assertSame(imgdata3.data[0], 0, "imgdata3.data[\""+(0)+"\"]", "0"); + _assertSame(imgdata3.data[1], 0, "imgdata3.data[\""+(1)+"\"]", "0"); + _assertSame(imgdata3.data[2], 0, "imgdata3.data[\""+(2)+"\"]", "0"); + _assertSame(imgdata3.data[3], 0, "imgdata3.data[\""+(3)+"\"]", "0"); + + var imgdata4 = ctx.getImageData(10, 60, 1, 1); + _assertSame(imgdata4.data[0], 0, "imgdata4.data[\""+(0)+"\"]", "0"); + _assertSame(imgdata4.data[1], 0, "imgdata4.data[\""+(1)+"\"]", "0"); + _assertSame(imgdata4.data[2], 0, "imgdata4.data[\""+(2)+"\"]", "0"); + _assertSame(imgdata4.data[3], 0, "imgdata4.data[\""+(3)+"\"]", "0"); + + var imgdata5 = ctx.getImageData(100, 10, 1, 1); + _assertSame(imgdata5.data[0], 0, "imgdata5.data[\""+(0)+"\"]", "0"); + _assertSame(imgdata5.data[1], 0, "imgdata5.data[\""+(1)+"\"]", "0"); + _assertSame(imgdata5.data[2], 0, "imgdata5.data[\""+(2)+"\"]", "0"); + _assertSame(imgdata5.data[3], 0, "imgdata5.data[\""+(3)+"\"]", "0"); + + var imgdata6 = ctx.getImageData(0, 10, 1, 1); + _assertSame(imgdata6.data[0], 0, "imgdata6.data[\""+(0)+"\"]", "0"); + _assertSame(imgdata6.data[1], 136, "imgdata6.data[\""+(1)+"\"]", "136"); + _assertSame(imgdata6.data[2], 255, "imgdata6.data[\""+(2)+"\"]", "255"); + _assertSame(imgdata6.data[3], 255, "imgdata6.data[\""+(3)+"\"]", "255"); + + var imgdata7 = ctx.getImageData(-10, 10, 20, 20); + _assertSame(imgdata7.data[ 0*4+0], 0, "imgdata7.data[ 0*4+0]", "0"); + _assertSame(imgdata7.data[ 0*4+1], 0, "imgdata7.data[ 0*4+1]", "0"); + _assertSame(imgdata7.data[ 0*4+2], 0, "imgdata7.data[ 0*4+2]", "0"); + _assertSame(imgdata7.data[ 0*4+3], 0, "imgdata7.data[ 0*4+3]", "0"); + _assertSame(imgdata7.data[ 9*4+0], 0, "imgdata7.data[ 9*4+0]", "0"); + _assertSame(imgdata7.data[ 9*4+1], 0, "imgdata7.data[ 9*4+1]", "0"); + _assertSame(imgdata7.data[ 9*4+2], 0, "imgdata7.data[ 9*4+2]", "0"); + _assertSame(imgdata7.data[ 9*4+3], 0, "imgdata7.data[ 9*4+3]", "0"); + _assertSame(imgdata7.data[10*4+0], 0, "imgdata7.data[10*4+0]", "0"); + _assertSame(imgdata7.data[10*4+1], 136, "imgdata7.data[10*4+1]", "136"); + _assertSame(imgdata7.data[10*4+2], 255, "imgdata7.data[10*4+2]", "255"); + _assertSame(imgdata7.data[10*4+3], 255, "imgdata7.data[10*4+3]", "255"); + _assertSame(imgdata7.data[19*4+0], 0, "imgdata7.data[19*4+0]", "0"); + _assertSame(imgdata7.data[19*4+1], 136, "imgdata7.data[19*4+1]", "136"); + _assertSame(imgdata7.data[19*4+2], 255, "imgdata7.data[19*4+2]", "255"); + _assertSame(imgdata7.data[19*4+3], 255, "imgdata7.data[19*4+3]", "255"); + _assertSame(imgdata7.data[20*4+0], 0, "imgdata7.data[20*4+0]", "0"); + _assertSame(imgdata7.data[20*4+1], 0, "imgdata7.data[20*4+1]", "0"); + _assertSame(imgdata7.data[20*4+2], 0, "imgdata7.data[20*4+2]", "0"); + _assertSame(imgdata7.data[20*4+3], 0, "imgdata7.data[20*4+3]", "0"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.size.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.size.html new file mode 100644 index 0000000000..6cb848a718 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.size.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.imageData.get.source.size + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.get.source.size

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  getImageData() returns bigger ImageData for bigger source rectangle

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.size.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.size.worker.js new file mode 100644 index 0000000000..e54d75b97a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.size.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.get.source.size +// Description:getImageData() returns bigger ImageData for bigger source rectangle +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("getImageData() returns bigger ImageData for bigger source rectangle"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var imgdata1 = ctx.getImageData(0, 0, 10, 10); + var imgdata2 = ctx.getImageData(0, 0, 20, 20); + _assert(imgdata2.width > imgdata1.width, "imgdata2.width > imgdata1.width"); + _assert(imgdata2.height > imgdata1.height, "imgdata2.height > imgdata1.height"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.unaffected.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.unaffected.html new file mode 100644 index 0000000000..66a0b80fd7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.unaffected.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.imageData.get.unaffected + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.get.unaffected

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  getImageData() is not affected by context state

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.unaffected.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.unaffected.worker.js new file mode 100644 index 0000000000..8bf0dddb06 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.unaffected.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.get.unaffected +// Description:getImageData() is not affected by context state +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("getImageData() is not affected by context state"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50) + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50) + ctx.save(); + ctx.translate(50, 0); + ctx.globalAlpha = 0.1; + ctx.globalCompositeOperation = 'destination-atop'; + ctx.shadowColor = '#f00'; + ctx.rect(0, 0, 5, 5); + ctx.clip(); + var imgdata = ctx.getImageData(0, 0, 50, 50); + ctx.restore(); + ctx.putImageData(imgdata, 50, 0); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.zero.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.zero.html new file mode 100644 index 0000000000..042a8bc5f5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.zero.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.imageData.get.zero + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.get.zero

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  getImageData() throws INDEX_SIZE_ERR if size is zero

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.zero.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.zero.worker.js new file mode 100644 index 0000000000..ed31030d3c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.zero.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.get.zero +// Description:getImageData() throws INDEX_SIZE_ERR if size is zero +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("getImageData() throws INDEX_SIZE_ERR if size is zero"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 10, 0); }); + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 0, 10); }); + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 0, 0); }); + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 0.1, 10); }); + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 10, 0.99); }); + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, -0.1, 10); }); + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 10, -0.99); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.clamp.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.clamp.html new file mode 100644 index 0000000000..aa6073eedf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.clamp.html @@ -0,0 +1,55 @@ + + +OffscreenCanvas test: 2d.imageData.object.clamp + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.object.clamp

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ImageData.data clamps numbers to [0, 255]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.clamp.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.clamp.worker.js new file mode 100644 index 0000000000..260198fe2f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.clamp.worker.js @@ -0,0 +1,50 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.object.clamp +// Description:ImageData.data clamps numbers to [0, 255] +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("ImageData.data clamps numbers to [0, 255]"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var imgdata = ctx.getImageData(0, 0, 10, 10); + + imgdata.data[0] = 100; + imgdata.data[0] = 300; + _assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255"); + imgdata.data[0] = 100; + imgdata.data[0] = -100; + _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0"); + + imgdata.data[0] = 100; + imgdata.data[0] = 200+Math.pow(2, 32); + _assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255"); + imgdata.data[0] = 100; + imgdata.data[0] = -200-Math.pow(2, 32); + _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0"); + + imgdata.data[0] = 100; + imgdata.data[0] = Math.pow(10, 39); + _assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255"); + imgdata.data[0] = 100; + imgdata.data[0] = -Math.pow(10, 39); + _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0"); + + imgdata.data[0] = 100; + imgdata.data[0] = -Infinity; + _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0"); + imgdata.data[0] = 100; + imgdata.data[0] = Infinity; + _assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.nan.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.nan.html new file mode 100644 index 0000000000..af692a7f9f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.nan.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.imageData.object.nan + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.object.nan

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ImageData.data converts NaN to 0

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.nan.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.nan.worker.js new file mode 100644 index 0000000000..4ebfedb1e8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.nan.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.object.nan +// Description:ImageData.data converts NaN to 0 +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("ImageData.data converts NaN to 0"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var imgdata = ctx.getImageData(0, 0, 10, 10); + imgdata.data[0] = 100; + imgdata.data[0] = NaN; + _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0"); + imgdata.data[0] = 100; + imgdata.data[0] = "cheese"; + _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.properties.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.properties.html new file mode 100644 index 0000000000..68a6f63868 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.properties.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.imageData.object.properties + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.object.properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ImageData objects have the right properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.properties.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.properties.worker.js new file mode 100644 index 0000000000..e428e0d4fc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.properties.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.object.properties +// Description:ImageData objects have the right properties +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("ImageData objects have the right properties"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var imgdata = ctx.getImageData(0, 0, 10, 10); + _assertSame(typeof(imgdata.width), 'number', "typeof(imgdata.width)", "'number'"); + _assertSame(typeof(imgdata.height), 'number', "typeof(imgdata.height)", "'number'"); + _assertSame(typeof(imgdata.data), 'object', "typeof(imgdata.data)", "'object'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.readonly.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.readonly.html new file mode 100644 index 0000000000..2ab5f47f64 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.readonly.html @@ -0,0 +1,40 @@ + + +OffscreenCanvas test: 2d.imageData.object.readonly + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.object.readonly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ImageData objects properties are read-only

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.readonly.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.readonly.worker.js new file mode 100644 index 0000000000..d02f0f319a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.readonly.worker.js @@ -0,0 +1,35 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.object.readonly +// Description:ImageData objects properties are read-only +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("ImageData objects properties are read-only"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var imgdata = ctx.getImageData(0, 0, 10, 10); + var w = imgdata.width; + var h = imgdata.height; + var d = imgdata.data; + imgdata.width = 123; + imgdata.height = 123; + imgdata.data = [100,100,100,100]; + _assertSame(imgdata.width, w, "imgdata.width", "w"); + _assertSame(imgdata.height, h, "imgdata.height", "h"); + _assertSame(imgdata.data, d, "imgdata.data", "d"); + _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0"); + _assertSame(imgdata.data[1], 0, "imgdata.data[\""+(1)+"\"]", "0"); + _assertSame(imgdata.data[2], 0, "imgdata.data[\""+(2)+"\"]", "0"); + _assertSame(imgdata.data[3], 0, "imgdata.data[\""+(3)+"\"]", "0"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.round.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.round.html new file mode 100644 index 0000000000..fbde0cd940 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.round.html @@ -0,0 +1,55 @@ + + +OffscreenCanvas test: 2d.imageData.object.round + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.object.round

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ImageData.data rounds numbers with round-to-zero

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.round.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.round.worker.js new file mode 100644 index 0000000000..8ef3c02793 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.round.worker.js @@ -0,0 +1,50 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.object.round +// Description:ImageData.data rounds numbers with round-to-zero +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("ImageData.data rounds numbers with round-to-zero"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var imgdata = ctx.getImageData(0, 0, 10, 10); + imgdata.data[0] = 0.499; + _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0"); + imgdata.data[0] = 0.5; + _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0"); + imgdata.data[0] = 0.501; + _assertSame(imgdata.data[0], 1, "imgdata.data[\""+(0)+"\"]", "1"); + imgdata.data[0] = 1.499; + _assertSame(imgdata.data[0], 1, "imgdata.data[\""+(0)+"\"]", "1"); + imgdata.data[0] = 1.5; + _assertSame(imgdata.data[0], 2, "imgdata.data[\""+(0)+"\"]", "2"); + imgdata.data[0] = 1.501; + _assertSame(imgdata.data[0], 2, "imgdata.data[\""+(0)+"\"]", "2"); + imgdata.data[0] = 2.5; + _assertSame(imgdata.data[0], 2, "imgdata.data[\""+(0)+"\"]", "2"); + imgdata.data[0] = 3.5; + _assertSame(imgdata.data[0], 4, "imgdata.data[\""+(0)+"\"]", "4"); + imgdata.data[0] = 252.5; + _assertSame(imgdata.data[0], 252, "imgdata.data[\""+(0)+"\"]", "252"); + imgdata.data[0] = 253.5; + _assertSame(imgdata.data[0], 254, "imgdata.data[\""+(0)+"\"]", "254"); + imgdata.data[0] = 254.5; + _assertSame(imgdata.data[0], 254, "imgdata.data[\""+(0)+"\"]", "254"); + imgdata.data[0] = 256.5; + _assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255"); + imgdata.data[0] = -0.5; + _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0"); + imgdata.data[0] = -1.5; + _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.set.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.set.html new file mode 100644 index 0000000000..27ed5a3504 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.set.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.imageData.object.set + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.object.set

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ImageData.data can be modified

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.set.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.set.worker.js new file mode 100644 index 0000000000..f9b755f7e2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.set.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.object.set +// Description:ImageData.data can be modified +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("ImageData.data can be modified"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var imgdata = ctx.getImageData(0, 0, 10, 10); + imgdata.data[0] = 100; + _assertSame(imgdata.data[0], 100, "imgdata.data[\""+(0)+"\"]", "100"); + imgdata.data[0] = 200; + _assertSame(imgdata.data[0], 200, "imgdata.data[\""+(0)+"\"]", "200"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.string.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.string.html new file mode 100644 index 0000000000..a437c475a5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.string.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.imageData.object.string + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.object.string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ImageData.data converts strings to numbers with ToNumber

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.string.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.string.worker.js new file mode 100644 index 0000000000..84cff6a48c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.string.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.object.string +// Description:ImageData.data converts strings to numbers with ToNumber +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("ImageData.data converts strings to numbers with ToNumber"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var imgdata = ctx.getImageData(0, 0, 10, 10); + imgdata.data[0] = 100; + imgdata.data[0] = "110"; + _assertSame(imgdata.data[0], 110, "imgdata.data[\""+(0)+"\"]", "110"); + imgdata.data[0] = 100; + imgdata.data[0] = "0x78"; + _assertSame(imgdata.data[0], 120, "imgdata.data[\""+(0)+"\"]", "120"); + imgdata.data[0] = 100; + imgdata.data[0] = " +130e0 "; + _assertSame(imgdata.data[0], 130, "imgdata.data[\""+(0)+"\"]", "130"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.undefined.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.undefined.html new file mode 100644 index 0000000000..81462339e9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.undefined.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.imageData.object.undefined + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.object.undefined

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ImageData.data converts undefined to 0

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.undefined.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.undefined.worker.js new file mode 100644 index 0000000000..825f8c102f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.undefined.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.object.undefined +// Description:ImageData.data converts undefined to 0 +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("ImageData.data converts undefined to 0"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var imgdata = ctx.getImageData(0, 0, 10, 10); + imgdata.data[0] = 100; + imgdata.data[0] = undefined; + _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.alpha.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.alpha.html new file mode 100644 index 0000000000..dcd2d92ab1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.alpha.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.imageData.put.alpha + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.put.alpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  putImageData() puts non-solid image data correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.alpha.png b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.alpha.png new file mode 100644 index 0000000000..5428c65524 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.alpha.png differ diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.alpha.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.alpha.worker.js new file mode 100644 index 0000000000..25d8047189 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.alpha.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.put.alpha +// Description:putImageData() puts non-solid image data correctly +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("putImageData() puts non-solid image data correctly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = 'rgba(0, 255, 0, 0.25)'; + ctx.fillRect(0, 0, 100, 50) + var imgdata = ctx.getImageData(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50) + ctx.putImageData(imgdata, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,255,0,64, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.basic.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.basic.html new file mode 100644 index 0000000000..257e0330d5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.basic.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.imageData.put.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.put.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  putImageData() puts image data from getImageData() onto the canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.basic.worker.js new file mode 100644 index 0000000000..6a68ffa792 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.basic.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.put.basic +// Description:putImageData() puts image data from getImageData() onto the canvas +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("putImageData() puts image data from getImageData() onto the canvas"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50) + var imgdata = ctx.getImageData(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50) + ctx.putImageData(imgdata, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.clip.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.clip.html new file mode 100644 index 0000000000..648ded588c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.clip.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.imageData.put.clip + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.put.clip

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  putImageData() is not affected by clipping regions

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.clip.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.clip.worker.js new file mode 100644 index 0000000000..b665edbb33 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.clip.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.put.clip +// Description:putImageData() is not affected by clipping regions +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("putImageData() is not affected by clipping regions"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50) + var imgdata = ctx.getImageData(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50) + ctx.beginPath(); + ctx.rect(0, 0, 50, 50); + ctx.clip(); + ctx.putImageData(imgdata, 0, 0); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.created.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.created.html new file mode 100644 index 0000000000..08f35117dd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.created.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.imageData.put.created + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.put.created

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  putImageData() puts image data from createImageData() onto the canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.created.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.created.worker.js new file mode 100644 index 0000000000..f249efb4bb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.created.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.put.created +// Description:putImageData() puts image data from createImageData() onto the canvas +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("putImageData() puts image data from createImageData() onto the canvas"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var imgdata = ctx.createImageData(100, 50); + for (var i = 0; i < imgdata.data.length; i += 4) { + imgdata.data[i] = 0; + imgdata.data[i+1] = 255; + imgdata.data[i+2] = 0; + imgdata.data[i+3] = 255; + } + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50) + ctx.putImageData(imgdata, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.cross.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.cross.html new file mode 100644 index 0000000000..cddd0451a4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.cross.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.imageData.put.cross + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.put.cross

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  putImageData() accepts image data got from a different canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.cross.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.cross.worker.js new file mode 100644 index 0000000000..0ec4ed142f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.cross.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.put.cross +// Description:putImageData() accepts image data got from a different canvas +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("putImageData() accepts image data got from a different canvas"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var ctx2 = offscreenCanvas2.getContext('2d'); + ctx2.fillStyle = '#0f0'; + ctx2.fillRect(0, 0, 100, 50) + var imgdata = ctx2.getImageData(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50) + ctx.putImageData(imgdata, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.negative.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.negative.html new file mode 100644 index 0000000000..cea4d0d477 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.negative.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.imageData.put.dirty.negative + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.put.dirty.negative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  putImageData() handles negative-sized dirty rectangles correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.negative.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.negative.worker.js new file mode 100644 index 0000000000..0a7af64049 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.negative.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.put.dirty.negative +// Description:putImageData() handles negative-sized dirty rectangles correctly +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("putImageData() handles negative-sized dirty rectangles correctly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50) + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 20, 20) + + var imgdata = ctx.getImageData(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50) + ctx.fillStyle = '#f00'; + ctx.fillRect(40, 20, 20, 20) + ctx.putImageData(imgdata, 40, 20, 20, 20, -20, -20); + + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 35,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 65,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 50,15, 0,255,0,255, 2); + _assertPixelApprox(canvas, 50,45, 0,255,0,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.outside.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.outside.html new file mode 100644 index 0000000000..7b67ef2253 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.outside.html @@ -0,0 +1,46 @@ + + +OffscreenCanvas test: 2d.imageData.put.dirty.outside + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.put.dirty.outside

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  putImageData() handles dirty rectangles outside the canvas correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.outside.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.outside.worker.js new file mode 100644 index 0000000000..87b88a09f4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.outside.worker.js @@ -0,0 +1,41 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.put.dirty.outside +// Description:putImageData() handles dirty rectangles outside the canvas correctly +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("putImageData() handles dirty rectangles outside the canvas correctly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50) + + var imgdata = ctx.getImageData(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50) + + ctx.putImageData(imgdata, 100, 20, 20, 20, -20, -20); + ctx.putImageData(imgdata, 200, 200, 0, 0, 100, 50); + ctx.putImageData(imgdata, 40, 20, -30, -20, 30, 20); + ctx.putImageData(imgdata, -30, 20, 0, 0, 30, 20); + + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 98,15, 0,255,0,255, 2); + _assertPixelApprox(canvas, 98,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 98,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 1,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 1,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 1,45, 0,255,0,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect1.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect1.html new file mode 100644 index 0000000000..9f571427a8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect1.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.imageData.put.dirty.rect1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.put.dirty.rect1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  putImageData() only modifies areas inside the dirty rectangle, using width and height

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect1.worker.js new file mode 100644 index 0000000000..6feea9556d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect1.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.put.dirty.rect1 +// Description:putImageData() only modifies areas inside the dirty rectangle, using width and height +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("putImageData() only modifies areas inside the dirty rectangle, using width and height"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50) + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 20, 20) + + var imgdata = ctx.getImageData(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50) + ctx.fillStyle = '#f00'; + ctx.fillRect(40, 20, 20, 20) + ctx.putImageData(imgdata, 40, 20, 0, 0, 20, 20); + + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 35,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 65,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 50,15, 0,255,0,255, 2); + _assertPixelApprox(canvas, 50,45, 0,255,0,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect2.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect2.html new file mode 100644 index 0000000000..997c1136a1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect2.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.imageData.put.dirty.rect2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.put.dirty.rect2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  putImageData() only modifies areas inside the dirty rectangle, using x and y

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect2.worker.js new file mode 100644 index 0000000000..752a3cdf1e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect2.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.put.dirty.rect2 +// Description:putImageData() only modifies areas inside the dirty rectangle, using x and y +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("putImageData() only modifies areas inside the dirty rectangle, using x and y"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50) + ctx.fillStyle = '#0f0'; + ctx.fillRect(60, 30, 20, 20) + + var imgdata = ctx.getImageData(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50) + ctx.fillStyle = '#f00'; + ctx.fillRect(40, 20, 20, 20) + ctx.putImageData(imgdata, -20, -10, 60, 30, 20, 20); + + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 35,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 65,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 50,15, 0,255,0,255, 2); + _assertPixelApprox(canvas, 50,45, 0,255,0,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.zero.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.zero.html new file mode 100644 index 0000000000..fb90a017e1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.zero.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.imageData.put.dirty.zero + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.put.dirty.zero

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  putImageData() with zero-sized dirty rectangle puts nothing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.zero.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.zero.worker.js new file mode 100644 index 0000000000..2fa474c07f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.zero.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.put.dirty.zero +// Description:putImageData() with zero-sized dirty rectangle puts nothing +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("putImageData() with zero-sized dirty rectangle puts nothing"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50) + var imgdata = ctx.getImageData(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50) + ctx.putImageData(imgdata, 0, 0, 0, 0, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.modified.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.modified.html new file mode 100644 index 0000000000..337701aaf5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.modified.html @@ -0,0 +1,38 @@ + + +OffscreenCanvas test: 2d.imageData.put.modified + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.put.modified

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  putImageData() puts modified image data correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.modified.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.modified.worker.js new file mode 100644 index 0000000000..846a9dbc2d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.modified.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.put.modified +// Description:putImageData() puts modified image data correctly +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("putImageData() puts modified image data correctly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50) + ctx.fillStyle = '#f00'; + ctx.fillRect(45, 20, 10, 10) + var imgdata = ctx.getImageData(45, 20, 10, 10); + for (var i = 0, len = imgdata.width*imgdata.height*4; i < len; i += 4) + { + imgdata.data[i] = 0; + imgdata.data[i+1] = 255; + } + ctx.putImageData(imgdata, 45, 20); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.nonfinite.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.nonfinite.html new file mode 100644 index 0000000000..eb61d38e9e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.nonfinite.html @@ -0,0 +1,109 @@ + + +OffscreenCanvas test: 2d.imageData.put.nonfinite + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.put.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  putImageData() throws TypeError if arguments are not finite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in "Web IDL" (draft) + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.nonfinite.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.nonfinite.worker.js new file mode 100644 index 0000000000..479ad69467 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.nonfinite.worker.js @@ -0,0 +1,104 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.put.nonfinite +// Description:putImageData() throws TypeError if arguments are not finite +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in "Web IDL" (draft) + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("putImageData() throws TypeError if arguments are not finite"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var imgdata = ctx.getImageData(0, 0, 10, 10); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, -Infinity, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, NaN, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, -Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, NaN); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, 10, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, -Infinity, 10, 10, 10, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, NaN, 10, 10, 10, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, 10, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, -Infinity, 10, 10, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, NaN, 10, 10, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, 10, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, -Infinity, 10, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, NaN, 10, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, Infinity, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, -Infinity, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, NaN, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, Infinity, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, -Infinity, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, NaN, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, 10, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, 10, -Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, 10, NaN); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, Infinity, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, 10, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, Infinity, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, 10, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, Infinity, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, 10, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, Infinity, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, 10, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, Infinity, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, 10, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, Infinity, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, 10, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, Infinity, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, 10, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, 10, Infinity, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, 10, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, 10, 10, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, Infinity, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, 10, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, Infinity, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, 10, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, Infinity, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, 10, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, 10, Infinity, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, 10, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, 10, 10, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, 10, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, Infinity, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, 10, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, 10, Infinity, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, 10, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, 10, 10, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, Infinity, Infinity, 10); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, Infinity, 10, Infinity); }); + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, Infinity, Infinity); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.null.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.null.html new file mode 100644 index 0000000000..89fe06686d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.null.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.imageData.put.null + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.put.null

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  putImageData() with null imagedata throws TypeError

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.null.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.null.worker.js new file mode 100644 index 0000000000..2f021b638e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.null.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.put.null +// Description:putImageData() with null imagedata throws TypeError +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("putImageData() with null imagedata throws TypeError"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + assert_throws_js(TypeError, function() { ctx.putImageData(null, 0, 0); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.path.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.path.html new file mode 100644 index 0000000000..6c32376006 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.path.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.imageData.put.path + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.put.path

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  putImageData() does not affect the current path

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.path.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.path.worker.js new file mode 100644 index 0000000000..66781a922d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.path.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.put.path +// Description:putImageData() does not affect the current path +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("putImageData() does not affect the current path"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50) + ctx.rect(0, 0, 100, 50); + var imgdata = ctx.getImageData(0, 0, 100, 50); + ctx.putImageData(imgdata, 0, 0); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unaffected.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unaffected.html new file mode 100644 index 0000000000..3d3e99b135 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unaffected.html @@ -0,0 +1,39 @@ + + +OffscreenCanvas test: 2d.imageData.put.unaffected + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.put.unaffected

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  putImageData() is not affected by context state

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unaffected.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unaffected.worker.js new file mode 100644 index 0000000000..75adb865ef --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unaffected.worker.js @@ -0,0 +1,34 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.put.unaffected +// Description:putImageData() is not affected by context state +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("putImageData() is not affected by context state"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50) + var imgdata = ctx.getImageData(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50) + ctx.globalAlpha = 0.1; + ctx.globalCompositeOperation = 'destination-atop'; + ctx.shadowColor = '#f00'; + ctx.shadowBlur = 1; + ctx.translate(100, 50); + ctx.scale(0.1, 0.1); + ctx.putImageData(imgdata, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unchanged.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unchanged.html new file mode 100644 index 0000000000..d78fa4e035 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unchanged.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.imageData.put.unchanged + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.put.unchanged

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  putImageData(getImageData(...), ...) has no effect

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unchanged.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unchanged.worker.js new file mode 100644 index 0000000000..5e9362fab2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unchanged.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.put.unchanged +// Description:putImageData(getImageData(...), ...) has no effect +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("putImageData(getImageData(...), ...) has no effect"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var i = 0; + for (var y = 0; y < 16; ++y) { + for (var x = 0; x < 16; ++x, ++i) { + ctx.fillStyle = 'rgba(' + i + ',' + (Math.floor(i*1.5) % 256) + ',' + (Math.floor(i*23.3) % 256) + ',' + (i/256) + ')'; + ctx.fillRect(x, y, 1, 1); + } + } + var imgdata1 = ctx.getImageData(0.1, 0.2, 15.8, 15.9); + var olddata = []; + for (var i = 0; i < imgdata1.data.length; ++i) + olddata[i] = imgdata1.data[i]; + + ctx.putImageData(imgdata1, 0.1, 0.2); + + var imgdata2 = ctx.getImageData(0.1, 0.2, 15.8, 15.9); + for (var i = 0; i < imgdata2.data.length; ++i) { + _assertSame(olddata[i], imgdata2.data[i], "olddata[\""+(i)+"\"]", "imgdata2.data[\""+(i)+"\"]"); + } + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.wrongtype.html b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.wrongtype.html new file mode 100644 index 0000000000..1488e7b111 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.wrongtype.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.imageData.put.wrongtype + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.imageData.put.wrongtype

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  putImageData() does not accept non-ImageData objects

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.wrongtype.worker.js b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.wrongtype.worker.js new file mode 100644 index 0000000000..bf4d6dfedf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.wrongtype.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.imageData.put.wrongtype +// Description:putImageData() does not accept non-ImageData objects +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("putImageData() does not accept non-ImageData objects"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var imgdata = { width: 1, height: 1, data: [255, 0, 0, 255] }; + assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 0, 0); }); + assert_throws_js(TypeError, function() { ctx.putImageData("cheese", 0, 0); }); + assert_throws_js(TypeError, function() { ctx.putImageData(42, 0, 0); }); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.basic.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.basic.html new file mode 100644 index 0000000000..7396ca120a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.basic.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.reset.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  reset clears to transparent black

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.basic.worker.js new file mode 100644 index 0000000000..180bffbfac --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.basic.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.basic +// Description:reset clears to transparent black +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("reset clears to transparent black"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height); + ctx.reset(); + _assertPixel(canvas, 0,0, 0,0,0,0); + _assertPixel(canvas, 50,25, 0,0,0,0); + _assertPixel(canvas, 25,50, 0,0,0,0); + _assertPixel(canvas, 100,50, 0,0,0,0); + _assertPixel(canvas, 0,50, 0,0,0,0); + _assertPixel(canvas, 100,0, 0,0,0,0); + t.done(); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.drop_shadow-expected.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.drop_shadow-expected.html new file mode 100644 index 0000000000..182f7e40cd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.drop_shadow-expected.html @@ -0,0 +1,14 @@ + + +Canvas test: 2d.reset.render.drop_shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.drop_shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that drop shadows are correctly rendered after reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.drop_shadow.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.drop_shadow.html new file mode 100644 index 0000000000..e6decd1687 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.drop_shadow.html @@ -0,0 +1,25 @@ + + + +Canvas test: 2d.reset.render.drop_shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.drop_shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that drop shadows are correctly rendered after reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.drop_shadow.w.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.drop_shadow.w.html new file mode 100644 index 0000000000..0ceba2f91d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.drop_shadow.w.html @@ -0,0 +1,39 @@ + + + + +Canvas test: 2d.reset.render.drop_shadow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.drop_shadow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that drop shadows are correctly rendered after reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.global_composite_operation-expected.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.global_composite_operation-expected.html new file mode 100644 index 0000000000..1f9d247634 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.global_composite_operation-expected.html @@ -0,0 +1,15 @@ + + +Canvas test: 2d.reset.render.global_composite_operation +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.global_composite_operation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that canvas correctly renders rectangles with the default global composite operation after reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.global_composite_operation.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.global_composite_operation.html new file mode 100644 index 0000000000..4ddcc8d8f0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.global_composite_operation.html @@ -0,0 +1,23 @@ + + + +Canvas test: 2d.reset.render.global_composite_operation +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.global_composite_operation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that canvas correctly renders rectangles with the default global composite operation after reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.global_composite_operation.w.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.global_composite_operation.w.html new file mode 100644 index 0000000000..6df07a47e2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.global_composite_operation.w.html @@ -0,0 +1,37 @@ + + + + +Canvas test: 2d.reset.render.global_composite_operation +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.global_composite_operation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that canvas correctly renders rectangles with the default global composite operation after reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.line-expected.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.line-expected.html new file mode 100644 index 0000000000..dcd648d8c3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.line-expected.html @@ -0,0 +1,19 @@ + + +Canvas test: 2d.reset.render.line +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.line

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that lines are correctly rendered after reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.line.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.line.html new file mode 100644 index 0000000000..0e478cbf9d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.line.html @@ -0,0 +1,31 @@ + + + +Canvas test: 2d.reset.render.line +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.line

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that lines are correctly rendered after reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.line.w.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.line.w.html new file mode 100644 index 0000000000..e85f155b32 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.line.w.html @@ -0,0 +1,45 @@ + + + + +Canvas test: 2d.reset.render.line +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.line

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that lines are correctly rendered after reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.misc-expected.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.misc-expected.html new file mode 100644 index 0000000000..c359e6b42e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.misc-expected.html @@ -0,0 +1,15 @@ + + +Canvas test: 2d.reset.render.misc +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.misc

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that canvas correctly renders rectangles after reset (states not covered by other tests)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.misc.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.misc.html new file mode 100644 index 0000000000..b471327d98 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.misc.html @@ -0,0 +1,26 @@ + + + +Canvas test: 2d.reset.render.misc +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.misc

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that canvas correctly renders rectangles after reset (states not covered by other tests)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.misc.w.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.misc.w.html new file mode 100644 index 0000000000..eef646df66 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.misc.w.html @@ -0,0 +1,40 @@ + + + + +Canvas test: 2d.reset.render.misc +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.misc

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that canvas correctly renders rectangles after reset (states not covered by other tests)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.miter_limit-expected.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.miter_limit-expected.html new file mode 100644 index 0000000000..c91f485c53 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.miter_limit-expected.html @@ -0,0 +1,22 @@ + + +Canvas test: 2d.reset.render.miter_limit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.miter_limit

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the lines are correctly rendered with the default miter limit after reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.miter_limit.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.miter_limit.html new file mode 100644 index 0000000000..c00284bbc2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.miter_limit.html @@ -0,0 +1,30 @@ + + + +Canvas test: 2d.reset.render.miter_limit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.miter_limit

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the lines are correctly rendered with the default miter limit after reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.miter_limit.w.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.miter_limit.w.html new file mode 100644 index 0000000000..1f98606b55 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.miter_limit.w.html @@ -0,0 +1,44 @@ + + + + +Canvas test: 2d.reset.render.miter_limit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.miter_limit

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the lines are correctly rendered with the default miter limit after reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.text-expected.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.text-expected.html new file mode 100644 index 0000000000..7221483b02 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.text-expected.html @@ -0,0 +1,14 @@ + + +Canvas test: 2d.reset.render.text +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.text

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that text is correctly rendered after reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.text.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.text.html new file mode 100644 index 0000000000..31e35db71c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.text.html @@ -0,0 +1,31 @@ + + + +Canvas test: 2d.reset.render.text +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.text

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that text is correctly rendered after reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.text.w.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.text.w.html new file mode 100644 index 0000000000..6ddfd9fd9d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.render.text.w.html @@ -0,0 +1,45 @@ + + + + +Canvas test: 2d.reset.render.text +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.render.text

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that text is correctly rendered after reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.clip-expected.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.clip-expected.html new file mode 100644 index 0000000000..974b37fab4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.clip-expected.html @@ -0,0 +1,14 @@ + + +Canvas test: 2d.reset.state.clip +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.clip

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the clip is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.clip.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.clip.html new file mode 100644 index 0000000000..2f53da7a49 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.clip.html @@ -0,0 +1,26 @@ + + + +Canvas test: 2d.reset.state.clip +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.clip

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the clip is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.clip.w.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.clip.w.html new file mode 100644 index 0000000000..ec4bdf5b23 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.clip.w.html @@ -0,0 +1,40 @@ + + + + +Canvas test: 2d.reset.state.clip +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.clip

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the clip is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.direction.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.direction.html new file mode 100644 index 0000000000..f2dc299e97 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.direction.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.reset.state.direction + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.direction

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.direction.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.direction.worker.js new file mode 100644 index 0000000000..3d6b835050 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.direction.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.state.direction +// Description:check that the state is reset +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("check that the state is reset"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const default_value = ctx.direction; + + ctx.direction = 'rtl'; + _assert(ctx.direction == 'rtl', "ctx.direction == 'rtl'"); + + ctx.reset(); + _assert(ctx.direction == default_value, "ctx.direction == default_value"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.fill_style.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.fill_style.html new file mode 100644 index 0000000000..1fdd2b773a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.fill_style.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.reset.state.fill_style + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.fill_style

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.fill_style.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.fill_style.worker.js new file mode 100644 index 0000000000..c574824b0a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.fill_style.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.state.fill_style +// Description:check that the state is reset +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("check that the state is reset"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const default_value = ctx.fillStyle; + + ctx.fillStyle = '#ffffff'; + _assert(ctx.fillStyle == '#ffffff', "ctx.fillStyle == '#ffffff'"); + + ctx.reset(); + _assert(ctx.fillStyle == default_value, "ctx.fillStyle == default_value"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.filter.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.filter.html new file mode 100644 index 0000000000..af898c7dd1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.filter.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.reset.state.filter + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.filter

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.filter.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.filter.worker.js new file mode 100644 index 0000000000..f781a9fa34 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.filter.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.state.filter +// Description:check that the state is reset +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("check that the state is reset"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const default_value = ctx.filter; + + ctx.filter = 'blur(10px)'; + _assert(ctx.filter == 'blur(10px)', "ctx.filter == 'blur(10px)'"); + + ctx.reset(); + _assert(ctx.filter == default_value, "ctx.filter == default_value"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font.html new file mode 100644 index 0000000000..69bbf3261e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.reset.state.font + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.font

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font.worker.js new file mode 100644 index 0000000000..ea6f4cc184 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.state.font +// Description:check that the state is reset +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("check that the state is reset"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const default_value = ctx.font; + + ctx.font = '16px sans-serif'; + _assert(ctx.font == '16px sans-serif', "ctx.font == '16px sans-serif'"); + + ctx.reset(); + _assert(ctx.font == default_value, "ctx.font == default_value"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font_kerning.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font_kerning.html new file mode 100644 index 0000000000..27954486c0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font_kerning.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.reset.state.font_kerning + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.font_kerning

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font_kerning.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font_kerning.worker.js new file mode 100644 index 0000000000..1c21249b9c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font_kerning.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.state.font_kerning +// Description:check that the state is reset +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("check that the state is reset"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const default_value = ctx.fontKerning; + + ctx.fontKerning = 'normal'; + _assert(ctx.fontKerning == 'normal', "ctx.fontKerning == 'normal'"); + + ctx.reset(); + _assert(ctx.fontKerning == default_value, "ctx.fontKerning == default_value"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font_stretch.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font_stretch.html new file mode 100644 index 0000000000..b1e2217320 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font_stretch.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.reset.state.font_stretch + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.font_stretch

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font_stretch.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font_stretch.worker.js new file mode 100644 index 0000000000..71bb6aff48 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font_stretch.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.state.font_stretch +// Description:check that the state is reset +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("check that the state is reset"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const default_value = ctx.fontStretch; + + ctx.fontStretch = 'ultra-condensed'; + _assert(ctx.fontStretch == 'ultra-condensed', "ctx.fontStretch == 'ultra-condensed'"); + + ctx.reset(); + _assert(ctx.fontStretch == default_value, "ctx.fontStretch == default_value"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font_variant_caps.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font_variant_caps.html new file mode 100644 index 0000000000..7d0518c021 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font_variant_caps.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.reset.state.font_variant_caps + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.font_variant_caps

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font_variant_caps.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font_variant_caps.worker.js new file mode 100644 index 0000000000..e89a8bda42 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.font_variant_caps.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.state.font_variant_caps +// Description:check that the state is reset +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("check that the state is reset"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const default_value = ctx.fontVariantCaps; + + ctx.fontVariantCaps = 'unicase'; + _assert(ctx.fontVariantCaps == 'unicase', "ctx.fontVariantCaps == 'unicase'"); + + ctx.reset(); + _assert(ctx.fontVariantCaps == default_value, "ctx.fontVariantCaps == default_value"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.global_alpha.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.global_alpha.html new file mode 100644 index 0000000000..fe87aedf84 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.global_alpha.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.reset.state.global_alpha + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.global_alpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.global_alpha.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.global_alpha.worker.js new file mode 100644 index 0000000000..518a8cbb46 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.global_alpha.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.state.global_alpha +// Description:check that the state is reset +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("check that the state is reset"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const default_value = ctx.globalAlpha; + + ctx.globalAlpha = 0.5; + _assert(ctx.globalAlpha == 0.5, "ctx.globalAlpha == 0.5"); + + ctx.reset(); + _assert(ctx.globalAlpha == default_value, "ctx.globalAlpha == default_value"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.global_composite_operation.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.global_composite_operation.html new file mode 100644 index 0000000000..647349c94a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.global_composite_operation.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.reset.state.global_composite_operation + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.global_composite_operation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.global_composite_operation.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.global_composite_operation.worker.js new file mode 100644 index 0000000000..c94f15b232 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.global_composite_operation.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.state.global_composite_operation +// Description:check that the state is reset +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("check that the state is reset"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const default_value = ctx.globalCompositeOperation; + + ctx.globalCompositeOperation = 'destination-over'; + _assert(ctx.globalCompositeOperation == 'destination-over', "ctx.globalCompositeOperation == 'destination-over'"); + + ctx.reset(); + _assert(ctx.globalCompositeOperation == default_value, "ctx.globalCompositeOperation == default_value"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.image_smoothing_enabled.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.image_smoothing_enabled.html new file mode 100644 index 0000000000..c0b7f29aca --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.image_smoothing_enabled.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.reset.state.image_smoothing_enabled + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.image_smoothing_enabled

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.image_smoothing_enabled.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.image_smoothing_enabled.worker.js new file mode 100644 index 0000000000..7010fb899c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.image_smoothing_enabled.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.state.image_smoothing_enabled +// Description:check that the state is reset +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("check that the state is reset"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const default_value = ctx.imageSmoothingEnabled; + + ctx.imageSmoothingEnabled = false; + _assert(ctx.imageSmoothingEnabled == false, "ctx.imageSmoothingEnabled == false"); + + ctx.reset(); + _assert(ctx.imageSmoothingEnabled == default_value, "ctx.imageSmoothingEnabled == default_value"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.image_smoothing_quality.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.image_smoothing_quality.html new file mode 100644 index 0000000000..12a6367ff9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.image_smoothing_quality.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.reset.state.image_smoothing_quality + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.image_smoothing_quality

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.image_smoothing_quality.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.image_smoothing_quality.worker.js new file mode 100644 index 0000000000..7429666691 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.image_smoothing_quality.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.state.image_smoothing_quality +// Description:check that the state is reset +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("check that the state is reset"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const default_value = ctx.imageSmoothingQuality; + + ctx.imageSmoothingQuality = 'high'; + _assert(ctx.imageSmoothingQuality == 'high', "ctx.imageSmoothingQuality == 'high'"); + + ctx.reset(); + _assert(ctx.imageSmoothingQuality == default_value, "ctx.imageSmoothingQuality == default_value"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.letter_spacing.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.letter_spacing.html new file mode 100644 index 0000000000..addb0c62ad --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.letter_spacing.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.reset.state.letter_spacing + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.letter_spacing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.letter_spacing.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.letter_spacing.worker.js new file mode 100644 index 0000000000..e0dfae0a8e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.letter_spacing.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.state.letter_spacing +// Description:check that the state is reset +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("check that the state is reset"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const default_value = ctx.letterSpacing; + + ctx.letterSpacing = '12px'; + _assert(ctx.letterSpacing == '12px', "ctx.letterSpacing == '12px'"); + + ctx.reset(); + _assert(ctx.letterSpacing == default_value, "ctx.letterSpacing == default_value"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_cap.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_cap.html new file mode 100644 index 0000000000..9b528b3448 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_cap.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.reset.state.line_cap + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.line_cap

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_cap.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_cap.worker.js new file mode 100644 index 0000000000..c3a94f2cbb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_cap.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.state.line_cap +// Description:check that the state is reset +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("check that the state is reset"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const default_value = ctx.lineCap; + + ctx.lineCap = 'square'; + _assert(ctx.lineCap == 'square', "ctx.lineCap == 'square'"); + + ctx.reset(); + _assert(ctx.lineCap == default_value, "ctx.lineCap == default_value"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_dash.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_dash.html new file mode 100644 index 0000000000..fd4edf58cf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_dash.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.reset.state.line_dash + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.line_dash

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the line dash is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_dash.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_dash.worker.js new file mode 100644 index 0000000000..841475d876 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_dash.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.state.line_dash +// Description:check that the line dash is reset +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("check that the line dash is reset"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.setLineDash([1, 2]); + + ctx.reset(); + _assert(ctx.getLineDash().length == 0, "ctx.getLineDash().length == 0"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_dash_offset.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_dash_offset.html new file mode 100644 index 0000000000..475db49f82 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_dash_offset.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.reset.state.line_dash_offset + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.line_dash_offset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_dash_offset.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_dash_offset.worker.js new file mode 100644 index 0000000000..5e0d8dd47c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_dash_offset.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.state.line_dash_offset +// Description:check that the state is reset +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("check that the state is reset"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const default_value = ctx.lineDashOffset; + + ctx.lineDashOffset = 1.0; + _assert(ctx.lineDashOffset == 1.0, "ctx.lineDashOffset == 1.0"); + + ctx.reset(); + _assert(ctx.lineDashOffset == default_value, "ctx.lineDashOffset == default_value"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_join.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_join.html new file mode 100644 index 0000000000..793c1d9bc4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_join.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.reset.state.line_join + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.line_join

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_join.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_join.worker.js new file mode 100644 index 0000000000..9d5e76757b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_join.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.state.line_join +// Description:check that the state is reset +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("check that the state is reset"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const default_value = ctx.lineJoin; + + ctx.lineJoin = 'bevel'; + _assert(ctx.lineJoin == 'bevel', "ctx.lineJoin == 'bevel'"); + + ctx.reset(); + _assert(ctx.lineJoin == default_value, "ctx.lineJoin == default_value"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_width.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_width.html new file mode 100644 index 0000000000..8cdf45f700 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_width.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.reset.state.line_width + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.line_width

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_width.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_width.worker.js new file mode 100644 index 0000000000..1e28f93d66 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.line_width.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.state.line_width +// Description:check that the state is reset +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("check that the state is reset"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const default_value = ctx.lineWidth; + + ctx.lineWidth = 1; + _assert(ctx.lineWidth == 1, "ctx.lineWidth == 1"); + + ctx.reset(); + _assert(ctx.lineWidth == default_value, "ctx.lineWidth == default_value"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.miter_limit.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.miter_limit.html new file mode 100644 index 0000000000..7f47f9a6be --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.miter_limit.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.reset.state.miter_limit + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.miter_limit

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.miter_limit.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.miter_limit.worker.js new file mode 100644 index 0000000000..3945a662d4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.miter_limit.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.state.miter_limit +// Description:check that the state is reset +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("check that the state is reset"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const default_value = ctx.miterLimit; + + ctx.miterLimit = 1.0; + _assert(ctx.miterLimit == 1.0, "ctx.miterLimit == 1.0"); + + ctx.reset(); + _assert(ctx.miterLimit == default_value, "ctx.miterLimit == default_value"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_blur.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_blur.html new file mode 100644 index 0000000000..e7075ce102 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_blur.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.reset.state.shadow_blur + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.shadow_blur

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_blur.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_blur.worker.js new file mode 100644 index 0000000000..d82933169d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_blur.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.state.shadow_blur +// Description:check that the state is reset +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("check that the state is reset"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const default_value = ctx.shadowBlur; + + ctx.shadowBlur = 10.0; + _assert(ctx.shadowBlur == 10.0, "ctx.shadowBlur == 10.0"); + + ctx.reset(); + _assert(ctx.shadowBlur == default_value, "ctx.shadowBlur == default_value"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_color.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_color.html new file mode 100644 index 0000000000..ad928acf46 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_color.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.reset.state.shadow_color + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.shadow_color

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_color.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_color.worker.js new file mode 100644 index 0000000000..6ad1e83be2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_color.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.state.shadow_color +// Description:check that the state is reset +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("check that the state is reset"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const default_value = ctx.shadowColor; + + ctx.shadowColor = '#ff0000'; + _assert(ctx.shadowColor == '#ff0000', "ctx.shadowColor == '#ff0000'"); + + ctx.reset(); + _assert(ctx.shadowColor == default_value, "ctx.shadowColor == default_value"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_offset_x.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_offset_x.html new file mode 100644 index 0000000000..e3742e4dbc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_offset_x.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.reset.state.shadow_offset_x + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.shadow_offset_x

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_offset_x.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_offset_x.worker.js new file mode 100644 index 0000000000..4247820a4d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_offset_x.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.state.shadow_offset_x +// Description:check that the state is reset +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("check that the state is reset"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const default_value = ctx.shadowOffsetX; + + ctx.shadowOffsetX = 10.0; + _assert(ctx.shadowOffsetX == 10.0, "ctx.shadowOffsetX == 10.0"); + + ctx.reset(); + _assert(ctx.shadowOffsetX == default_value, "ctx.shadowOffsetX == default_value"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_offset_y.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_offset_y.html new file mode 100644 index 0000000000..64901ef492 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_offset_y.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.reset.state.shadow_offset_y + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.shadow_offset_y

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_offset_y.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_offset_y.worker.js new file mode 100644 index 0000000000..0c1926ebca --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.shadow_offset_y.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.state.shadow_offset_y +// Description:check that the state is reset +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("check that the state is reset"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const default_value = ctx.shadowOffsetY; + + ctx.shadowOffsetY = 10.0; + _assert(ctx.shadowOffsetY == 10.0, "ctx.shadowOffsetY == 10.0"); + + ctx.reset(); + _assert(ctx.shadowOffsetY == default_value, "ctx.shadowOffsetY == default_value"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.stroke_style.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.stroke_style.html new file mode 100644 index 0000000000..79803b2828 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.stroke_style.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.reset.state.stroke_style + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.stroke_style

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.stroke_style.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.stroke_style.worker.js new file mode 100644 index 0000000000..99e1eaaed5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.stroke_style.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.state.stroke_style +// Description:check that the state is reset +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("check that the state is reset"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const default_value = ctx.strokeStyle; + + ctx.strokeStyle = '#ffffff'; + _assert(ctx.strokeStyle == '#ffffff', "ctx.strokeStyle == '#ffffff'"); + + ctx.reset(); + _assert(ctx.strokeStyle == default_value, "ctx.strokeStyle == default_value"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.text_align.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.text_align.html new file mode 100644 index 0000000000..c1a33d6f3d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.text_align.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.reset.state.text_align + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.text_align

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.text_align.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.text_align.worker.js new file mode 100644 index 0000000000..087d3195e4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.text_align.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.state.text_align +// Description:check that the state is reset +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("check that the state is reset"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const default_value = ctx.textAlign; + + ctx.textAlign = 'end'; + _assert(ctx.textAlign == 'end', "ctx.textAlign == 'end'"); + + ctx.reset(); + _assert(ctx.textAlign == default_value, "ctx.textAlign == default_value"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.text_baseline.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.text_baseline.html new file mode 100644 index 0000000000..acb56e4a00 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.text_baseline.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.reset.state.text_baseline + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.text_baseline

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.text_baseline.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.text_baseline.worker.js new file mode 100644 index 0000000000..9a171326cb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.text_baseline.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.state.text_baseline +// Description:check that the state is reset +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("check that the state is reset"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const default_value = ctx.textBaseline; + + ctx.textBaseline = 'middle'; + _assert(ctx.textBaseline == 'middle', "ctx.textBaseline == 'middle'"); + + ctx.reset(); + _assert(ctx.textBaseline == default_value, "ctx.textBaseline == default_value"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.text_rendering.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.text_rendering.html new file mode 100644 index 0000000000..174dbb3801 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.text_rendering.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.reset.state.text_rendering + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.text_rendering

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.text_rendering.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.text_rendering.worker.js new file mode 100644 index 0000000000..df4cea1044 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.text_rendering.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.state.text_rendering +// Description:check that the state is reset +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("check that the state is reset"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const default_value = ctx.textRendering; + + ctx.textRendering = 'geometricPrecision'; + _assert(ctx.textRendering == 'geometricPrecision', "ctx.textRendering == 'geometricPrecision'"); + + ctx.reset(); + _assert(ctx.textRendering == default_value, "ctx.textRendering == default_value"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.transformation_matrix.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.transformation_matrix.html new file mode 100644 index 0000000000..c30e459b30 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.transformation_matrix.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.reset.state.transformation_matrix + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.transformation_matrix

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.transformation_matrix.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.transformation_matrix.worker.js new file mode 100644 index 0000000000..2ae105c20e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.transformation_matrix.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.state.transformation_matrix +// Description:check that the state is reset +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("check that the state is reset"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.scale(2, 2); + + ctx.reset(); + _assert(ctx.getTransform().isIdentity, "ctx.getTransform().isIdentity"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.word_spacing.html b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.word_spacing.html new file mode 100644 index 0000000000..470db2cf98 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.word_spacing.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.reset.state.word_spacing + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.reset.state.word_spacing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  check that the state is reset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.word_spacing.worker.js b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.word_spacing.worker.js new file mode 100644 index 0000000000..9e8c717f78 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/reset/2d.reset.state.word_spacing.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.reset.state.word_spacing +// Description:check that the state is reset +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("check that the state is reset"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + const default_value = ctx.wordSpacing; + + ctx.wordSpacing = '12px'; + _assert(ctx.wordSpacing == '12px', "ctx.wordSpacing == '12px'"); + + ctx.reset(); + _assert(ctx.wordSpacing == default_value, "ctx.wordSpacing == default_value"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/set-proprietary-font-names-001-crash.html b/testing/web-platform/tests/html/canvas/offscreen/set-proprietary-font-names-001-crash.html new file mode 100644 index 0000000000..dfa661655e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/set-proprietary-font-names-001-crash.html @@ -0,0 +1,13 @@ + +Setting font of offscreen + + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.1.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.1.html new file mode 100644 index 0000000000..765cf41b21 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.1.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.shadow.alpha.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.alpha.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadow color alpha components are used

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.1.worker.js new file mode 100644 index 0000000000..869aa017e7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.1.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.alpha.1 +// Description:Shadow color alpha components are used +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadow color alpha components are used"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = 'rgba(255, 0, 0, 0.01)'; + ctx.shadowOffsetY = 50; + ctx.fillRect(0, -50, 100, 50); + + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 4); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.2.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.2.html new file mode 100644 index 0000000000..be2209608f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.2.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.shadow.alpha.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.alpha.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadow color alpha components are used

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.2.png b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.2.png new file mode 100644 index 0000000000..8764e89b37 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.2.png differ diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.2.worker.js new file mode 100644 index 0000000000..dce91f2e4d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.2.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.alpha.2 +// Description:Shadow color alpha components are used +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadow color alpha components are used"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = 'rgba(0, 0, 255, 0.5)'; + ctx.shadowOffsetY = 50; + ctx.fillRect(0, -50, 100, 50); + + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.3.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.3.html new file mode 100644 index 0000000000..7239b3cea7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.3.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.shadow.alpha.3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.alpha.3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are affected by globalAlpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.3.png b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.3.png new file mode 100644 index 0000000000..8764e89b37 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.3.png differ diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.3.worker.js new file mode 100644 index 0000000000..93fc665ced --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.3.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.alpha.3 +// Description:Shadows are affected by globalAlpha +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows are affected by globalAlpha"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; // (work around broken Firefox globalAlpha caching) + ctx.shadowColor = '#00f'; + ctx.shadowOffsetY = 50; + ctx.globalAlpha = 0.5; + ctx.fillRect(0, -50, 100, 50); + + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.4.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.4.html new file mode 100644 index 0000000000..468db2a716 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.4.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.shadow.alpha.4 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.alpha.4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows with alpha components are correctly affected by globalAlpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.4.png b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.4.png new file mode 100644 index 0000000000..8764e89b37 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.4.png differ diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.4.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.4.worker.js new file mode 100644 index 0000000000..2be63d3eff --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.4.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.alpha.4 +// Description:Shadows with alpha components are correctly affected by globalAlpha +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows with alpha components are correctly affected by globalAlpha"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; // (work around broken Firefox globalAlpha caching) + ctx.shadowColor = 'rgba(0, 0, 255, 0.707)'; + ctx.shadowOffsetY = 50; + ctx.globalAlpha = 0.707; + ctx.fillRect(0, -50, 100, 50); + + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.5.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.5.html new file mode 100644 index 0000000000..92ac9717f2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.5.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.shadow.alpha.5 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.alpha.5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows of shapes with alpha components are drawn correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.5.png b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.5.png new file mode 100644 index 0000000000..8764e89b37 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.5.png differ diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.5.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.5.worker.js new file mode 100644 index 0000000000..016616ac8c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.alpha.5.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.alpha.5 +// Description:Shadows of shapes with alpha components are drawn correctly +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows of shapes with alpha components are drawn correctly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = 'rgba(64, 0, 0, 0.5)'; + ctx.shadowColor = '#00f'; + ctx.shadowOffsetY = 50; + ctx.fillRect(0, -50, 100, 50); + + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.initial.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.initial.html new file mode 100644 index 0000000000..21225883df --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.initial.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.shadow.attributes.shadowBlur.initial + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.attributes.shadowBlur.initial

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.initial.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.initial.worker.js new file mode 100644 index 0000000000..7643f0edfa --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.initial.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.attributes.shadowBlur.initial +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.shadowBlur, 0, "ctx.shadowBlur", "0"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.invalid.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.invalid.html new file mode 100644 index 0000000000..51d1a4a804 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.invalid.html @@ -0,0 +1,53 @@ + + +OffscreenCanvas test: 2d.shadow.attributes.shadowBlur.invalid + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.attributes.shadowBlur.invalid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.invalid.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.invalid.worker.js new file mode 100644 index 0000000000..2e3a28b789 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.invalid.worker.js @@ -0,0 +1,48 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.attributes.shadowBlur.invalid +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.shadowBlur = 1; + ctx.shadowBlur = -2; + _assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); + + ctx.shadowBlur = 1; + ctx.shadowBlur = Infinity; + _assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); + + ctx.shadowBlur = 1; + ctx.shadowBlur = -Infinity; + _assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); + + ctx.shadowBlur = 1; + ctx.shadowBlur = NaN; + _assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); + + ctx.shadowBlur = 1; + ctx.shadowBlur = 'string'; + _assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); + + ctx.shadowBlur = 1; + ctx.shadowBlur = true; + _assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); + + ctx.shadowBlur = 1; + ctx.shadowBlur = false; + _assertSame(ctx.shadowBlur, 0, "ctx.shadowBlur", "0"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.valid.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.valid.html new file mode 100644 index 0000000000..06495f6c31 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.valid.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.shadow.attributes.shadowBlur.valid + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.attributes.shadowBlur.valid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.valid.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.valid.worker.js new file mode 100644 index 0000000000..d0292edaec --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.valid.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.attributes.shadowBlur.valid +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.shadowBlur = 1; + _assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); + + ctx.shadowBlur = 0.5; + _assertSame(ctx.shadowBlur, 0.5, "ctx.shadowBlur", "0.5"); + + ctx.shadowBlur = 1e6; + _assertSame(ctx.shadowBlur, 1e6, "ctx.shadowBlur", "1e6"); + + ctx.shadowBlur = 0; + _assertSame(ctx.shadowBlur, 0, "ctx.shadowBlur", "0"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.initial.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.initial.html new file mode 100644 index 0000000000..92a8bd1500 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.initial.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.shadow.attributes.shadowColor.initial + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.attributes.shadowColor.initial

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.initial.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.initial.worker.js new file mode 100644 index 0000000000..8b1ec38d7f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.initial.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.attributes.shadowColor.initial +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.shadowColor, 'rgba(0, 0, 0, 0)', "ctx.shadowColor", "'rgba(0, 0, 0, 0)'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.invalid.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.invalid.html new file mode 100644 index 0000000000..ac1d9e7333 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.invalid.html @@ -0,0 +1,41 @@ + + +OffscreenCanvas test: 2d.shadow.attributes.shadowColor.invalid + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.attributes.shadowColor.invalid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.invalid.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.invalid.worker.js new file mode 100644 index 0000000000..c962f2508d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.invalid.worker.js @@ -0,0 +1,36 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.attributes.shadowColor.invalid +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.shadowColor = '#00ff00'; + ctx.shadowColor = 'bogus'; + _assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); + + ctx.shadowColor = '#00ff00'; + ctx.shadowColor = 'red bogus'; + _assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); + + ctx.shadowColor = '#00ff00'; + ctx.shadowColor = ctx; + _assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); + + ctx.shadowColor = '#00ff00'; + ctx.shadowColor = undefined; + _assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.valid.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.valid.html new file mode 100644 index 0000000000..340f11f54f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.valid.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.shadow.attributes.shadowColor.valid + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.attributes.shadowColor.valid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.valid.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.valid.worker.js new file mode 100644 index 0000000000..6d7eb0504d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.valid.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.attributes.shadowColor.valid +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.shadowColor = 'lime'; + _assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); + + ctx.shadowColor = 'RGBA(0,255, 0,0)'; + _assertSame(ctx.shadowColor, 'rgba(0, 255, 0, 0)', "ctx.shadowColor", "'rgba(0, 255, 0, 0)'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.initial.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.initial.html new file mode 100644 index 0000000000..52be5ad532 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.initial.html @@ -0,0 +1,28 @@ + + +OffscreenCanvas test: 2d.shadow.attributes.shadowOffset.initial + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.attributes.shadowOffset.initial

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.initial.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.initial.worker.js new file mode 100644 index 0000000000..b7b399b371 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.initial.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.attributes.shadowOffset.initial +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.shadowOffsetX, 0, "ctx.shadowOffsetX", "0"); + _assertSame(ctx.shadowOffsetY, 0, "ctx.shadowOffsetY", "0"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.invalid.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.invalid.html new file mode 100644 index 0000000000..d789284b0a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.invalid.html @@ -0,0 +1,67 @@ + + +OffscreenCanvas test: 2d.shadow.attributes.shadowOffset.invalid + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.attributes.shadowOffset.invalid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.invalid.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.invalid.worker.js new file mode 100644 index 0000000000..9eb89cd581 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.invalid.worker.js @@ -0,0 +1,62 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.attributes.shadowOffset.invalid +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + ctx.shadowOffsetX = Infinity; + ctx.shadowOffsetY = Infinity; + _assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); + _assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); + + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + ctx.shadowOffsetX = -Infinity; + ctx.shadowOffsetY = -Infinity; + _assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); + _assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); + + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + ctx.shadowOffsetX = NaN; + ctx.shadowOffsetY = NaN; + _assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); + _assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); + + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + ctx.shadowOffsetX = 'string'; + ctx.shadowOffsetY = 'string'; + _assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); + _assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); + + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + ctx.shadowOffsetX = true; + ctx.shadowOffsetY = true; + _assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); + _assertSame(ctx.shadowOffsetY, 1, "ctx.shadowOffsetY", "1"); + + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + ctx.shadowOffsetX = false; + ctx.shadowOffsetY = false; + _assertSame(ctx.shadowOffsetX, 0, "ctx.shadowOffsetX", "0"); + _assertSame(ctx.shadowOffsetY, 0, "ctx.shadowOffsetY", "0"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.valid.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.valid.html new file mode 100644 index 0000000000..82f5f0118d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.valid.html @@ -0,0 +1,50 @@ + + +OffscreenCanvas test: 2d.shadow.attributes.shadowOffset.valid + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.attributes.shadowOffset.valid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.valid.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.valid.worker.js new file mode 100644 index 0000000000..5881c5bca5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.valid.worker.js @@ -0,0 +1,45 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.attributes.shadowOffset.valid +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + _assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); + _assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); + + ctx.shadowOffsetX = 0.5; + ctx.shadowOffsetY = 0.25; + _assertSame(ctx.shadowOffsetX, 0.5, "ctx.shadowOffsetX", "0.5"); + _assertSame(ctx.shadowOffsetY, 0.25, "ctx.shadowOffsetY", "0.25"); + + ctx.shadowOffsetX = -0.5; + ctx.shadowOffsetY = -0.25; + _assertSame(ctx.shadowOffsetX, -0.5, "ctx.shadowOffsetX", "-0.5"); + _assertSame(ctx.shadowOffsetY, -0.25, "ctx.shadowOffsetY", "-0.25"); + + ctx.shadowOffsetX = 0; + ctx.shadowOffsetY = 0; + _assertSame(ctx.shadowOffsetX, 0, "ctx.shadowOffsetX", "0"); + _assertSame(ctx.shadowOffsetY, 0, "ctx.shadowOffsetY", "0"); + + ctx.shadowOffsetX = 1e6; + ctx.shadowOffsetY = 1e6; + _assertSame(ctx.shadowOffsetX, 1e6, "ctx.shadowOffsetX", "1e6"); + _assertSame(ctx.shadowOffsetY, 1e6, "ctx.shadowOffsetY", "1e6"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.blur.high-manual.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.blur.high-manual.html new file mode 100644 index 0000000000..46c5032448 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.blur.high-manual.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.shadow.blur.high + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.blur.high

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows look correct for large blurs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.blur.high-manual.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.blur.high-manual.worker.js new file mode 100644 index 0000000000..8bd06da381 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.blur.high-manual.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.blur.high +// Description:Shadows look correct for large blurs +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows look correct for large blurs"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#ff0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#00f'; + ctx.shadowOffsetY = 0; + ctx.shadowBlur = 100; + ctx.fillRect(-200, -200, 200, 400); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.blur.high.png b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.blur.high.png new file mode 100644 index 0000000000..743640b79f Binary files /dev/null and b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.blur.high.png differ diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.blur.low-manual.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.blur.low-manual.html new file mode 100644 index 0000000000..19a42a683c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.blur.low-manual.html @@ -0,0 +1,39 @@ + + +OffscreenCanvas test: 2d.shadow.blur.low + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.blur.low

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows look correct for small blurs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.blur.low-manual.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.blur.low-manual.worker.js new file mode 100644 index 0000000000..67bc8c424e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.blur.low-manual.worker.js @@ -0,0 +1,34 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.blur.low +// Description:Shadows look correct for small blurs +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows look correct for small blurs"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#ff0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#00f'; + ctx.shadowOffsetY = 25; + for (var x = 0; x < 100; ++x) { + ctx.save(); + ctx.beginPath(); + ctx.rect(x, 0, 1, 50); + ctx.clip(); + ctx.shadowBlur = x; + ctx.fillRect(-200, -200, 500, 200); + ctx.restore(); + } + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.blur.low.png b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.blur.low.png new file mode 100644 index 0000000000..99fb651c21 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.blur.low.png differ diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.alpha.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.alpha.html new file mode 100644 index 0000000000..cae4235e8c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.alpha.html @@ -0,0 +1,38 @@ + + +OffscreenCanvas test: 2d.shadow.canvas.alpha + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.canvas.alpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are drawn correctly for partially-transparent canvases

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.alpha.png b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.alpha.png new file mode 100644 index 0000000000..8764e89b37 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.alpha.png differ diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.alpha.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.alpha.worker.js new file mode 100644 index 0000000000..0fa74a2070 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.alpha.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.canvas.alpha +// Description:Shadows are drawn correctly for partially-transparent canvases +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows are drawn correctly for partially-transparent canvases"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var canvas2 = new OffscreenCanvas(100, 50); + var ctx2 = canvas2.getContext('2d'); + ctx2.fillStyle = 'rgba(255, 0, 0, 0.5)'; + ctx2.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#00f'; + ctx.drawImage(canvas2, 0, -50); + + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.basic.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.basic.html new file mode 100644 index 0000000000..f5784e914f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.basic.html @@ -0,0 +1,38 @@ + + +OffscreenCanvas test: 2d.shadow.canvas.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.canvas.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are drawn for canvases

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.basic.worker.js new file mode 100644 index 0000000000..6a2d916a75 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.basic.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.canvas.basic +// Description:Shadows are drawn for canvases +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows are drawn for canvases"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var canvas2 = new OffscreenCanvas(100, 50); + var ctx2 = canvas2.getContext('2d'); + ctx2.fillStyle = '#f00'; + ctx2.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.drawImage(canvas2, 0, -50); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.1.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.1.html new file mode 100644 index 0000000000..62b3f83272 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.1.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.shadow.canvas.transparent.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.canvas.transparent.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are not drawn for transparent canvases

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.1.worker.js new file mode 100644 index 0000000000..1b02897d62 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.1.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.canvas.transparent.1 +// Description:Shadows are not drawn for transparent canvases +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows are not drawn for transparent canvases"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var canvas2 = new OffscreenCanvas(100, 50); + var ctx2 = canvas2.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#f00'; + ctx.shadowOffsetY = 50; + ctx.drawImage(canvas2, 0, -50); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.2.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.2.html new file mode 100644 index 0000000000..0f80453523 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.2.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.shadow.canvas.transparent.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.canvas.transparent.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are not drawn for transparent parts of canvases

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.2.worker.js new file mode 100644 index 0000000000..6e468e28e0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.2.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.canvas.transparent.2 +// Description:Shadows are not drawn for transparent parts of canvases +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows are not drawn for transparent parts of canvases"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var canvas2 = new OffscreenCanvas(100, 50); + var ctx2 = canvas2.getContext('2d'); + ctx2.fillStyle = '#f00'; + ctx2.fillRect(0, 0, 50, 50); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.drawImage(canvas2, 50, -50); + ctx.shadowColor = '#f00'; + ctx.drawImage(canvas2, -50, -50); + + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.clip.1.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.clip.1.html new file mode 100644 index 0000000000..4df101d513 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.clip.1.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.shadow.clip.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.clip.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows of clipped shapes are still drawn within the clipping region

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.clip.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.clip.1.worker.js new file mode 100644 index 0000000000..6b05ceb226 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.clip.1.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.clip.1 +// Description:Shadows of clipped shapes are still drawn within the clipping region +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows of clipped shapes are still drawn within the clipping region"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + + ctx.save(); + ctx.beginPath(); + ctx.rect(50, 0, 50, 50); + ctx.clip(); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 50; + ctx.fillRect(0, 0, 50, 50); + ctx.restore(); + + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.clip.2.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.clip.2.html new file mode 100644 index 0000000000..6a09ea53f3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.clip.2.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.shadow.clip.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.clip.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are not drawn outside the clipping region

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.clip.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.clip.2.worker.js new file mode 100644 index 0000000000..4cdfcfdcfc --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.clip.2.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.clip.2 +// Description:Shadows are not drawn outside the clipping region +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows are not drawn outside the clipping region"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 50); + + ctx.save(); + ctx.beginPath(); + ctx.rect(0, 0, 50, 50); + ctx.clip(); + ctx.shadowColor = '#f00'; + ctx.shadowOffsetX = 50; + ctx.fillRect(0, 0, 50, 50); + ctx.restore(); + + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.clip.3.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.clip.3.html new file mode 100644 index 0000000000..d1732e9f5b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.clip.3.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.shadow.clip.3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.clip.3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows of clipped shapes are still drawn within the clipping region

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.clip.3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.clip.3.worker.js new file mode 100644 index 0000000000..6f8b79d1fe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.clip.3.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.clip.3 +// Description:Shadows of clipped shapes are still drawn within the clipping region +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows of clipped shapes are still drawn within the clipping region"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 50); + + ctx.save(); + ctx.beginPath(); + ctx.rect(0, 0, 50, 50); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 50; + ctx.fillRect(-50, 0, 50, 50); + ctx.restore(); + + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.composite.1.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.composite.1.html new file mode 100644 index 0000000000..d6014fbd45 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.composite.1.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.shadow.composite.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.composite.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are drawn using globalCompositeOperation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.composite.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.composite.1.worker.js new file mode 100644 index 0000000000..28637706e1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.composite.1.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.composite.1 +// Description:Shadows are drawn using globalCompositeOperation +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows are drawn using globalCompositeOperation"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.shadowColor = '#f00'; + ctx.shadowOffsetX = 100; + ctx.fillStyle = '#0f0'; + ctx.fillRect(-100, 0, 200, 50); + + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.composite.2.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.composite.2.html new file mode 100644 index 0000000000..87f2e3ba0f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.composite.2.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.shadow.composite.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.composite.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are drawn using globalCompositeOperation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.composite.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.composite.2.worker.js new file mode 100644 index 0000000000..a144446ec5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.composite.2.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.composite.2 +// Description:Shadows are drawn using globalCompositeOperation +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows are drawn using globalCompositeOperation"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.shadowColor = '#f00'; + ctx.shadowBlur = 1; + ctx.fillStyle = '#0f0'; + ctx.fillRect(-10, -10, 120, 70); + + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.composite.3.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.composite.3.html new file mode 100644 index 0000000000..f3cafa983a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.composite.3.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.shadow.composite.3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.composite.3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Areas outside shadows are drawn correctly with destination-out

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.composite.3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.composite.3.worker.js new file mode 100644 index 0000000000..ba29487eea --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.composite.3.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.composite.3 +// Description:Areas outside shadows are drawn correctly with destination-out +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Areas outside shadows are drawn correctly with destination-out"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-out'; + ctx.shadowColor = '#f00'; + ctx.shadowBlur = 10; + ctx.fillStyle = '#f00'; + ctx.fillRect(200, 0, 100, 50); + + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.blur.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.blur.html new file mode 100644 index 0000000000..a25be8ebcf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.blur.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.shadow.enable.blur + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.enable.blur

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are drawn if shadowBlur is set

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.blur.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.blur.worker.js new file mode 100644 index 0000000000..859ae8b612 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.blur.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.enable.blur +// Description:Shadows are drawn if shadowBlur is set +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows are drawn if shadowBlur is set"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.globalCompositeOperation = 'destination-atop'; + ctx.shadowColor = '#0f0'; + ctx.shadowBlur = 0.1; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.1.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.1.html new file mode 100644 index 0000000000..de85b7366b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.1.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.shadow.enable.off.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.enable.off.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are not drawn when only shadowColor is set

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.1.worker.js new file mode 100644 index 0000000000..7ccd1351fe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.1.worker.js @@ -0,0 +1,25 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.enable.off.1 +// Description:Shadows are not drawn when only shadowColor is set +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows are not drawn when only shadowColor is set"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.shadowColor = '#f00'; + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.2.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.2.html new file mode 100644 index 0000000000..a57cb66aff --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.2.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.shadow.enable.off.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.enable.off.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are not drawn when only shadowColor is set

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.2.worker.js new file mode 100644 index 0000000000..e068a7ab54 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.2.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.enable.off.2 +// Description:Shadows are not drawn when only shadowColor is set +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows are not drawn when only shadowColor is set"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.globalCompositeOperation = 'destination-atop'; + ctx.shadowColor = '#f00'; + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.x.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.x.html new file mode 100644 index 0000000000..70b0a84dcf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.x.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.shadow.enable.x + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.enable.x

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are drawn if shadowOffsetX is set

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.x.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.x.worker.js new file mode 100644 index 0000000000..975c621ffa --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.x.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.enable.x +// Description:Shadows are drawn if shadowOffsetX is set +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows are drawn if shadowOffsetX is set"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.globalCompositeOperation = 'destination-atop'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 0.1; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.y.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.y.html new file mode 100644 index 0000000000..df8bcc2ba2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.y.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.shadow.enable.y + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.enable.y

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are drawn if shadowOffsetY is set

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.y.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.y.worker.js new file mode 100644 index 0000000000..1dae1000a3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.enable.y.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.enable.y +// Description:Shadows are drawn if shadowOffsetY is set +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows are drawn if shadowOffsetY is set"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.globalCompositeOperation = 'destination-atop'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 0.1; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.alpha.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.alpha.html new file mode 100644 index 0000000000..199dd6c3fa --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.alpha.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.shadow.gradient.alpha + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.gradient.alpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are drawn correctly for partially-transparent gradient fills

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.alpha.png b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.alpha.png new file mode 100644 index 0000000000..8764e89b37 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.alpha.png differ diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.alpha.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.alpha.worker.js new file mode 100644 index 0000000000..0f9a6449c4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.alpha.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.gradient.alpha +// Description:Shadows are drawn correctly for partially-transparent gradient fills +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows are drawn correctly for partially-transparent gradient fills"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var gradient = ctx.createLinearGradient(0, 0, 100, 0); + gradient.addColorStop(0, 'rgba(255,0,0,0.5)'); + gradient.addColorStop(1, 'rgba(255,0,0,0.5)'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#00f'; + ctx.fillStyle = gradient; + ctx.fillRect(0, -50, 100, 50); + + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.basic.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.basic.html new file mode 100644 index 0000000000..6746f03f3d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.basic.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.shadow.gradient.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.gradient.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are drawn for gradient fills

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.basic.worker.js new file mode 100644 index 0000000000..068b48bb6f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.basic.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.gradient.basic +// Description:Shadows are drawn for gradient fills +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows are drawn for gradient fills"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var gradient = ctx.createLinearGradient(0, 0, 100, 0); + gradient.addColorStop(0, '#f00'); + gradient.addColorStop(1, '#f00'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.fillStyle = gradient; + ctx.fillRect(0, -50, 100, 50); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.1.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.1.html new file mode 100644 index 0000000000..7e7309e976 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.1.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.shadow.gradient.transparent.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.gradient.transparent.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are not drawn for transparent gradient fills

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.1.worker.js new file mode 100644 index 0000000000..1102848ecb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.1.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.gradient.transparent.1 +// Description:Shadows are not drawn for transparent gradient fills +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows are not drawn for transparent gradient fills"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var gradient = ctx.createLinearGradient(0, 0, 100, 0); + gradient.addColorStop(0, 'rgba(0,0,0,0)'); + gradient.addColorStop(1, 'rgba(0,0,0,0)'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#f00'; + ctx.shadowOffsetY = 50; + ctx.fillStyle = gradient; + ctx.fillRect(0, -50, 100, 50); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.2.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.2.html new file mode 100644 index 0000000000..8259eb9ae5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.2.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.shadow.gradient.transparent.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.gradient.transparent.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are not drawn for transparent parts of gradient fills

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.2.worker.js new file mode 100644 index 0000000000..5fcf4ee93d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.2.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.gradient.transparent.2 +// Description:Shadows are not drawn for transparent parts of gradient fills +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows are not drawn for transparent parts of gradient fills"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var gradient = ctx.createLinearGradient(0, 0, 100, 0); + gradient.addColorStop(0, '#f00'); + gradient.addColorStop(0.499, '#f00'); + gradient.addColorStop(0.5, 'rgba(0,0,0,0)'); + gradient.addColorStop(1, 'rgba(0,0,0,0)'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.fillStyle = gradient; + ctx.fillRect(0, -50, 100, 50); + + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.alpha.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.alpha.html new file mode 100644 index 0000000000..f7f797fd0b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.alpha.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.shadow.image.alpha + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.image.alpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are drawn correctly for partially-transparent images

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.alpha.png b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.alpha.png new file mode 100644 index 0000000000..8764e89b37 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.alpha.png differ diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.alpha.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.alpha.worker.js new file mode 100644 index 0000000000..827bd2ce65 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.alpha.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.image.alpha +// Description:Shadows are drawn correctly for partially-transparent images +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#00f'; + var response = await fetch('/images/transparent50.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + ctx.drawImage(img, 0, -50); + + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); + t.done(); +}, "Shadows are drawn correctly for partially-transparent images"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.basic.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.basic.html new file mode 100644 index 0000000000..5b959fdd92 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.basic.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.shadow.image.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.image.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are drawn for images

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.basic.worker.js new file mode 100644 index 0000000000..2d02232c68 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.basic.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.image.basic +// Description:Shadows are drawn for images +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + var response = await fetch('/images/red.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + ctx.drawImage(img, 0, -50); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}, "Shadows are drawn for images"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.scale.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.scale.html new file mode 100644 index 0000000000..7e2536c052 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.scale.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.shadow.image.scale + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.image.scale

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are drawn correctly for scaled images

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.scale.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.scale.worker.js new file mode 100644 index 0000000000..2c10381f98 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.scale.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.image.scale +// Description:Shadows are drawn correctly for scaled images +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + var response = await fetch('/images/redtransparent.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + ctx.drawImage(img, 0, 0, 100, 50, -10, -50, 240, 50); + + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + t.done(); +}, "Shadows are drawn correctly for scaled images"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.section.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.section.html new file mode 100644 index 0000000000..7744ee153b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.section.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.shadow.image.section + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.image.section

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are not drawn for areas outside image source rectangles

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.section.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.section.worker.js new file mode 100644 index 0000000000..94affdfb6a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.section.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.image.section +// Description:Shadows are not drawn for areas outside image source rectangles +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#f00'; + var response = await fetch('/images/redtransparent.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + ctx.drawImage(img, 50, 0, 50, 50, 0, -50, 50, 50); + + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + t.done(); +}, "Shadows are not drawn for areas outside image source rectangles"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.1.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.1.html new file mode 100644 index 0000000000..30db23ce76 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.1.html @@ -0,0 +1,30 @@ + + +OffscreenCanvas test: 2d.shadow.image.transparent.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.image.transparent.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are not drawn for transparent images

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.1.worker.js new file mode 100644 index 0000000000..c5421d7042 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.1.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.image.transparent.1 +// Description:Shadows are not drawn for transparent images +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#f00'; + ctx.shadowOffsetY = 50; + var response = await fetch('/images/transparent.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + ctx.drawImage(img, 0, -50); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}, "Shadows are not drawn for transparent images"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.2.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.2.html new file mode 100644 index 0000000000..9b3b206a26 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.2.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.shadow.image.transparent.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.image.transparent.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are not drawn for transparent parts of images

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.2.worker.js new file mode 100644 index 0000000000..071c584fa8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.2.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.image.transparent.2 +// Description:Shadows are not drawn for transparent parts of images +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + var response = await fetch('/images/redtransparent.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + ctx.drawImage(img, 50, -50); + ctx.shadowColor = '#f00'; + ctx.drawImage(img, -50, -50); + + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}, "Shadows are not drawn for transparent parts of images"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeX.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeX.html new file mode 100644 index 0000000000..cc0d1adb97 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeX.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.shadow.offset.negativeX + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.offset.negativeX

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows can be offset with negative x

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeX.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeX.worker.js new file mode 100644 index 0000000000..14c709a2a0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeX.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.offset.negativeX +// Description:Shadows can be offset with negative x +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows can be offset with negative x"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = -50; + ctx.fillRect(50, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeY.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeY.html new file mode 100644 index 0000000000..82094cf2f9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeY.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.shadow.offset.negativeY + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.offset.negativeY

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows can be offset with negative y

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeY.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeY.worker.js new file mode 100644 index 0000000000..036c6154cb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeY.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.offset.negativeY +// Description:Shadows can be offset with negative y +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows can be offset with negative y"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = -25; + ctx.fillRect(0, 25, 100, 25); + _assertPixel(canvas, 50,12, 0,255,0,255); + _assertPixel(canvas, 50,37, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveX.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveX.html new file mode 100644 index 0000000000..7094e98ecf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveX.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.shadow.offset.positiveX + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.offset.positiveX

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows can be offset with positive x

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveX.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveX.worker.js new file mode 100644 index 0000000000..176aca45f4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveX.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.offset.positiveX +// Description:Shadows can be offset with positive x +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows can be offset with positive x"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 50; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveY.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveY.html new file mode 100644 index 0000000000..75e9b0affa --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveY.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.shadow.offset.positiveY + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.offset.positiveY

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows can be offset with positive y

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveY.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveY.worker.js new file mode 100644 index 0000000000..6b4d0c6a21 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveY.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.offset.positiveY +// Description:Shadows can be offset with positive y +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows can be offset with positive y"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 25; + ctx.fillRect(0, 0, 100, 25); + _assertPixel(canvas, 50,12, 0,255,0,255); + _assertPixel(canvas, 50,37, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.outside.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.outside.html new file mode 100644 index 0000000000..498051465b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.outside.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.shadow.outside + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.outside

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows of shapes outside the visible area can be offset onto the visible area

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.outside.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.outside.worker.js new file mode 100644 index 0000000000..d2a071f474 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.outside.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.outside +// Description:Shadows of shapes outside the visible area can be offset onto the visible area +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows of shapes outside the visible area can be offset onto the visible area"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 100; + ctx.fillRect(-100, 0, 25, 50); + ctx.shadowOffsetX = -100; + ctx.fillRect(175, 0, 25, 50); + ctx.shadowOffsetX = 0; + ctx.shadowOffsetY = 100; + ctx.fillRect(25, -100, 50, 25); + ctx.shadowOffsetY = -100; + ctx.fillRect(25, 125, 50, 25); + _assertPixel(canvas, 12,25, 0,255,0,255); + _assertPixel(canvas, 87,25, 0,255,0,255); + _assertPixel(canvas, 50,12, 0,255,0,255); + _assertPixel(canvas, 50,37, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.html new file mode 100644 index 0000000000..c45654f999 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.shadow.pattern.alpha + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.pattern.alpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are drawn correctly for partially-transparent fill patterns

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.png b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.png new file mode 100644 index 0000000000..8764e89b37 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.png differ diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.worker.js new file mode 100644 index 0000000000..41a826a158 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.pattern.alpha +// Description:Shadows are drawn correctly for partially-transparent fill patterns +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var response = await fetch('/images/transparent50.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + var pattern = ctx.createPattern(img, 'repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#00f'; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); + t.done(); +}, "Shadows are drawn correctly for partially-transparent fill patterns"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.basic.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.basic.html new file mode 100644 index 0000000000..4e372c0932 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.basic.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.shadow.pattern.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.pattern.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are drawn for fill patterns

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.basic.worker.js new file mode 100644 index 0000000000..7a8f7e8479 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.basic.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.pattern.basic +// Description:Shadows are drawn for fill patterns +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var response = await fetch('/images/red.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + var pattern = ctx.createPattern(img, 'repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}, "Shadows are drawn for fill patterns"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.html new file mode 100644 index 0000000000..72fa7b29f8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.shadow.pattern.transparent.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.pattern.transparent.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are not drawn for transparent fill patterns

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.worker.js new file mode 100644 index 0000000000..8414db6d08 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.pattern.transparent.1 +// Description:Shadows are not drawn for transparent fill patterns +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var response = await fetch('/images/transparent.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + var pattern = ctx.createPattern(img, 'repeat'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#f00'; + ctx.shadowOffsetY = 50; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}, "Shadows are not drawn for transparent fill patterns"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.2.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.2.html new file mode 100644 index 0000000000..6ad8ece009 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.2.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.shadow.pattern.transparent.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.pattern.transparent.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are not drawn for transparent parts of fill patterns

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.2.worker.js new file mode 100644 index 0000000000..726a42d6cd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.2.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.pattern.transparent.2 +// Description:Shadows are not drawn for transparent parts of fill patterns +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var response = await fetch('/images/redtransparent.png') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + var pattern = ctx.createPattern(img, 'repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}, "Shadows are not drawn for transparent parts of fill patterns"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.basic.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.basic.html new file mode 100644 index 0000000000..c569865a60 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.basic.html @@ -0,0 +1,40 @@ + + +OffscreenCanvas test: 2d.shadow.stroke.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.stroke.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are drawn for strokes

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.basic.worker.js new file mode 100644 index 0000000000..9d7d0ec321 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.basic.worker.js @@ -0,0 +1,35 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.stroke.basic +// Description:Shadows are drawn for strokes +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows are drawn for strokes"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.beginPath(); + ctx.lineWidth = 50; + ctx.moveTo(0, -25); + ctx.lineTo(100, -25); + ctx.stroke(); + + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.1.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.1.html new file mode 100644 index 0000000000..b170f88cf6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.1.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.shadow.stroke.cap.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.stroke.cap.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are not drawn for areas outside stroke caps

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.1.worker.js new file mode 100644 index 0000000000..582915d28b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.1.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.stroke.cap.1 +// Description:Shadows are not drawn for areas outside stroke caps +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows are not drawn for areas outside stroke caps"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#f00'; + ctx.shadowOffsetY = 50; + ctx.beginPath(); + ctx.lineWidth = 50; + ctx.lineCap = 'butt'; + ctx.moveTo(-50, -25); + ctx.lineTo(0, -25); + ctx.moveTo(100, -25); + ctx.lineTo(150, -25); + ctx.stroke(); + + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.2.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.2.html new file mode 100644 index 0000000000..8bbb016bd5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.2.html @@ -0,0 +1,41 @@ + + +OffscreenCanvas test: 2d.shadow.stroke.cap.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.stroke.cap.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are drawn for stroke caps

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.2.worker.js new file mode 100644 index 0000000000..13108bec9e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.2.worker.js @@ -0,0 +1,36 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.stroke.cap.2 +// Description:Shadows are drawn for stroke caps +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows are drawn for stroke caps"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.beginPath(); + ctx.lineWidth = 50; + ctx.lineCap = 'square'; + ctx.moveTo(25, -25); + ctx.lineTo(75, -25); + ctx.stroke(); + + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.1.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.1.html new file mode 100644 index 0000000000..f0ef2d250e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.1.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.shadow.stroke.join.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.stroke.join.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are not drawn for areas outside stroke joins

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.1.worker.js new file mode 100644 index 0000000000..0cc1b5f196 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.1.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.stroke.join.1 +// Description:Shadows are not drawn for areas outside stroke joins +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows are not drawn for areas outside stroke joins"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#f00'; + ctx.shadowOffsetX = 100; + ctx.lineWidth = 200; + ctx.lineJoin = 'bevel'; + ctx.beginPath(); + ctx.moveTo(-200, -50); + ctx.lineTo(-150, -50); + ctx.lineTo(-151, -100); + ctx.stroke(); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 48,48, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.2.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.2.html new file mode 100644 index 0000000000..f2800aa19a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.2.html @@ -0,0 +1,45 @@ + + +OffscreenCanvas test: 2d.shadow.stroke.join.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.stroke.join.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are drawn for stroke joins

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.2.worker.js new file mode 100644 index 0000000000..925f65a28e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.2.worker.js @@ -0,0 +1,40 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.stroke.join.2 +// Description:Shadows are drawn for stroke joins +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows are drawn for stroke joins"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 100; + ctx.lineWidth = 200; + ctx.lineJoin = 'miter'; + ctx.beginPath(); + ctx.moveTo(-200, -50); + ctx.lineTo(-150, -50); + ctx.lineTo(-151, -100); + ctx.stroke(); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 48,48, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.3.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.3.html new file mode 100644 index 0000000000..390e6a8048 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.3.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.shadow.stroke.join.3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.stroke.join.3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows are drawn for stroke joins respecting miter limit

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.3.worker.js new file mode 100644 index 0000000000..827a6d6662 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.3.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.stroke.join.3 +// Description:Shadows are drawn for stroke joins respecting miter limit +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows are drawn for stroke joins respecting miter limit"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#f00'; + ctx.shadowOffsetX = 100; + ctx.lineWidth = 200; + ctx.lineJoin = 'miter'; + ctx.miterLimit = 0.1; + ctx.beginPath(); + ctx.moveTo(-200, -50); + ctx.lineTo(-150, -50); + ctx.lineTo(-151, -100); // (not an exact right angle, to avoid some other bug in Firefox 3) + ctx.stroke(); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 48,48, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.transform.1.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.transform.1.html new file mode 100644 index 0000000000..23946b20a5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.transform.1.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.shadow.transform.1 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.transform.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadows take account of transformations

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.transform.1.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.transform.1.worker.js new file mode 100644 index 0000000000..6ac8da4c97 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.transform.1.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.transform.1 +// Description:Shadows take account of transformations +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadows take account of transformations"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.translate(100, 100); + ctx.fillRect(-100, -150, 100, 50); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.transform.2.html b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.transform.2.html new file mode 100644 index 0000000000..edcd20bdca --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.transform.2.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.shadow.transform.2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.shadow.transform.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Shadow offsets are not affected by transformations

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.transform.2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.transform.2.worker.js new file mode 100644 index 0000000000..e9e745a2ab --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/shadows/2d.shadow.transform.2.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.shadow.transform.2 +// Description:Shadow offsets are not affected by transformations +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Shadow offsets are not affected by transformations"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.rotate(Math.PI) + ctx.fillRect(-100, 0, 100, 50); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.align.default.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.align.default.html new file mode 100644 index 0000000000..7af2c772f0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.align.default.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.text.align.default + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.align.default

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.align.default.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.align.default.worker.js new file mode 100644 index 0000000000..adee16c062 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.align.default.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.align.default +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.align.invalid.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.align.invalid.html new file mode 100644 index 0000000000..a7679d656e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.align.invalid.html @@ -0,0 +1,41 @@ + + +OffscreenCanvas test: 2d.text.align.invalid + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.align.invalid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.align.invalid.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.align.invalid.worker.js new file mode 100644 index 0000000000..dfd4c66256 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.align.invalid.worker.js @@ -0,0 +1,36 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.align.invalid +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.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(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.align.valid.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.align.valid.html new file mode 100644 index 0000000000..eef6b29633 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.align.valid.html @@ -0,0 +1,40 @@ + + +OffscreenCanvas test: 2d.text.align.valid + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.align.valid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.align.valid.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.align.valid.worker.js new file mode 100644 index 0000000000..767d6425e7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.align.valid.worker.js @@ -0,0 +1,35 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.align.valid +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.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(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.baseline.default.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.baseline.default.html new file mode 100644 index 0000000000..525a02ff9b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.baseline.default.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.text.baseline.default + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.baseline.default

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.baseline.default.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.baseline.default.worker.js new file mode 100644 index 0000000000..667adb8c51 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.baseline.default.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.baseline.default +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.textBaseline, 'alphabetic', "ctx.textBaseline", "'alphabetic'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.baseline.invalid.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.baseline.invalid.html new file mode 100644 index 0000000000..f30fad63b5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.baseline.invalid.html @@ -0,0 +1,41 @@ + + +OffscreenCanvas test: 2d.text.baseline.invalid + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.baseline.invalid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.baseline.invalid.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.baseline.invalid.worker.js new file mode 100644 index 0000000000..4310f81fba --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.baseline.invalid.worker.js @@ -0,0 +1,36 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.baseline.invalid +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.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(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.baseline.valid.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.baseline.valid.html new file mode 100644 index 0000000000..9ff843c19f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.baseline.valid.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.text.baseline.valid + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.baseline.valid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.baseline.valid.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.baseline.valid.worker.js new file mode 100644 index 0000000000..2f422f58a8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.baseline.valid.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.baseline.valid +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.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(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.center.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.center.html new file mode 100644 index 0000000000..0f7a2f4a02 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.center.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.text.draw.align.center + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.align.center

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  textAlign center is the center of the em squares (not the bounding box)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.center.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.center.worker.js new file mode 100644 index 0000000000..44f093cdac --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.center.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/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("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'center'; + ctx.fillText('DD', 50, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + t.done(); +}, "textAlign center is the center of the em squares (not the bounding box)"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.end.ltr.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.end.ltr.html new file mode 100644 index 0000000000..a9e6dfe901 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.end.ltr.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.text.draw.align.end.ltr + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.align.end.ltr

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  textAlign end with ltr is the right edge

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.end.ltr.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.end.ltr.worker.js new file mode 100644 index 0000000000..4bd0f5a314 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.end.ltr.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/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("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'end'; + ctx.fillText('DD', 100, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + t.done(); +}, "textAlign end with ltr is the right edge"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.end.rtl.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.end.rtl.html new file mode 100644 index 0000000000..b0d0b66a9c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.end.rtl.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.text.draw.align.end.rtl + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.align.end.rtl

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  textAlign end with rtl is the left edge

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.end.rtl.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.end.rtl.worker.js new file mode 100644 index 0000000000..b3e62d8538 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.end.rtl.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/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("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '50px CanvasTest'; + ctx.direction = 'rtl'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'end'; + ctx.fillText('DD', 0, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + t.done(); +}, "textAlign end with rtl is the left edge"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.left.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.left.html new file mode 100644 index 0000000000..563596d757 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.left.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.text.draw.align.left + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.align.left

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  textAlign left is the left of the first em square (not the bounding box)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.left.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.left.worker.js new file mode 100644 index 0000000000..c7dc0bed42 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.left.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/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("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'left'; + ctx.fillText('DD', 0, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + t.done(); +}, "textAlign left is the left of the first em square (not the bounding box)"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.right.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.right.html new file mode 100644 index 0000000000..227a8f981f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.right.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.text.draw.align.right + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.align.right

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  textAlign right is the right of the last em square (not the bounding box)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.right.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.right.worker.js new file mode 100644 index 0000000000..58fe85e0b7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.right.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/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("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'right'; + ctx.fillText('DD', 100, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + t.done(); +}, "textAlign right is the right of the last em square (not the bounding box)"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.start.ltr.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.start.ltr.html new file mode 100644 index 0000000000..bd7e69451d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.start.ltr.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.text.draw.align.start.ltr + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.align.start.ltr

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  textAlign start with ltr is the left edge

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.start.ltr.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.start.ltr.worker.js new file mode 100644 index 0000000000..c0793d9af6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.start.ltr.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/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("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'start'; + ctx.fillText('DD', 0, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + t.done(); +}, "textAlign start with ltr is the left edge"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.start.rtl.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.start.rtl.html new file mode 100644 index 0000000000..cadc8a4644 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.start.rtl.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.text.draw.align.start.rtl + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.align.start.rtl

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  textAlign start with rtl is the right edge

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.start.rtl.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.start.rtl.worker.js new file mode 100644 index 0000000000..ed706c287a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.align.start.rtl.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/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("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '50px CanvasTest'; + ctx.direction = 'rtl'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'start'; + ctx.fillText('DD', 100, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + t.done(); +}, "textAlign start with rtl is the right edge"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.alphabetic.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.alphabetic.html new file mode 100644 index 0000000000..ff72b3219d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.alphabetic.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.text.draw.baseline.alphabetic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.baseline.alphabetic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.alphabetic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.alphabetic.worker.js new file mode 100644 index 0000000000..a98a5863d9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.alphabetic.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.draw.baseline.alphabetic +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textBaseline = 'alphabetic'; + ctx.fillText('CC', 0, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.bottom.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.bottom.html new file mode 100644 index 0000000000..f75a94243d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.bottom.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.text.draw.baseline.bottom + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.baseline.bottom

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  textBaseline bottom is the bottom of the em square (not the bounding box)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.bottom.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.bottom.worker.js new file mode 100644 index 0000000000..30f60c574b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.bottom.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/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("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textBaseline = 'bottom'; + ctx.fillText('CC', 0, 50); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + t.done(); +}, "textBaseline bottom is the bottom of the em square (not the bounding box)"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.html new file mode 100644 index 0000000000..a29db78385 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.text.draw.baseline.hanging + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.baseline.hanging

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.worker.js new file mode 100644 index 0000000000..638506a279 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.draw.baseline.hanging +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textBaseline = 'hanging'; + ctx.fillText('CC', 0, 12.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.html new file mode 100644 index 0000000000..6bda1b4f30 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.text.draw.baseline.ideographic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.baseline.ideographic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.worker.js new file mode 100644 index 0000000000..7c682fb5f1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.draw.baseline.ideographic +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textBaseline = 'ideographic'; + ctx.fillText('CC', 0, 31.25); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.middle.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.middle.html new file mode 100644 index 0000000000..b0186e6549 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.middle.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.text.draw.baseline.middle + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.baseline.middle

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  textBaseline middle is the middle of the em square (not the bounding box)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.middle.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.middle.worker.js new file mode 100644 index 0000000000..c373ab6c72 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.middle.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/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("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textBaseline = 'middle'; + ctx.fillText('CC', 0, 25); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + t.done(); +}, "textBaseline middle is the middle of the em square (not the bounding box)"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.top.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.top.html new file mode 100644 index 0000000000..163d27dec7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.top.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.text.draw.baseline.top + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.baseline.top

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  textBaseline top is the top of the em square (not the bounding box)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.top.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.top.worker.js new file mode 100644 index 0000000000..effc4418c3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.baseline.top.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/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("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textBaseline = 'top'; + ctx.fillText('CC', 0, 0); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + t.done(); +}, "textBaseline top is the top of the em square (not the bounding box)"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.basic-manual.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.basic-manual.html new file mode 100644 index 0000000000..af1cb9d94a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.basic-manual.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.text.draw.fill.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.fill.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fillText draws filled text

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.basic-manual.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.basic-manual.worker.js new file mode 100644 index 0000000000..ef00236fbb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.basic-manual.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.draw.fill.basic +// Description:fillText draws filled text +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fillText draws filled text"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.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(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.basic.png b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.basic.png new file mode 100644 index 0000000000..70d7b046cb Binary files /dev/null and b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.basic.png differ diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.NaN.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.NaN.html new file mode 100644 index 0000000000..8f22b9f093 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.NaN.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.text.draw.fill.maxWidth.NaN + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.fill.maxWidth.NaN

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fillText handles maxWidth correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.NaN.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.NaN.worker.js new file mode 100644 index 0000000000..fd1dff136e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.NaN.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/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("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fillText handles maxWidth correctly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.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(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.bound.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.bound.html new file mode 100644 index 0000000000..2dca5a75ef --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.bound.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.text.draw.fill.maxWidth.bound + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.fill.maxWidth.bound

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fillText handles maxWidth based on line size, not bounding box size

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.bound.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.bound.worker.js new file mode 100644 index 0000000000..adcb45faaa --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.bound.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/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("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('DD', 0, 37.5, 100); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + t.done(); +}, "fillText handles maxWidth based on line size, not bounding box size"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.fontface.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.fontface.html new file mode 100644 index 0000000000..fa7277ed7a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.fontface.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.text.draw.fill.maxWidth.fontface + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.fill.maxWidth.fontface

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fillText works on @font-face fonts

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.fontface.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.fontface.worker.js new file mode 100644 index 0000000000..8df519b7d1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.fontface.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/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("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillText('EEEE', -50, 37.5, 40); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + t.done(); +}, "fillText works on @font-face fonts"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.large-manual.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.large-manual.html new file mode 100644 index 0000000000..7a0cf11b39 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.large-manual.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.text.draw.fill.maxWidth.large + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.fill.maxWidth.large

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fillText handles maxWidth correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.large-manual.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.large-manual.worker.js new file mode 100644 index 0000000000..3e200e89ed --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.large-manual.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/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("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fillText handles maxWidth correctly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.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(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.large.png b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.large.png new file mode 100644 index 0000000000..70d7b046cb Binary files /dev/null and b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.large.png differ diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.negative.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.negative.html new file mode 100644 index 0000000000..4411fbfced --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.negative.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.text.draw.fill.maxWidth.negative + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.fill.maxWidth.negative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fillText handles maxWidth correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.negative.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.negative.worker.js new file mode 100644 index 0000000000..50076b524c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.negative.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/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("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fillText handles maxWidth correctly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.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(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.small.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.small.html new file mode 100644 index 0000000000..94988fc92e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.small.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.text.draw.fill.maxWidth.small + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.fill.maxWidth.small

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fillText handles maxWidth correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.small.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.small.worker.js new file mode 100644 index 0000000000..5d5ef4e391 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.small.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/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("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fillText handles maxWidth correctly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.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(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.zero.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.zero.html new file mode 100644 index 0000000000..a789a84dbe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.zero.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.text.draw.fill.maxWidth.zero + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.fill.maxWidth.zero

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fillText handles maxWidth correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.zero.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.zero.worker.js new file mode 100644 index 0000000000..7dea281f98 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.zero.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/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("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fillText handles maxWidth correctly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.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(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.rtl-manual.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.rtl-manual.html new file mode 100644 index 0000000000..98e329b054 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.rtl-manual.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.text.draw.fill.rtl + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.fill.rtl

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fillText respects Right-To-Left Override characters

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.rtl-manual.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.rtl-manual.worker.js new file mode 100644 index 0000000000..ee24a0450f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.rtl-manual.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/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("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fillText respects Right-To-Left Override characters"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.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(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.rtl.png b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.rtl.png new file mode 100644 index 0000000000..70d7b046cb Binary files /dev/null and b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.rtl.png differ diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.unaffected.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.unaffected.html new file mode 100644 index 0000000000..7124c6eafd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.unaffected.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.text.draw.fill.unaffected + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.fill.unaffected

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fillText does not start a new path or subpath

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.unaffected.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.unaffected.worker.js new file mode 100644 index 0000000000..0e250286d4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fill.unaffected.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/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("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("fillText does not start a new path or subpath"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.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(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 5,45, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.html new file mode 100644 index 0000000000..5d4f93b4f3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.text.draw.fontface + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.fontface

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.notinpage.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.notinpage.html new file mode 100644 index 0000000000..82c9b31e66 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.notinpage.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.text.draw.fontface.notinpage + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.fontface.notinpage

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @font-face fonts should work even if they are not used in the page

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.notinpage.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.notinpage.worker.js new file mode 100644 index 0000000000..628cb39506 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.notinpage.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/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("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '67px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('AA', 0, 50); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + t.done(); +}, "@font-face fonts should work even if they are not used in the page"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.repeat.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.repeat.html new file mode 100644 index 0000000000..1a6ba78fb9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.repeat.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.text.draw.fontface.repeat + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.fontface.repeat

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Draw with the font immediately, then wait a bit until and draw again. (This crashes some version of WebKit.)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.repeat.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.repeat.worker.js new file mode 100644 index 0000000000..7567c09558 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.repeat.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/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("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.font = '67px CanvasTest'; + ctx.fillStyle = '#0f0'; + ctx.fillText('AA', 0, 50); + + await new Promise(resolve => t.step_timeout(resolve, 500)); + ctx.fillText('AA', 0, 50); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + t.done(); +}, "Draw with the font immediately, then wait a bit until and draw again. (This crashes some version of WebKit.)"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.worker.js new file mode 100644 index 0000000000..02257f0a06 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.fontface.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.draw.fontface +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '67px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('AA', 0, 50); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + t.done(); +}, ""); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.kern.consistent-manual.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.kern.consistent-manual.html new file mode 100644 index 0000000000..de456a2b96 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.kern.consistent-manual.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.text.draw.kern.consistent + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.kern.consistent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Stroked and filled text should have exactly the same kerning so it overlaps

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.kern.consistent-manual.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.kern.consistent-manual.worker.js new file mode 100644 index 0000000000..0d1c9470ee --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.kern.consistent-manual.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/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("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Stroked and filled text should have exactly the same kerning so it overlaps"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.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(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.basic.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.basic.html new file mode 100644 index 0000000000..55828fc72c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.basic.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.text.draw.space.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.space.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  U+0020 is rendered the correct size (1em wide)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.basic.worker.js new file mode 100644 index 0000000000..ef09925c55 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.basic.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/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("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('E EE', -100, 37.5); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + t.done(); +}, "U+0020 is rendered the correct size (1em wide)"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.end.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.end.html new file mode 100644 index 0000000000..f00a187e23 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.end.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.text.draw.space.collapse.end + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.space.collapse.end

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Space characters at the end of a line are NOT collapsed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.end.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.end.worker.js new file mode 100644 index 0000000000..9a9afa1e74 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.end.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.draw.space.collapse.end +// Description:Space characters at the end of a line are NOT collapsed +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'right'; + ctx.fillText('EE ', 100, 37.5); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 255,0,0,255, 2); + t.done(); +}, "Space characters at the end of a line are NOT collapsed"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.nonspace.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.nonspace.html new file mode 100644 index 0000000000..792abe4deb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.nonspace.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.text.draw.space.collapse.nonspace + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.space.collapse.nonspace

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Non-space characters are not converted to U+0020 and collapsed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.nonspace.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.nonspace.worker.js new file mode 100644 index 0000000000..a12c2f9a48 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.nonspace.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/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("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('E\x0b EE', -150, 37.5); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + t.done(); +}, "Non-space characters are not converted to U+0020 and collapsed"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.other.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.other.html new file mode 100644 index 0000000000..83e89270f9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.other.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.text.draw.space.collapse.other + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.space.collapse.other

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Space characters are converted to U+0020, and are NOT collapsed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.other.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.other.worker.js new file mode 100644 index 0000000000..bbf9e684be --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.other.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.draw.space.collapse.other +// Description:Space characters are converted to U+0020, and are NOT collapsed +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('E \x09\x0a\x0c\x0d \x09\x0a\x0c\x0dEE', 0, 37.5); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 255,0,0,255, 2); + t.done(); +}, "Space characters are converted to U+0020, and are NOT collapsed"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.space.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.space.html new file mode 100644 index 0000000000..5fc96ffd7d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.space.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.text.draw.space.collapse.space + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.space.collapse.space

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Space characters are converted to U+0020, and are NOT collapsed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.space.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.space.worker.js new file mode 100644 index 0000000000..e5ab7b67f4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.space.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.draw.space.collapse.space +// Description:Space characters are converted to U+0020, and are NOT collapsed +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('E EE', 0, 37.5); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 255,0,0,255, 2); + t.done(); +}, "Space characters are converted to U+0020, and are NOT collapsed"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.start.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.start.html new file mode 100644 index 0000000000..c07994360d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.start.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.text.draw.space.collapse.start + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.space.collapse.start

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Space characters at the start of a line are NOT collapsed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.start.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.start.worker.js new file mode 100644 index 0000000000..20fec7801f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.start.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.draw.space.collapse.start +// Description:Space characters at the start of a line are NOT collapsed +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText(' EE', 0, 37.5); + _assertPixelApprox(canvas, 25,25, 255,0,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + t.done(); +}, "Space characters at the start of a line are NOT collapsed"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.stroke.basic-manual.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.stroke.basic-manual.html new file mode 100644 index 0000000000..62ac8884cb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.stroke.basic-manual.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.text.draw.stroke.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.stroke.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  strokeText draws stroked text

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.stroke.basic-manual.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.stroke.basic-manual.worker.js new file mode 100644 index 0000000000..33d6e32467 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.stroke.basic-manual.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.draw.stroke.basic +// Description:strokeText draws stroked text +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("strokeText draws stroked text"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.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(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.stroke.basic.png b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.stroke.basic.png new file mode 100644 index 0000000000..fb3b5b830d Binary files /dev/null and b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.stroke.basic.png differ diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.stroke.unaffected.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.stroke.unaffected.html new file mode 100644 index 0000000000..76afc1b006 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.stroke.unaffected.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.text.draw.stroke.unaffected + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.draw.stroke.unaffected

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  strokeText does not start a new path or subpath

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.stroke.unaffected.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.stroke.unaffected.worker.js new file mode 100644 index 0000000000..15c3b61700 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.draw.stroke.unaffected.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/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("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("strokeText does not start a new path or subpath"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.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(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 5,45, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.absolute.spacing.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.absolute.spacing.html new file mode 100644 index 0000000000..965d451020 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.absolute.spacing.html @@ -0,0 +1,46 @@ + + +OffscreenCanvas test: 2d.text.drawing.style.absolute.spacing + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.drawing.style.absolute.spacing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing letter spacing and word spacing with absolute length

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.absolute.spacing.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.absolute.spacing.worker.js new file mode 100644 index 0000000000..2b42b3e477 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.absolute.spacing.worker.js @@ -0,0 +1,41 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.drawing.style.absolute.spacing +// Description:Testing letter spacing and word spacing with absolute length +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Testing letter spacing and word spacing with absolute length"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + + ctx.letterSpacing = '3px'; + _assertSame(ctx.letterSpacing, '3px', "ctx.letterSpacing", "'3px'"); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + + ctx.wordSpacing = '5px'; + _assertSame(ctx.letterSpacing, '3px', "ctx.letterSpacing", "'3px'"); + _assertSame(ctx.wordSpacing, '5px', "ctx.wordSpacing", "'5px'"); + + ctx.letterSpacing = '-1px'; + ctx.wordSpacing = '-1px'; + _assertSame(ctx.letterSpacing, '-1px', "ctx.letterSpacing", "'-1px'"); + _assertSame(ctx.wordSpacing, '-1px', "ctx.wordSpacing", "'-1px'"); + + ctx.letterSpacing = '1PX'; + ctx.wordSpacing = '10PX'; + _assertSame(ctx.letterSpacing, '1px', "ctx.letterSpacing", "'1px'"); + _assertSame(ctx.wordSpacing, '10px', "ctx.wordSpacing", "'10px'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.font-relative.spacing.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.font-relative.spacing.html new file mode 100644 index 0000000000..a3f0f7133e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.font-relative.spacing.html @@ -0,0 +1,38 @@ + + +OffscreenCanvas test: 2d.text.drawing.style.font-relative.spacing + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.drawing.style.font-relative.spacing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing letter spacing and word spacing with font-relative length

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.font-relative.spacing.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.font-relative.spacing.worker.js new file mode 100644 index 0000000000..cd653208e8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.font-relative.spacing.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.drawing.style.font-relative.spacing +// Description:Testing letter spacing and word spacing with font-relative length +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Testing letter spacing and word spacing with font-relative length"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + + ctx.letterSpacing = '1EX'; + ctx.wordSpacing = '1EM'; + _assertSame(ctx.letterSpacing, '1ex', "ctx.letterSpacing", "'1ex'"); + _assertSame(ctx.wordSpacing, '1em', "ctx.wordSpacing", "'1em'"); + + ctx.letterSpacing = '1ch'; + ctx.wordSpacing = '1ic'; + _assertSame(ctx.letterSpacing, '1ch', "ctx.letterSpacing", "'1ch'"); + _assertSame(ctx.wordSpacing, '1ic', "ctx.wordSpacing", "'1ic'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.html new file mode 100644 index 0000000000..23f353513b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.text.drawing.style.fontKerning + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.drawing.style.fontKerning

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing basic functionalities of fontKerning for canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.with.uppercase.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.with.uppercase.html new file mode 100644 index 0000000000..7f6b57921e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.with.uppercase.html @@ -0,0 +1,58 @@ + + +OffscreenCanvas test: 2d.text.drawing.style.fontKerning.with.uppercase + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.drawing.style.fontKerning.with.uppercase

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing basic functionalities of fontKerning for canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.with.uppercase.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.with.uppercase.worker.js new file mode 100644 index 0000000000..4e0f32c692 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.with.uppercase.worker.js @@ -0,0 +1,53 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.drawing.style.fontKerning.with.uppercase +// Description:Testing basic functionalities of fontKerning for canvas +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Testing basic functionalities of fontKerning for canvas"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.fontKerning, "auto", "ctx.fontKerning", "\"auto\""); + ctx.fontKerning = "Normal"; + _assertSame(ctx.fontKerning, "auto", "ctx.fontKerning", "\"auto\""); + ctx.fontKerning = "normal"; + _assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); + ctx.fontKerning = "Auto"; + _assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); + ctx.fontKerning = "auto"; + ctx.fontKerning = "noRmal"; + _assertSame(ctx.fontKerning, "auto", "ctx.fontKerning", "\"auto\""); + ctx.fontKerning = "auto"; + ctx.fontKerning = "NoRMal"; + _assertSame(ctx.fontKerning, "auto", "ctx.fontKerning", "\"auto\""); + ctx.fontKerning = "auto"; + ctx.fontKerning = "NORMAL"; + _assertSame(ctx.fontKerning, "auto", "ctx.fontKerning", "\"auto\""); + + ctx.fontKerning = "None"; + _assertSame(ctx.fontKerning, "auto", "ctx.fontKerning", "\"auto\""); + ctx.fontKerning = "none"; + _assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); + ctx.fontKerning = "Auto"; + _assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); + ctx.fontKerning = "auto"; + ctx.fontKerning = "nOne"; + _assertSame(ctx.fontKerning, "auto", "ctx.fontKerning", "\"auto\""); + ctx.fontKerning = "auto"; + ctx.fontKerning = "nonE"; + _assertSame(ctx.fontKerning, "auto", "ctx.fontKerning", "\"auto\""); + ctx.fontKerning = "auto"; + ctx.fontKerning = "NONE"; + _assertSame(ctx.fontKerning, "auto", "ctx.fontKerning", "\"auto\""); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.worker.js new file mode 100644 index 0000000000..ec64214c7f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.drawing.style.fontKerning +// Description:Testing basic functionalities of fontKerning for canvas +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Testing basic functionalities of fontKerning for canvas"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.fontKerning, "auto", "ctx.fontKerning", "\"auto\""); + ctx.fontKerning = "normal"; + _assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); + width_normal = ctx.measureText("TAWATAVA").width; + ctx.fontKerning = "none"; + _assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); + width_none = ctx.measureText("TAWATAVA").width; + _assert(width_normal < width_none, "width_normal < width_none"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontStretch.settings.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontStretch.settings.html new file mode 100644 index 0000000000..95405a18a5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontStretch.settings.html @@ -0,0 +1,82 @@ + + +OffscreenCanvas test: 2d.text.drawing.style.fontStretch.settings + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.drawing.style.fontStretch.settings

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing value setting of fontStretch in Canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontStretch.settings.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontStretch.settings.worker.js new file mode 100644 index 0000000000..ff10a742b5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontStretch.settings.worker.js @@ -0,0 +1,77 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.drawing.style.fontStretch.settings +// Description:Testing value setting of fontStretch in Canvas +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Testing value setting of fontStretch in Canvas"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + // Setting textRendering with lower cases + ctx.fontStretch = "ultra-condensed"; + _assertSame(ctx.fontStretch, "ultra-condensed", "ctx.fontStretch", "\"ultra-condensed\""); + + ctx.fontStretch = "extra-condensed"; + _assertSame(ctx.fontStretch, "extra-condensed", "ctx.fontStretch", "\"extra-condensed\""); + + ctx.fontStretch = "condensed"; + _assertSame(ctx.fontStretch, "condensed", "ctx.fontStretch", "\"condensed\""); + + ctx.fontStretch = "semi-condensed"; + _assertSame(ctx.fontStretch, "semi-condensed", "ctx.fontStretch", "\"semi-condensed\""); + + ctx.fontStretch = "normal"; + _assertSame(ctx.fontStretch, "normal", "ctx.fontStretch", "\"normal\""); + + ctx.fontStretch = "semi-expanded"; + _assertSame(ctx.fontStretch, "semi-expanded", "ctx.fontStretch", "\"semi-expanded\""); + + ctx.fontStretch = "expanded"; + _assertSame(ctx.fontStretch, "expanded", "ctx.fontStretch", "\"expanded\""); + + ctx.fontStretch = "extra-expanded"; + _assertSame(ctx.fontStretch, "extra-expanded", "ctx.fontStretch", "\"extra-expanded\""); + + ctx.fontStretch = "ultra-expanded"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + // Setting fontStretch with lower cases and upper cases word, + // these values should be ignored. + ctx.fontStretch = "ulTra-condensed"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "Extra-condensed"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "cOndensed"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "Semi-Condensed"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "normaL"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "semi-Expanded"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "Expanded"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "eXtra-expanded"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "abcd"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontVariant.settings.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontVariant.settings.html new file mode 100644 index 0000000000..9756d095ba --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontVariant.settings.html @@ -0,0 +1,79 @@ + + +OffscreenCanvas test: 2d.text.drawing.style.fontVariant.settings + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.drawing.style.fontVariant.settings

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing basic functionalities of fontVariant for canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontVariant.settings.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontVariant.settings.worker.js new file mode 100644 index 0000000000..30c78388ae --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontVariant.settings.worker.js @@ -0,0 +1,74 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.drawing.style.fontVariant.settings +// Description:Testing basic functionalities of fontVariant for canvas +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Testing basic functionalities of fontVariant for canvas"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + // Setting fontVariantCaps with lower cases + _assertSame(ctx.fontVariantCaps, "normal", "ctx.fontVariantCaps", "\"normal\""); + + ctx.fontVariantCaps = "normal"; + _assertSame(ctx.fontVariantCaps, "normal", "ctx.fontVariantCaps", "\"normal\""); + + ctx.fontVariantCaps = "small-caps"; + _assertSame(ctx.fontVariantCaps, "small-caps", "ctx.fontVariantCaps", "\"small-caps\""); + + ctx.fontVariantCaps = "all-small-caps"; + _assertSame(ctx.fontVariantCaps, "all-small-caps", "ctx.fontVariantCaps", "\"all-small-caps\""); + + ctx.fontVariantCaps = "petite-caps"; + _assertSame(ctx.fontVariantCaps, "petite-caps", "ctx.fontVariantCaps", "\"petite-caps\""); + + ctx.fontVariantCaps = "all-petite-caps"; + _assertSame(ctx.fontVariantCaps, "all-petite-caps", "ctx.fontVariantCaps", "\"all-petite-caps\""); + + ctx.fontVariantCaps = "unicase"; + _assertSame(ctx.fontVariantCaps, "unicase", "ctx.fontVariantCaps", "\"unicase\""); + + ctx.fontVariantCaps = "titling-caps"; + _assertSame(ctx.fontVariantCaps, "titling-caps", "ctx.fontVariantCaps", "\"titling-caps\""); + + // Setting fontVariantCaps with mixed-case values is not valid + ctx.fontVariantCaps = "nORmal"; + _assertSame(ctx.fontVariantCaps, "titling-caps", "ctx.fontVariantCaps", "\"titling-caps\""); + + ctx.fontVariantCaps = "normal"; + _assertSame(ctx.fontVariantCaps, "normal", "ctx.fontVariantCaps", "\"normal\""); + + ctx.fontVariantCaps = "smaLL-caps"; + _assertSame(ctx.fontVariantCaps, "normal", "ctx.fontVariantCaps", "\"normal\""); + + ctx.fontVariantCaps = "all-small-CAPS"; + _assertSame(ctx.fontVariantCaps, "normal", "ctx.fontVariantCaps", "\"normal\""); + + ctx.fontVariantCaps = "pEtitE-caps"; + _assertSame(ctx.fontVariantCaps, "normal", "ctx.fontVariantCaps", "\"normal\""); + + ctx.fontVariantCaps = "All-Petite-Caps"; + _assertSame(ctx.fontVariantCaps, "normal", "ctx.fontVariantCaps", "\"normal\""); + + ctx.fontVariantCaps = "uNIcase"; + _assertSame(ctx.fontVariantCaps, "normal", "ctx.fontVariantCaps", "\"normal\""); + + ctx.fontVariantCaps = "titling-CAPS"; + _assertSame(ctx.fontVariantCaps, "normal", "ctx.fontVariantCaps", "\"normal\""); + + // Setting fontVariantCaps with non-existing font variant. + ctx.fontVariantCaps = "titling-caps"; + ctx.fontVariantCaps = "abcd"; + _assertSame(ctx.fontVariantCaps, "titling-caps", "ctx.fontVariantCaps", "\"titling-caps\""); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.invalid.spacing.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.invalid.spacing.html new file mode 100644 index 0000000000..d16b175ad6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.invalid.spacing.html @@ -0,0 +1,43 @@ + + +OffscreenCanvas test: 2d.text.drawing.style.invalid.spacing + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.drawing.style.invalid.spacing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing letter spacing and word spacing with invalid units

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.invalid.spacing.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.invalid.spacing.worker.js new file mode 100644 index 0000000000..06207b2c6c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.invalid.spacing.worker.js @@ -0,0 +1,38 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.drawing.style.invalid.spacing +// Description:Testing letter spacing and word spacing with invalid units +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Testing letter spacing and word spacing with invalid units"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + + function test_word_spacing(value) { + ctx.wordSpacing = value; + ctx.letterSpacing = value; + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + } + test_word_spacing('0s'); + test_word_spacing('1min'); + test_word_spacing('1deg'); + test_word_spacing('1pp'); + test_word_spacing('initial'); + test_word_spacing('inherit'); + test_word_spacing('normal'); + test_word_spacing('none'); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.change.font.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.change.font.html new file mode 100644 index 0000000000..f8b453418c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.change.font.html @@ -0,0 +1,46 @@ + + +OffscreenCanvas test: 2d.text.drawing.style.letterSpacing.change.font + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.drawing.style.letterSpacing.change.font

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Set letter spacing and word spacing to font dependent value and verify it works after font change.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.change.font.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.change.font.worker.js new file mode 100644 index 0000000000..510845c885 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.change.font.worker.js @@ -0,0 +1,41 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.drawing.style.letterSpacing.change.font +// Description:Set letter spacing and word spacing to font dependent value and verify it works after font change. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Set letter spacing and word spacing to font dependent value and verify it works after font change."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + // Get the width for 'Hello World' at default size, 10px. + var width_normal = ctx.measureText('Hello World').width; + + ctx.letterSpacing = '1em'; + _assertSame(ctx.letterSpacing, '1em', "ctx.letterSpacing", "'1em'"); + // 1em = 10px. Add 10px after each letter in "Hello World", + // makes it 110px longer. + var width_with_spacing = ctx.measureText('Hello World').width; + assert_approx_equals(width_with_spacing, width_normal + 110, 0.1, "letter-spacing error"); + + // Changing font to 20px. Without resetting the spacing, 1em letterSpacing + // is now 20px, so it's suppose to be 220px longer without any letterSpacing set. + ctx.font = '20px serif'; + width_with_spacing = ctx.measureText('Hello World').width; + // Now calculate the reference spacing for "Hello World" with no spacing. + ctx.letterSpacing = '0em'; + width_normal = ctx.measureText('Hello World').width; + assert_approx_equals(width_with_spacing, width_normal + 220, 0.1, "letter-spacing error after font change"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.measure.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.measure.html new file mode 100644 index 0000000000..a565770a16 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.measure.html @@ -0,0 +1,55 @@ + + +OffscreenCanvas test: 2d.text.drawing.style.letterSpacing.measure + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.drawing.style.letterSpacing.measure

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing letter spacing with different length units

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.measure.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.measure.worker.js new file mode 100644 index 0000000000..630bf1d486 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.measure.worker.js @@ -0,0 +1,50 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.drawing.style.letterSpacing.measure +// Description:Testing letter spacing with different length units +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Testing letter spacing with different length units"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + var width_normal = ctx.measureText('Hello World').width; + + function test_letter_spacing(value, difference_spacing, epsilon) { + ctx.letterSpacing = value; + _assertSame(ctx.letterSpacing, value, "ctx.letterSpacing", "value"); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + width_with_letter_spacing = ctx.measureText('Hello World').width; + assert_approx_equals(width_with_letter_spacing, width_normal + difference_spacing, epsilon, "letter spacing doesn't work."); + } + + // The first value is the letter Spacing to be set, the second value the + // change in length of string 'Hello World', note that there are 11 letters + // in 'hello world', so the length difference is always letterSpacing * 11. + // and the third value is the acceptable differencee for the length change, + // note that unit such as 1cm/1mm doesn't map to an exact pixel value. + test_cases = [['3px', 33, 0.1], + ['5px', 55, 0.1], + ['-2px', -22, 0.1], + ['1em', 110, 0.1], + ['-0.1em', -11, 0.1], + ['1in', 1056, 0.1], + ['-0.1cm', -41.65, 0.2], + ['-0.6mm', -24,95, 0.2]] + + for (const test_case of test_cases) { + test_letter_spacing(test_case[0], test_case[1], test_case[2]); + } + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.direction.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.direction.html new file mode 100644 index 0000000000..6c0b3756d3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.direction.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.text.drawing.style.measure.direction + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.drawing.style.measure.direction

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Measurement should follow text direction

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.direction.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.direction.worker.js new file mode 100644 index 0000000000..852f372101 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.direction.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.drawing.style.measure.direction +// Description:Measurement should follow text direction +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Measurement should follow text direction"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.direction = "ltr"; + metrics = ctx.measureText('hello'); + _assert(metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight"); + + ctx.direction = "rtl"; + metrics = ctx.measureText('hello'); + _assert(metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.rtl.text.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.rtl.text.html new file mode 100644 index 0000000000..335014cfd6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.rtl.text.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.text.drawing.style.measure.rtl.text + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.drawing.style.measure.rtl.text

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Measurement should follow canvas direction instead text direction

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.rtl.text.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.rtl.text.worker.js new file mode 100644 index 0000000000..09b0e9b8d0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.rtl.text.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.drawing.style.measure.rtl.text +// Description:Measurement should follow canvas direction instead text direction +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Measurement should follow canvas direction instead text direction"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + metrics = ctx.measureText('اَلْعَرَبِيَّةُ'); + _assert(metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight"); + + metrics = ctx.measureText('hello'); + _assert(metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.textAlign.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.textAlign.html new file mode 100644 index 0000000000..4c1ca193e5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.textAlign.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.text.drawing.style.measure.textAlign + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.drawing.style.measure.textAlign

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Measurement should be related to textAlignment

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.textAlign.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.textAlign.worker.js new file mode 100644 index 0000000000..bc6f167be5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.textAlign.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.drawing.style.measure.textAlign +// Description:Measurement should be related to textAlignment +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Measurement should be related to textAlignment"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.textAlign = "right"; + metrics = ctx.measureText('hello'); + _assert(metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight"); + + ctx.textAlign = "left" + metrics = ctx.measureText('hello'); + _assert(metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.html new file mode 100644 index 0000000000..48a592b839 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.html @@ -0,0 +1,38 @@ + + +OffscreenCanvas test: 2d.text.drawing.style.nonfinite.spacing + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.drawing.style.nonfinite.spacing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing letter spacing and word spacing with nonfinite inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.worker.js new file mode 100644 index 0000000000..4cf20b28c0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.drawing.style.nonfinite.spacing +// Description:Testing letter spacing and word spacing with nonfinite inputs +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Testing letter spacing and word spacing with nonfinite inputs"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + + function test_word_spacing(value) { + ctx.wordSpacing = value; + ctx.letterSpacing = value; + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + } + test_word_spacing(NaN); + test_word_spacing(Infinity); + test_word_spacing(-Infinity); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.textRendering.settings.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.textRendering.settings.html new file mode 100644 index 0000000000..52b34deaab --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.textRendering.settings.html @@ -0,0 +1,81 @@ + + +OffscreenCanvas test: 2d.text.drawing.style.textRendering.settings + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.drawing.style.textRendering.settings

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing basic functionalities of textRendering in Canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.textRendering.settings.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.textRendering.settings.worker.js new file mode 100644 index 0000000000..a4381963f7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.textRendering.settings.worker.js @@ -0,0 +1,76 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.drawing.style.textRendering.settings +// Description:Testing basic functionalities of textRendering in Canvas +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Testing basic functionalities of textRendering in Canvas"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + // Setting textRendering with correct case. + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + + ctx.textRendering = "optimizeSpeed"; + _assertSame(ctx.textRendering, "optimizeSpeed", "ctx.textRendering", "\"optimizeSpeed\""); + + ctx.textRendering = "optimizeLegibility"; + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + + ctx.textRendering = "geometricPrecision"; + _assertSame(ctx.textRendering, "geometricPrecision", "ctx.textRendering", "\"geometricPrecision\""); + + ctx.textRendering = "auto"; + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + + // Setting textRendering with incorrect case is ignored. + ctx.textRendering = "OPtimizeSpeed"; + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + + ctx.textRendering = "OPtimizELEgibility"; + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + + ctx.textRendering = "GeometricPrecision"; + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + + ctx.textRendering = "optimizespeed"; + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + + ctx.textRendering = "optimizelegibility"; + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + + ctx.textRendering = "geometricprecision"; + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + + ctx.textRendering = "optimizeLegibility"; + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + + ctx.textRendering = "AUTO"; + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + + ctx.textRendering = "Auto"; + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + + // Setting textRendering with non-existing font variant. + ctx.textRendering = "abcd"; + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + + ctx.textRendering = "normal"; + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + + ctx.textRendering = ""; + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + + ctx.textRendering = "auto"; + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.change.font.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.change.font.html new file mode 100644 index 0000000000..3df660ea3e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.change.font.html @@ -0,0 +1,46 @@ + + +OffscreenCanvas test: 2d.text.drawing.style.wordSpacing.change.font + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.drawing.style.wordSpacing.change.font

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Set word spacing and word spacing to font dependent value and verify it works after font change.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.change.font.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.change.font.worker.js new file mode 100644 index 0000000000..e1415ea287 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.change.font.worker.js @@ -0,0 +1,41 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.drawing.style.wordSpacing.change.font +// Description:Set word spacing and word spacing to font dependent value and verify it works after font change. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Set word spacing and word spacing to font dependent value and verify it works after font change."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + // Get the width for 'Hello World, again' at default size, 10px. + var width_normal = ctx.measureText('Hello World, again').width; + + ctx.wordSpacing = '1em'; + _assertSame(ctx.wordSpacing, '1em', "ctx.wordSpacing", "'1em'"); + // 1em = 10px. Add 10px after each word in "Hello World, again", + // makes it 20px longer. + var width_with_spacing = ctx.measureText('Hello World, again').width; + _assertSame(width_with_spacing, width_normal + 20, "width_with_spacing", "width_normal + 20"); + + // Changing font to 20px. Without resetting the spacing, 1em wordSpacing + // is now 20px, so it's suppose to be 40px longer without any wordSpacing set. + ctx.font = '20px serif'; + width_with_spacing = ctx.measureText('Hello World, again').width; + // Now calculate the reference spacing for "Hello World, again" with no spacing. + ctx.wordSpacing = '0em'; + width_normal = ctx.measureText('Hello World, again').width; + _assertSame(width_with_spacing, width_normal + 40, "width_with_spacing", "width_normal + 40"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.measure.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.measure.html new file mode 100644 index 0000000000..7a1d867d0f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.measure.html @@ -0,0 +1,55 @@ + + +OffscreenCanvas test: 2d.text.drawing.style.wordSpacing.measure + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.drawing.style.wordSpacing.measure

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing word spacing with different length units

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.measure.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.measure.worker.js new file mode 100644 index 0000000000..b7acecb0eb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.measure.worker.js @@ -0,0 +1,50 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.drawing.style.wordSpacing.measure +// Description:Testing word spacing with different length units +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Testing word spacing with different length units"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + var width_normal = ctx.measureText('Hello World, again').width; + + function test_word_spacing(value, difference_spacing, epsilon) { + ctx.wordSpacing = value; + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + _assertSame(ctx.wordSpacing, value, "ctx.wordSpacing", "value"); + width_with_word_spacing = ctx.measureText('Hello World, again').width; + assert_approx_equals(width_with_word_spacing, width_normal + difference_spacing, epsilon, "word spacing doesn't work."); + } + + // The first value is the word Spacing to be set, the second value the + // change in length of string 'Hello World', note that there are 2 words + // in 'Hello World, again', so the length difference is always wordSpacing * 2. + // and the third value is the acceptable differencee for the length change, + // note that unit such as 1cm/1mm doesn't map to an exact pixel value. + test_cases = [['3px', 6, 0.1], + ['5px', 10, 0.1], + ['-2px', -4, 0.1], + ['1em', 20, 0.1], + ['-0.5em', -10, 0.1], + ['1in', 192, 0.1], + ['-0.1cm', -7.57, 0.2], + ['-0.6mm', -4.54, 0.2]] + + for (const test_case of test_cases) { + test_word_spacing(test_case[0], test_case[1], test_case[2]); + } + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.default.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.default.html new file mode 100644 index 0000000000..59828a5db4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.default.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.text.font.default + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.font.default

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.default.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.default.worker.js new file mode 100644 index 0000000000..fa51ffc871 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.default.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.font.default +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.font, '10px sans-serif', "ctx.font", "'10px sans-serif'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.basic.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.basic.html new file mode 100644 index 0000000000..bb39cc4a3c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.basic.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.text.font.parse.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.font.parse.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.basic.worker.js new file mode 100644 index 0000000000..3596aab66b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.basic.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.font.parse.basic +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.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(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.complex.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.complex.html new file mode 100644 index 0000000000..69453437fe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.complex.html @@ -0,0 +1,28 @@ + + +OffscreenCanvas test: 2d.text.font.parse.complex + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.font.parse.complex

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.complex.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.complex.worker.js new file mode 100644 index 0000000000..71d039cfac --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.complex.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.font.parse.complex +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.font = 'small-caps italic 400 12px/2 Unknown Font, sans-serif'; + _assert(['italic small-caps 12px "Unknown Font", sans-serif', 'italic small-caps 12px Unknown Font, sans-serif'].includes(ctx.font), "['italic small-caps 12px \"Unknown Font\", sans-serif', 'italic small-caps 12px Unknown Font, sans-serif'].includes(ctx.font)"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.complex2.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.complex2.html new file mode 100644 index 0000000000..af94ac720a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.complex2.html @@ -0,0 +1,28 @@ + + +OffscreenCanvas test: 2d.text.font.parse.complex2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.font.parse.complex2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.complex2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.complex2.worker.js new file mode 100644 index 0000000000..45575f8814 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.complex2.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.font.parse.complex2 +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.font = 'small-caps italic 400 12px/2 "Unknown Font #2", sans-serif'; + _assertSame(ctx.font, 'italic small-caps 12px "Unknown Font #2", sans-serif', "ctx.font", "'italic small-caps 12px \"Unknown Font #2\", sans-serif'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.family.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.family.html new file mode 100644 index 0000000000..989014fb37 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.family.html @@ -0,0 +1,28 @@ + + +OffscreenCanvas test: 2d.text.font.parse.family + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.font.parse.family

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.family.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.family.worker.js new file mode 100644 index 0000000000..68aefdd0df --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.family.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.font.parse.family +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.font = '20px cursive,fantasy,monospace,sans-serif,serif,UnquotedFont,"QuotedFont\\\\\\","'; + _assertSame(ctx.font, '20px cursive, fantasy, monospace, sans-serif, serif, UnquotedFont, "QuotedFont\\\\\\","', "ctx.font", "'20px cursive, fantasy, monospace, sans-serif, serif, UnquotedFont, \"QuotedFont\\\\\\\\\\\\\",\"'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.invalid.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.invalid.html new file mode 100644 index 0000000000..8b4fd01d02 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.invalid.html @@ -0,0 +1,72 @@ + + +OffscreenCanvas test: 2d.text.font.parse.invalid + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.font.parse.invalid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.invalid.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.invalid.worker.js new file mode 100644 index 0000000000..31f374579e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.invalid.worker.js @@ -0,0 +1,67 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.font.parse.invalid +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.font = '20px serif'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + + ctx.font = '20px serif'; + ctx.font = ''; + _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 = '10px revert'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + + ctx.font = '20px serif'; + ctx.font = 'var(--x)'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + + ctx.font = '20px serif'; + ctx.font = 'var(--x, 10px serif)'; + _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(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.system.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.system.html new file mode 100644 index 0000000000..79ae6a38e2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.system.html @@ -0,0 +1,28 @@ + + +OffscreenCanvas test: 2d.text.font.parse.system + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.font.parse.system

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  System fonts must be computed to explicit values

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.system.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.system.worker.js new file mode 100644 index 0000000000..b965ea763a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.system.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/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("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("System fonts must be computed to explicit values"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.font = 'message-box'; + _assertDifferent(ctx.font, 'message-box', "ctx.font", "'message-box'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.tiny.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.tiny.html new file mode 100644 index 0000000000..89f8515967 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.tiny.html @@ -0,0 +1,28 @@ + + +OffscreenCanvas test: 2d.text.font.parse.tiny + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.font.parse.tiny

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.tiny.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.tiny.worker.js new file mode 100644 index 0000000000..aba023e336 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.parse.tiny.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.font.parse.tiny +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.font = '1px sans-serif'; + _assertSame(ctx.font, '1px sans-serif', "ctx.font", "'1px sans-serif'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.relative_size.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.relative_size.html new file mode 100644 index 0000000000..a32be3d65c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.relative_size.html @@ -0,0 +1,28 @@ + + +OffscreenCanvas test: 2d.text.font.relative_size + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.font.relative_size

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.relative_size.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.relative_size.worker.js new file mode 100644 index 0000000000..9e1247cfe0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.relative_size.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.font.relative_size +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.font = '1em sans-serif'; + _assertSame(ctx.font, '10px sans-serif', "ctx.font", "'10px sans-serif'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.weight.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.weight.html new file mode 100644 index 0000000000..cac9c369b5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.weight.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.text.font.weight + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.font.weight

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.weight.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.weight.worker.js new file mode 100644 index 0000000000..8f653c3656 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.font.weight.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.font.weight +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.font = 'italic 400 12px serif'; + _assertSame(ctx.font, 'italic 12px serif', "ctx.font", "'italic 12px serif'"); + + ctx.font = 'italic 300 12px serif'; + _assertSame(ctx.font, 'italic 300 12px serif', "ctx.font", "'italic 300 12px serif'"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps1-expected.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps1-expected.html new file mode 100644 index 0000000000..e2cef0d77a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps1-expected.html @@ -0,0 +1,15 @@ + + +Canvas test: 2d.text.fontVariantCaps1 +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.fontVariantCaps1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing small caps setting in fontVariant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps1.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps1.html new file mode 100644 index 0000000000..3c216f07da --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps1.html @@ -0,0 +1,21 @@ + + + +Canvas test: 2d.text.fontVariantCaps1 +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.fontVariantCaps1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing small caps setting in fontVariant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps1.w.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps1.w.html new file mode 100644 index 0000000000..4bc1b36e17 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps1.w.html @@ -0,0 +1,35 @@ + + + + +Canvas test: 2d.text.fontVariantCaps1 +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.fontVariantCaps1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing small caps setting in fontVariant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps2-unexpected.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps2-unexpected.html new file mode 100644 index 0000000000..dbcb8abd76 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps2-unexpected.html @@ -0,0 +1,16 @@ + + +HTML OffscreenCanvas reference + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps2.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps2.html new file mode 100644 index 0000000000..e5bcff1831 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps2.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.text.fontVariantCaps2 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.fontVariantCaps2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing small caps setting in fontVariant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps2.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps2.worker.js new file mode 100644 index 0000000000..89f4f48c73 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps2.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.fontVariantCaps2 +// Description:Testing small caps setting in fontVariant +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Testing small caps setting in fontVariant"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.font = "small-caps 32px serif"; + // "mismatch" test, to verify that small-caps does change the rendering. + smallCaps_len = ctx.measureText("Hello World").width; + + ctx.font = "32px serif"; + normalCaps_len = ctx.measureText("Hello World").width; + _assert(smallCaps_len != normalCaps_len, "smallCaps_len != normalCaps_len"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps3-expected.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps3-expected.html new file mode 100644 index 0000000000..cf2d5ae119 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps3-expected.html @@ -0,0 +1,15 @@ + + +Canvas test: 2d.text.fontVariantCaps3 +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.fontVariantCaps3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing small caps setting in fontVariant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps3.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps3.html new file mode 100644 index 0000000000..48699a640f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps3.html @@ -0,0 +1,22 @@ + + + +Canvas test: 2d.text.fontVariantCaps3 +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.fontVariantCaps3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing small caps setting in fontVariant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps3.w.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps3.w.html new file mode 100644 index 0000000000..cd5c1db818 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps3.w.html @@ -0,0 +1,36 @@ + + + + +Canvas test: 2d.text.fontVariantCaps3 +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.fontVariantCaps3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing small caps setting in fontVariant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps4-expected.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps4-expected.html new file mode 100644 index 0000000000..3813fd3684 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps4-expected.html @@ -0,0 +1,15 @@ + + +Canvas test: 2d.text.fontVariantCaps4 +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.fontVariantCaps4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing small caps setting in fontVariant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps4.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps4.html new file mode 100644 index 0000000000..b1b81b81e2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps4.html @@ -0,0 +1,22 @@ + + + +Canvas test: 2d.text.fontVariantCaps4 +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.fontVariantCaps4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing small caps setting in fontVariant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps4.w.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps4.w.html new file mode 100644 index 0000000000..0bae66fcd4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps4.w.html @@ -0,0 +1,36 @@ + + + + +Canvas test: 2d.text.fontVariantCaps4 +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.fontVariantCaps4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing small caps setting in fontVariant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps5-expected.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps5-expected.html new file mode 100644 index 0000000000..4bda4ec4b5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps5-expected.html @@ -0,0 +1,15 @@ + + +Canvas test: 2d.text.fontVariantCaps5 +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.fontVariantCaps5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing small caps setting in fontVariant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps5.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps5.html new file mode 100644 index 0000000000..2a6f7b5f73 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps5.html @@ -0,0 +1,22 @@ + + + +Canvas test: 2d.text.fontVariantCaps5 +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.fontVariantCaps5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing small caps setting in fontVariant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps5.w.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps5.w.html new file mode 100644 index 0000000000..8c59f5b517 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps5.w.html @@ -0,0 +1,36 @@ + + + + +Canvas test: 2d.text.fontVariantCaps5 +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.fontVariantCaps5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing small caps setting in fontVariant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps6-expected.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps6-expected.html new file mode 100644 index 0000000000..af9c736aea --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps6-expected.html @@ -0,0 +1,15 @@ + + +Canvas test: 2d.text.fontVariantCaps6 +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.fontVariantCaps6

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing small caps setting in fontVariant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps6.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps6.html new file mode 100644 index 0000000000..c33684d388 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps6.html @@ -0,0 +1,22 @@ + + + +Canvas test: 2d.text.fontVariantCaps6 +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.fontVariantCaps6

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing small caps setting in fontVariant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps6.w.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps6.w.html new file mode 100644 index 0000000000..47f70d812b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.fontVariantCaps6.w.html @@ -0,0 +1,36 @@ + + + + +Canvas test: 2d.text.fontVariantCaps6 +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.fontVariantCaps6

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing small caps setting in fontVariant

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.actualBoundingBox.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.actualBoundingBox.html new file mode 100644 index 0000000000..105efc0794 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.actualBoundingBox.html @@ -0,0 +1,50 @@ + + +OffscreenCanvas test: 2d.text.measure.actualBoundingBox + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.measure.actualBoundingBox

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing actualBoundingBox

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.actualBoundingBox.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.actualBoundingBox.worker.js new file mode 100644 index 0000000000..c3d18ff878 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.actualBoundingBox.worker.js @@ -0,0 +1,46 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.measure.actualBoundingBox +// Description:Testing actualBoundingBox +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.align = 'left' + ctx.baseline = 'alphabetic' + // Different platforms may render text slightly different. + // Values that are nominally expected to be zero might actually vary by a + // pixel or so if the UA accounts for antialiasing at glyph edges, so we + // allow a slight deviation. + _assert(Math.abs(ctx.measureText('A').actualBoundingBoxLeft) <= 1, "Math.abs(ctx.measureText('A').actualBoundingBoxLeft) <= 1"); + _assert(ctx.measureText('A').actualBoundingBoxRight >= 50, "ctx.measureText('A').actualBoundingBoxRight >= 50"); + _assert(ctx.measureText('A').actualBoundingBoxAscent >= 35, "ctx.measureText('A').actualBoundingBoxAscent >= 35"); + _assert(Math.abs(ctx.measureText('A').actualBoundingBoxDescent) <= 1, "Math.abs(ctx.measureText('A').actualBoundingBoxDescent) <= 1"); + + _assert(ctx.measureText('D').actualBoundingBoxLeft >= 48, "ctx.measureText('D').actualBoundingBoxLeft >= 48"); + _assert(ctx.measureText('D').actualBoundingBoxLeft <= 52, "ctx.measureText('D').actualBoundingBoxLeft <= 52"); + _assert(ctx.measureText('D').actualBoundingBoxRight >= 75, "ctx.measureText('D').actualBoundingBoxRight >= 75"); + _assert(ctx.measureText('D').actualBoundingBoxRight <= 80, "ctx.measureText('D').actualBoundingBoxRight <= 80"); + _assert(ctx.measureText('D').actualBoundingBoxAscent >= 35, "ctx.measureText('D').actualBoundingBoxAscent >= 35"); + _assert(ctx.measureText('D').actualBoundingBoxAscent <= 40, "ctx.measureText('D').actualBoundingBoxAscent <= 40"); + _assert(ctx.measureText('D').actualBoundingBoxDescent >= 12, "ctx.measureText('D').actualBoundingBoxDescent >= 12"); + _assert(ctx.measureText('D').actualBoundingBoxDescent <= 15, "ctx.measureText('D').actualBoundingBoxDescent <= 15"); + + _assert(Math.abs(ctx.measureText('ABCD').actualBoundingBoxLeft) <= 1, "Math.abs(ctx.measureText('ABCD').actualBoundingBoxLeft) <= 1"); + _assert(ctx.measureText('ABCD').actualBoundingBoxRight >= 200, "ctx.measureText('ABCD').actualBoundingBoxRight >= 200"); + _assert(ctx.measureText('ABCD').actualBoundingBoxAscent >= 85, "ctx.measureText('ABCD').actualBoundingBoxAscent >= 85"); + _assert(ctx.measureText('ABCD').actualBoundingBoxDescent >= 37, "ctx.measureText('ABCD').actualBoundingBoxDescent >= 37"); + t.done(); +}, "Testing actualBoundingBox"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.advances.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.advances.html new file mode 100644 index 0000000000..2eec005cb8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.advances.html @@ -0,0 +1,41 @@ + + +OffscreenCanvas test: 2d.text.measure.advances + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.measure.advances

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing width advances

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.advances.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.advances.worker.js new file mode 100644 index 0000000000..4b02f06f2d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.advances.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.measure.advances +// Description:Testing width advances +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.align = 'left' + // Some platforms may return '-0'. + _assertSame(Math.abs(ctx.measureText('Hello').advances[0]), 0, "Math.abs(ctx.measureText('Hello').advances[\""+(0)+"\"])", "0"); + // Different platforms may render text slightly different. + _assert(ctx.measureText('Hello').advances[1] >= 36, "ctx.measureText('Hello').advances[\""+(1)+"\"] >= 36"); + _assert(ctx.measureText('Hello').advances[2] >= 58, "ctx.measureText('Hello').advances[\""+(2)+"\"] >= 58"); + _assert(ctx.measureText('Hello').advances[3] >= 70, "ctx.measureText('Hello').advances[\""+(3)+"\"] >= 70"); + _assert(ctx.measureText('Hello').advances[4] >= 80, "ctx.measureText('Hello').advances[\""+(4)+"\"] >= 80"); + + var tm = ctx.measureText('Hello'); + _assertSame(ctx.measureText('Hello').advances[0], tm.advances[0], "ctx.measureText('Hello').advances[\""+(0)+"\"]", "tm.advances[\""+(0)+"\"]"); + _assertSame(ctx.measureText('Hello').advances[1], tm.advances[1], "ctx.measureText('Hello').advances[\""+(1)+"\"]", "tm.advances[\""+(1)+"\"]"); + _assertSame(ctx.measureText('Hello').advances[2], tm.advances[2], "ctx.measureText('Hello').advances[\""+(2)+"\"]", "tm.advances[\""+(2)+"\"]"); + _assertSame(ctx.measureText('Hello').advances[3], tm.advances[3], "ctx.measureText('Hello').advances[\""+(3)+"\"]", "tm.advances[\""+(3)+"\"]"); + _assertSame(ctx.measureText('Hello').advances[4], tm.advances[4], "ctx.measureText('Hello').advances[\""+(4)+"\"]", "tm.advances[\""+(4)+"\"]"); + t.done(); +}, "Testing width advances"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.baselines.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.baselines.html new file mode 100644 index 0000000000..9d0cc1268d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.baselines.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.text.measure.baselines + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.measure.baselines

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing baselines

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.baselines.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.baselines.worker.js new file mode 100644 index 0000000000..ddb48f4fe0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.baselines.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.measure.baselines +// Description:Testing baselines +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.align = 'left' + _assertSame(Math.abs(ctx.measureText('A').alphabeticBaseline), 0, "Math.abs(ctx.measureText('A').alphabeticBaseline)", "0"); + _assertSame(ctx.measureText('A').ideographicBaseline, 6.25, "ctx.measureText('A').ideographicBaseline", "6.25"); + _assertSame(ctx.measureText('A').hangingBaseline, 25, "ctx.measureText('A').hangingBaseline", "25"); + + _assertSame(Math.abs(ctx.measureText('ABCD').alphabeticBaseline), 0, "Math.abs(ctx.measureText('ABCD').alphabeticBaseline)", "0"); + _assertSame(ctx.measureText('ABCD').ideographicBaseline, 6.25, "ctx.measureText('ABCD').ideographicBaseline", "6.25"); + _assertSame(ctx.measureText('ABCD').hangingBaseline, 25, "ctx.measureText('ABCD').hangingBaseline", "25"); + t.done(); +}, "Testing baselines"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights-low-ascent.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights-low-ascent.html new file mode 100644 index 0000000000..2e2e5dde67 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights-low-ascent.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.text.measure.emHeights-low-ascent + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.measure.emHeights-low-ascent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing emHeights with reduced ascent metric

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights-low-ascent.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights-low-ascent.worker.js new file mode 100644 index 0000000000..09ee787309 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights-low-ascent.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.measure.emHeights-low-ascent +// Description:Testing emHeights with reduced ascent metric +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest-ascent256", "url('/fonts/CanvasTest-ascent256.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '40px CanvasTest-ascent256'; + ctx.direction = 'ltr'; + ctx.align = 'left' + _assertSame(ctx.measureText('A').emHeightAscent, 20, "ctx.measureText('A').emHeightAscent", "20"); + _assertSame(ctx.measureText('A').emHeightDescent, 20, "ctx.measureText('A').emHeightDescent", "20"); + _assertSame(ctx.measureText('A').emHeightDescent + ctx.measureText('A').emHeightAscent, 40, "ctx.measureText('A').emHeightDescent + ctx.measureText('A').emHeightAscent", "40"); + + _assertSame(ctx.measureText('ABCD').emHeightAscent, 20, "ctx.measureText('ABCD').emHeightAscent", "20"); + _assertSame(ctx.measureText('ABCD').emHeightDescent, 20, "ctx.measureText('ABCD').emHeightDescent", "20"); + _assertSame(ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent, 40, "ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent", "40"); + t.done(); +}, "Testing emHeights with reduced ascent metric"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights-zero-descent.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights-zero-descent.html new file mode 100644 index 0000000000..e39c08ce82 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights-zero-descent.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.text.measure.emHeights-zero-descent + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.measure.emHeights-zero-descent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing emHeights with zero descent metric

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights-zero-descent.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights-zero-descent.worker.js new file mode 100644 index 0000000000..a2f09782c9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights-zero-descent.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.measure.emHeights-zero-descent +// Description:Testing emHeights with zero descent metric +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest-descent0", "url('/fonts/CanvasTest-descent0.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '40px CanvasTest-descent0'; + ctx.direction = 'ltr'; + ctx.align = 'left' + _assertSame(ctx.measureText('A').emHeightAscent, 40, "ctx.measureText('A').emHeightAscent", "40"); + _assertSame(ctx.measureText('A').emHeightDescent, 0, "ctx.measureText('A').emHeightDescent", "0"); + _assertSame(ctx.measureText('A').emHeightDescent + ctx.measureText('A').emHeightAscent, 40, "ctx.measureText('A').emHeightDescent + ctx.measureText('A').emHeightAscent", "40"); + + _assertSame(ctx.measureText('ABCD').emHeightAscent, 40, "ctx.measureText('ABCD').emHeightAscent", "40"); + _assertSame(ctx.measureText('ABCD').emHeightDescent, 0, "ctx.measureText('ABCD').emHeightDescent", "0"); + _assertSame(ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent, 40, "ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent", "40"); + t.done(); +}, "Testing emHeights with zero descent metric"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights.html new file mode 100644 index 0000000000..0764279df3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.text.measure.emHeights + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.measure.emHeights

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing emHeights

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights.worker.js new file mode 100644 index 0000000000..0385d3d737 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.emHeights.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.measure.emHeights +// Description:Testing emHeights +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '40px CanvasTest'; + ctx.direction = 'ltr'; + ctx.align = 'left' + _assertSame(ctx.measureText('A').emHeightAscent, 30, "ctx.measureText('A').emHeightAscent", "30"); + _assertSame(ctx.measureText('A').emHeightDescent, 10, "ctx.measureText('A').emHeightDescent", "10"); + _assertSame(ctx.measureText('A').emHeightDescent + ctx.measureText('A').emHeightAscent, 40, "ctx.measureText('A').emHeightDescent + ctx.measureText('A').emHeightAscent", "40"); + + _assertSame(ctx.measureText('ABCD').emHeightAscent, 30, "ctx.measureText('ABCD').emHeightAscent", "30"); + _assertSame(ctx.measureText('ABCD').emHeightDescent, 10, "ctx.measureText('ABCD').emHeightDescent", "10"); + _assertSame(ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent, 40, "ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent", "40"); + t.done(); +}, "Testing emHeights"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox-reduced-ascent.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox-reduced-ascent.html new file mode 100644 index 0000000000..51eb2c822c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox-reduced-ascent.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.text.measure.fontBoundingBox-reduced-ascent + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.measure.fontBoundingBox-reduced-ascent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing fontBoundingBox for OffscreenCanvas with reduced ascent metric

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox-reduced-ascent.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox-reduced-ascent.worker.js new file mode 100644 index 0000000000..dea67ff8f6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox-reduced-ascent.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.measure.fontBoundingBox-reduced-ascent +// Description:Testing fontBoundingBox for OffscreenCanvas with reduced ascent metric +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest-ascent256", "url('/fonts/CanvasTest-ascent256.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '40px CanvasTest-ascent256'; + ctx.direction = 'ltr'; + ctx.align = 'left' + _assertSame(ctx.measureText('A').fontBoundingBoxAscent, 10, "ctx.measureText('A').fontBoundingBoxAscent", "10"); + _assertSame(ctx.measureText('A').fontBoundingBoxDescent, 10, "ctx.measureText('A').fontBoundingBoxDescent", "10"); + + _assertSame(ctx.measureText('ABCD').fontBoundingBoxAscent, 10, "ctx.measureText('ABCD').fontBoundingBoxAscent", "10"); + _assertSame(ctx.measureText('ABCD').fontBoundingBoxDescent, 10, "ctx.measureText('ABCD').fontBoundingBoxDescent", "10"); + t.done(); +}, "Testing fontBoundingBox for OffscreenCanvas with reduced ascent metric"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox-zero-descent.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox-zero-descent.html new file mode 100644 index 0000000000..ea65e58b5c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox-zero-descent.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.text.measure.fontBoundingBox-zero-descent + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.measure.fontBoundingBox-zero-descent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing fontBoundingBox for OffscreenCanvas with zero descent metric

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox-zero-descent.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox-zero-descent.worker.js new file mode 100644 index 0000000000..99a886d015 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox-zero-descent.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.measure.fontBoundingBox-zero-descent +// Description:Testing fontBoundingBox for OffscreenCanvas with zero descent metric +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest-descent0", "url('/fonts/CanvasTest-descent0.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '40px CanvasTest-descent0'; + ctx.direction = 'ltr'; + ctx.align = 'left' + _assertSame(ctx.measureText('A').fontBoundingBoxAscent, 30, "ctx.measureText('A').fontBoundingBoxAscent", "30"); + _assertSame(ctx.measureText('A').fontBoundingBoxDescent, 0, "ctx.measureText('A').fontBoundingBoxDescent", "0"); + + _assertSame(ctx.measureText('ABCD').fontBoundingBoxAscent, 30, "ctx.measureText('ABCD').fontBoundingBoxAscent", "30"); + _assertSame(ctx.measureText('ABCD').fontBoundingBoxDescent, 0, "ctx.measureText('ABCD').fontBoundingBoxDescent", "0"); + t.done(); +}, "Testing fontBoundingBox for OffscreenCanvas with zero descent metric"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.ahem.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.ahem.html new file mode 100644 index 0000000000..cb8b0c558d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.ahem.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.text.measure.fontBoundingBox.ahem + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.measure.fontBoundingBox.ahem

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing fontBoundingBox for font ahem

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.ahem.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.ahem.worker.js new file mode 100644 index 0000000000..255bcd108a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.ahem.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.measure.fontBoundingBox.ahem +// Description:Testing fontBoundingBox for font ahem +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("Ahem", "url('/fonts/Ahem.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '50px Ahem'; + ctx.direction = 'ltr'; + ctx.align = 'left' + _assertSame(ctx.measureText('A').fontBoundingBoxAscent, 40, "ctx.measureText('A').fontBoundingBoxAscent", "40"); + _assertSame(ctx.measureText('A').fontBoundingBoxDescent, 10, "ctx.measureText('A').fontBoundingBoxDescent", "10"); + _assertSame(ctx.measureText('ABCD').fontBoundingBoxAscent, 40, "ctx.measureText('ABCD').fontBoundingBoxAscent", "40"); + _assertSame(ctx.measureText('ABCD').fontBoundingBoxDescent, 10, "ctx.measureText('ABCD').fontBoundingBoxDescent", "10"); + t.done(); +}, "Testing fontBoundingBox for font ahem"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.html new file mode 100644 index 0000000000..36b11f31d7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.text.measure.fontBoundingBox + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.measure.fontBoundingBox

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Testing fontBoundingBox measurements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.worker.js new file mode 100644 index 0000000000..b2cde04c0d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.measure.fontBoundingBox +// Description:Testing fontBoundingBox measurements +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '40px CanvasTest'; + ctx.direction = 'ltr'; + ctx.align = 'left' + _assertSame(ctx.measureText('A').fontBoundingBoxAscent, 30, "ctx.measureText('A').fontBoundingBoxAscent", "30"); + _assertSame(ctx.measureText('A').fontBoundingBoxDescent, 10, "ctx.measureText('A').fontBoundingBoxDescent", "10"); + + _assertSame(ctx.measureText('ABCD').fontBoundingBoxAscent, 30, "ctx.measureText('ABCD').fontBoundingBoxAscent", "30"); + _assertSame(ctx.measureText('ABCD').fontBoundingBoxDescent, 10, "ctx.measureText('ABCD').fontBoundingBoxDescent", "10"); + t.done(); +}, "Testing fontBoundingBox measurements"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.basic.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.basic.html new file mode 100644 index 0000000000..fea1904083 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.basic.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.text.measure.width.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.measure.width.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The width of character is same as font used

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.basic.worker.js new file mode 100644 index 0000000000..866ad8b3c5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.basic.worker.js @@ -0,0 +1,27 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.measure.width.basic +// Description:The width of character is same as font used +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + 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"); + t.done(); +}, "The width of character is same as font used"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.empty.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.empty.html new file mode 100644 index 0000000000..11bd029433 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.empty.html @@ -0,0 +1,26 @@ + + +OffscreenCanvas test: 2d.text.measure.width.empty + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.measure.width.empty

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The empty string has zero width

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.empty.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.empty.worker.js new file mode 100644 index 0000000000..6fb89c5ba7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.empty.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/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("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '50px CanvasTest'; + _assertSame(ctx.measureText("").width, 0, "ctx.measureText(\"\").width", "0"); + t.done(); +}, "The empty string has zero width"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.space.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.space.html new file mode 100644 index 0000000000..38d5084298 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.space.html @@ -0,0 +1,32 @@ + + +OffscreenCanvas test: 2d.text.measure.width.space + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.measure.width.space

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Space characters are converted to U+0020 and NOT collapsed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.space.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.space.worker.js new file mode 100644 index 0000000000..d832feec5f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.measure.width.space.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.measure.width.space +// Description:Space characters are converted to U+0020 and NOT collapsed +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + f.load(); + self.fonts.add(f); + await self.fonts.ready; + ctx.font = '50px CanvasTest'; + _assertSame(ctx.measureText('A B').width, 150, "ctx.measureText('A B').width", "150"); + _assertSame(ctx.measureText('A B').width, 200, "ctx.measureText('A B').width", "200"); + _assertSame(ctx.measureText('A \x09\x0a\x0c\x0d \x09\x0a\x0c\x0dB').width, 650, "ctx.measureText('A \\x09\\x0a\\x0c\\x0d \\x09\\x0a\\x0c\\x0dB').width", "650"); + _assert(ctx.measureText('A \x0b B').width >= 200, "ctx.measureText('A \\x0b B').width >= 200"); + + _assertSame(ctx.measureText(' AB').width, 150, "ctx.measureText(' AB').width", "150"); + _assertSame(ctx.measureText('AB ').width, 150, "ctx.measureText('AB ').width", "150"); + t.done(); +}, "Space characters are converted to U+0020 and NOT collapsed"); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.setFont.mathFont.html b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.setFont.mathFont.html new file mode 100644 index 0000000000..89d8fe3c7a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.setFont.mathFont.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.text.setFont.mathFont + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.text.setFont.mathFont

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  crbug.com/1212190, make sure offscreencanvas doesn't crash with Math Font

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.setFont.mathFont.worker.js b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.setFont.mathFont.worker.js new file mode 100644 index 0000000000..b756b45dc5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/2d.text.setFont.mathFont.worker.js @@ -0,0 +1,22 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.setFont.mathFont +// Description:crbug.com/1212190, make sure offscreencanvas doesn't crash with Math Font +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("crbug.com/1212190, make sure offscreencanvas doesn't crash with Math Font"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.font = "math serif"; + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch-ref.html b/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch-ref.html new file mode 100644 index 0000000000..00ecdccad3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch-ref.html @@ -0,0 +1,19 @@ + +Canvas test: 2d.text.fontStretch +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.condensed.html b/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.condensed.html new file mode 100644 index 0000000000..0cbd5e3c1f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.condensed.html @@ -0,0 +1,30 @@ + +Canvas test: 2d.text.fontStretch + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.expanded.html b/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.expanded.html new file mode 100644 index 0000000000..5ec853985f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.expanded.html @@ -0,0 +1,30 @@ + +Canvas test: 2d.text.fontStretch + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.extra-condensed.html b/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.extra-condensed.html new file mode 100644 index 0000000000..12843c53b8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.extra-condensed.html @@ -0,0 +1,30 @@ + +Canvas test: 2d.text.fontStretch + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.extra-expanded.html b/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.extra-expanded.html new file mode 100644 index 0000000000..20d801718a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.extra-expanded.html @@ -0,0 +1,30 @@ + +Canvas test: 2d.text.fontStretch + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.normal.html b/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.normal.html new file mode 100644 index 0000000000..786cb408e1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.normal.html @@ -0,0 +1,33 @@ + +Canvas test: 2d.text.fontStretch + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.semi-condensed.html b/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.semi-condensed.html new file mode 100644 index 0000000000..04bd5a80d0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.semi-condensed.html @@ -0,0 +1,30 @@ + +Canvas test: 2d.text.fontStretch + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.semi-expanded.html b/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.semi-expanded.html new file mode 100644 index 0000000000..d86b730687 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.semi-expanded.html @@ -0,0 +1,30 @@ + +Canvas test: 2d.text.fontStretch + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.ultra-condensed.html b/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.ultra-condensed.html new file mode 100644 index 0000000000..d78f6d0078 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.ultra-condensed.html @@ -0,0 +1,30 @@ + +Canvas test: 2d.text.fontStretch + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.ultra-expanded.html b/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.ultra-expanded.html new file mode 100644 index 0000000000..8b8f6f5698 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/text/canvas.2d.fontStretch.ultra-expanded.html @@ -0,0 +1,30 @@ + +Canvas test: 2d.text.fontStretch + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.bitmap.html b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.bitmap.html new file mode 100644 index 0000000000..208043fbf6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.bitmap.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.state.saverestore.bitmap + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.state.saverestore.bitmap

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  save()/restore() does not affect the current bitmap

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.bitmap.worker.js b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.bitmap.worker.js new file mode 100644 index 0000000000..09c7dcca90 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.bitmap.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.state.saverestore.bitmap +// Description:save()/restore() does not affect the current bitmap +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("save()/restore() does not affect the current bitmap"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.save(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.restore(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.clip.html b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.clip.html new file mode 100644 index 0000000000..f4d6b6f6e1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.clip.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.state.saverestore.clip + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.state.saverestore.clip

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  save()/restore() affects the clipping path

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.clip.worker.js b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.clip.worker.js new file mode 100644 index 0000000000..a7bc0615e5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.clip.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.state.saverestore.clip +// Description:save()/restore() affects the clipping path +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("save()/restore() affects the clipping path"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.save(); + ctx.rect(0, 0, 1, 1); + ctx.clip(); + ctx.restore(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.fillStyle.html b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.fillStyle.html new file mode 100644 index 0000000000..789e1e8d2b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.fillStyle.html @@ -0,0 +1,41 @@ + + +OffscreenCanvas test: 2d.state.saverestore.fillStyle + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.state.saverestore.fillStyle

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  save()/restore() works for fillStyle

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.fillStyle.worker.js b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.fillStyle.worker.js new file mode 100644 index 0000000000..46cf6d1daa --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.fillStyle.worker.js @@ -0,0 +1,36 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.state.saverestore.fillStyle +// Description:save()/restore() works for fillStyle +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("save()/restore() works for fillStyle"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + // Test that restore() undoes any modifications + var old = ctx.fillStyle; + ctx.save(); + ctx.fillStyle = "#ff0000"; + ctx.restore(); + _assertSame(ctx.fillStyle, old, "ctx.fillStyle", "old"); + + // Also test that save() doesn't modify the values + ctx.fillStyle = "#ff0000"; + old = ctx.fillStyle; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against "#ff0000" + ctx.save(); + _assertSame(ctx.fillStyle, old, "ctx.fillStyle", "old"); + ctx.restore(); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalAlpha.html b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalAlpha.html new file mode 100644 index 0000000000..15b59725ab --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalAlpha.html @@ -0,0 +1,41 @@ + + +OffscreenCanvas test: 2d.state.saverestore.globalAlpha + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.state.saverestore.globalAlpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  save()/restore() works for globalAlpha

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalAlpha.worker.js b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalAlpha.worker.js new file mode 100644 index 0000000000..765f8b00a3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalAlpha.worker.js @@ -0,0 +1,36 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.state.saverestore.globalAlpha +// Description:save()/restore() works for globalAlpha +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("save()/restore() works for globalAlpha"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + // Test that restore() undoes any modifications + var old = ctx.globalAlpha; + ctx.save(); + ctx.globalAlpha = 0.5; + ctx.restore(); + _assertSame(ctx.globalAlpha, old, "ctx.globalAlpha", "old"); + + // Also test that save() doesn't modify the values + ctx.globalAlpha = 0.5; + old = ctx.globalAlpha; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against 0.5 + ctx.save(); + _assertSame(ctx.globalAlpha, old, "ctx.globalAlpha", "old"); + ctx.restore(); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalCompositeOperation.html b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalCompositeOperation.html new file mode 100644 index 0000000000..1efb24aa9b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalCompositeOperation.html @@ -0,0 +1,41 @@ + + +OffscreenCanvas test: 2d.state.saverestore.globalCompositeOperation + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.state.saverestore.globalCompositeOperation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  save()/restore() works for globalCompositeOperation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalCompositeOperation.worker.js b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalCompositeOperation.worker.js new file mode 100644 index 0000000000..cd38d56c51 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalCompositeOperation.worker.js @@ -0,0 +1,36 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.state.saverestore.globalCompositeOperation +// Description:save()/restore() works for globalCompositeOperation +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("save()/restore() works for globalCompositeOperation"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + // Test that restore() undoes any modifications + var old = ctx.globalCompositeOperation; + ctx.save(); + ctx.globalCompositeOperation = "copy"; + ctx.restore(); + _assertSame(ctx.globalCompositeOperation, old, "ctx.globalCompositeOperation", "old"); + + // Also test that save() doesn't modify the values + ctx.globalCompositeOperation = "copy"; + old = ctx.globalCompositeOperation; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against "copy" + ctx.save(); + _assertSame(ctx.globalCompositeOperation, old, "ctx.globalCompositeOperation", "old"); + ctx.restore(); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineCap.html b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineCap.html new file mode 100644 index 0000000000..5e651d0c7b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineCap.html @@ -0,0 +1,41 @@ + + +OffscreenCanvas test: 2d.state.saverestore.lineCap + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.state.saverestore.lineCap

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  save()/restore() works for lineCap

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineCap.worker.js b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineCap.worker.js new file mode 100644 index 0000000000..9895b44b00 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineCap.worker.js @@ -0,0 +1,36 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.state.saverestore.lineCap +// Description:save()/restore() works for lineCap +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("save()/restore() works for lineCap"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + // Test that restore() undoes any modifications + var old = ctx.lineCap; + ctx.save(); + ctx.lineCap = "round"; + ctx.restore(); + _assertSame(ctx.lineCap, old, "ctx.lineCap", "old"); + + // Also test that save() doesn't modify the values + ctx.lineCap = "round"; + old = ctx.lineCap; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against "round" + ctx.save(); + _assertSame(ctx.lineCap, old, "ctx.lineCap", "old"); + ctx.restore(); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineJoin.html b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineJoin.html new file mode 100644 index 0000000000..20f53fec50 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineJoin.html @@ -0,0 +1,41 @@ + + +OffscreenCanvas test: 2d.state.saverestore.lineJoin + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.state.saverestore.lineJoin

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  save()/restore() works for lineJoin

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineJoin.worker.js b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineJoin.worker.js new file mode 100644 index 0000000000..e8c85825f1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineJoin.worker.js @@ -0,0 +1,36 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.state.saverestore.lineJoin +// Description:save()/restore() works for lineJoin +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("save()/restore() works for lineJoin"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + // Test that restore() undoes any modifications + var old = ctx.lineJoin; + ctx.save(); + ctx.lineJoin = "round"; + ctx.restore(); + _assertSame(ctx.lineJoin, old, "ctx.lineJoin", "old"); + + // Also test that save() doesn't modify the values + ctx.lineJoin = "round"; + old = ctx.lineJoin; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against "round" + ctx.save(); + _assertSame(ctx.lineJoin, old, "ctx.lineJoin", "old"); + ctx.restore(); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineWidth.html b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineWidth.html new file mode 100644 index 0000000000..e234e3efc2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineWidth.html @@ -0,0 +1,41 @@ + + +OffscreenCanvas test: 2d.state.saverestore.lineWidth + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.state.saverestore.lineWidth

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  save()/restore() works for lineWidth

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineWidth.worker.js b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineWidth.worker.js new file mode 100644 index 0000000000..997748c377 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineWidth.worker.js @@ -0,0 +1,36 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.state.saverestore.lineWidth +// Description:save()/restore() works for lineWidth +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("save()/restore() works for lineWidth"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + // Test that restore() undoes any modifications + var old = ctx.lineWidth; + ctx.save(); + ctx.lineWidth = 0.5; + ctx.restore(); + _assertSame(ctx.lineWidth, old, "ctx.lineWidth", "old"); + + // Also test that save() doesn't modify the values + ctx.lineWidth = 0.5; + old = ctx.lineWidth; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against 0.5 + ctx.save(); + _assertSame(ctx.lineWidth, old, "ctx.lineWidth", "old"); + ctx.restore(); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.miterLimit.html b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.miterLimit.html new file mode 100644 index 0000000000..1df2b2420f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.miterLimit.html @@ -0,0 +1,41 @@ + + +OffscreenCanvas test: 2d.state.saverestore.miterLimit + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.state.saverestore.miterLimit

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  save()/restore() works for miterLimit

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.miterLimit.worker.js b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.miterLimit.worker.js new file mode 100644 index 0000000000..eb5adffe06 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.miterLimit.worker.js @@ -0,0 +1,36 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.state.saverestore.miterLimit +// Description:save()/restore() works for miterLimit +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("save()/restore() works for miterLimit"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + // Test that restore() undoes any modifications + var old = ctx.miterLimit; + ctx.save(); + ctx.miterLimit = 0.5; + ctx.restore(); + _assertSame(ctx.miterLimit, old, "ctx.miterLimit", "old"); + + // Also test that save() doesn't modify the values + ctx.miterLimit = 0.5; + old = ctx.miterLimit; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against 0.5 + ctx.save(); + _assertSame(ctx.miterLimit, old, "ctx.miterLimit", "old"); + ctx.restore(); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.path.html b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.path.html new file mode 100644 index 0000000000..a86851af68 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.path.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.state.saverestore.path + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.state.saverestore.path

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  save()/restore() does not affect the current path

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.path.worker.js b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.path.worker.js new file mode 100644 index 0000000000..d174de5a50 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.path.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.state.saverestore.path +// Description:save()/restore() does not affect the current path +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("save()/restore() does not affect the current path"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.save(); + ctx.rect(0, 0, 100, 50); + ctx.restore(); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowBlur.html b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowBlur.html new file mode 100644 index 0000000000..044ee1b4bb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowBlur.html @@ -0,0 +1,41 @@ + + +OffscreenCanvas test: 2d.state.saverestore.shadowBlur + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.state.saverestore.shadowBlur

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  save()/restore() works for shadowBlur

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowBlur.worker.js b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowBlur.worker.js new file mode 100644 index 0000000000..00cd6f8317 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowBlur.worker.js @@ -0,0 +1,36 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.state.saverestore.shadowBlur +// Description:save()/restore() works for shadowBlur +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("save()/restore() works for shadowBlur"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + // Test that restore() undoes any modifications + var old = ctx.shadowBlur; + ctx.save(); + ctx.shadowBlur = 5; + ctx.restore(); + _assertSame(ctx.shadowBlur, old, "ctx.shadowBlur", "old"); + + // Also test that save() doesn't modify the values + ctx.shadowBlur = 5; + old = ctx.shadowBlur; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against 5 + ctx.save(); + _assertSame(ctx.shadowBlur, old, "ctx.shadowBlur", "old"); + ctx.restore(); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowColor.html b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowColor.html new file mode 100644 index 0000000000..0e8b4293e0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowColor.html @@ -0,0 +1,41 @@ + + +OffscreenCanvas test: 2d.state.saverestore.shadowColor + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.state.saverestore.shadowColor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  save()/restore() works for shadowColor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowColor.worker.js b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowColor.worker.js new file mode 100644 index 0000000000..13c033f396 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowColor.worker.js @@ -0,0 +1,36 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.state.saverestore.shadowColor +// Description:save()/restore() works for shadowColor +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("save()/restore() works for shadowColor"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + // Test that restore() undoes any modifications + var old = ctx.shadowColor; + ctx.save(); + ctx.shadowColor = "#ff0000"; + ctx.restore(); + _assertSame(ctx.shadowColor, old, "ctx.shadowColor", "old"); + + // Also test that save() doesn't modify the values + ctx.shadowColor = "#ff0000"; + old = ctx.shadowColor; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against "#ff0000" + ctx.save(); + _assertSame(ctx.shadowColor, old, "ctx.shadowColor", "old"); + ctx.restore(); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetX.html b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetX.html new file mode 100644 index 0000000000..11aa658f3e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetX.html @@ -0,0 +1,41 @@ + + +OffscreenCanvas test: 2d.state.saverestore.shadowOffsetX + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.state.saverestore.shadowOffsetX

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  save()/restore() works for shadowOffsetX

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetX.worker.js b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetX.worker.js new file mode 100644 index 0000000000..a6ad922647 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetX.worker.js @@ -0,0 +1,36 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.state.saverestore.shadowOffsetX +// Description:save()/restore() works for shadowOffsetX +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("save()/restore() works for shadowOffsetX"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + // Test that restore() undoes any modifications + var old = ctx.shadowOffsetX; + ctx.save(); + ctx.shadowOffsetX = 5; + ctx.restore(); + _assertSame(ctx.shadowOffsetX, old, "ctx.shadowOffsetX", "old"); + + // Also test that save() doesn't modify the values + ctx.shadowOffsetX = 5; + old = ctx.shadowOffsetX; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against 5 + ctx.save(); + _assertSame(ctx.shadowOffsetX, old, "ctx.shadowOffsetX", "old"); + ctx.restore(); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetY.html b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetY.html new file mode 100644 index 0000000000..c238f0ec94 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetY.html @@ -0,0 +1,41 @@ + + +OffscreenCanvas test: 2d.state.saverestore.shadowOffsetY + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.state.saverestore.shadowOffsetY

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  save()/restore() works for shadowOffsetY

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetY.worker.js b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetY.worker.js new file mode 100644 index 0000000000..323fcd1434 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetY.worker.js @@ -0,0 +1,36 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.state.saverestore.shadowOffsetY +// Description:save()/restore() works for shadowOffsetY +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("save()/restore() works for shadowOffsetY"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + // Test that restore() undoes any modifications + var old = ctx.shadowOffsetY; + ctx.save(); + ctx.shadowOffsetY = 5; + ctx.restore(); + _assertSame(ctx.shadowOffsetY, old, "ctx.shadowOffsetY", "old"); + + // Also test that save() doesn't modify the values + ctx.shadowOffsetY = 5; + old = ctx.shadowOffsetY; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against 5 + ctx.save(); + _assertSame(ctx.shadowOffsetY, old, "ctx.shadowOffsetY", "old"); + ctx.restore(); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stack.html b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stack.html new file mode 100644 index 0000000000..4a8750867f --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stack.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.state.saverestore.stack + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.state.saverestore.stack

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  save()/restore() can be nested as a stack

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stack.worker.js b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stack.worker.js new file mode 100644 index 0000000000..460df4ec83 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stack.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.state.saverestore.stack +// Description:save()/restore() can be nested as a stack +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("save()/restore() can be nested as a stack"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.lineWidth = 1; + ctx.save(); + ctx.lineWidth = 2; + ctx.save(); + ctx.lineWidth = 3; + _assertSame(ctx.lineWidth, 3, "ctx.lineWidth", "3"); + ctx.restore(); + _assertSame(ctx.lineWidth, 2, "ctx.lineWidth", "2"); + ctx.restore(); + _assertSame(ctx.lineWidth, 1, "ctx.lineWidth", "1"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stackdepth.html b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stackdepth.html new file mode 100644 index 0000000000..d536155e64 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stackdepth.html @@ -0,0 +1,37 @@ + + +OffscreenCanvas test: 2d.state.saverestore.stackdepth + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.state.saverestore.stackdepth

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  save()/restore() stack depth is not unreasonably limited

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stackdepth.worker.js b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stackdepth.worker.js new file mode 100644 index 0000000000..c494d9ddf8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stackdepth.worker.js @@ -0,0 +1,32 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.state.saverestore.stackdepth +// Description:save()/restore() stack depth is not unreasonably limited +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("save()/restore() stack depth is not unreasonably limited"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var limit = 512; + for (var i = 1; i < limit; ++i) + { + ctx.save(); + ctx.lineWidth = i; + } + for (var i = limit-1; i > 0; --i) + { + _assertSame(ctx.lineWidth, i, "ctx.lineWidth", "i"); + ctx.restore(); + } + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.strokeStyle.html b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.strokeStyle.html new file mode 100644 index 0000000000..561205acd9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.strokeStyle.html @@ -0,0 +1,41 @@ + + +OffscreenCanvas test: 2d.state.saverestore.strokeStyle + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.state.saverestore.strokeStyle

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  save()/restore() works for strokeStyle

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.strokeStyle.worker.js b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.strokeStyle.worker.js new file mode 100644 index 0000000000..878a6d68cb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.strokeStyle.worker.js @@ -0,0 +1,36 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.state.saverestore.strokeStyle +// Description:save()/restore() works for strokeStyle +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("save()/restore() works for strokeStyle"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + // Test that restore() undoes any modifications + var old = ctx.strokeStyle; + ctx.save(); + ctx.strokeStyle = "#ff0000"; + ctx.restore(); + _assertSame(ctx.strokeStyle, old, "ctx.strokeStyle", "old"); + + // Also test that save() doesn't modify the values + ctx.strokeStyle = "#ff0000"; + old = ctx.strokeStyle; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against "#ff0000" + ctx.save(); + _assertSame(ctx.strokeStyle, old, "ctx.strokeStyle", "old"); + ctx.restore(); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.transformation.html b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.transformation.html new file mode 100644 index 0000000000..79ecdece53 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.transformation.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.state.saverestore.transformation + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.state.saverestore.transformation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  save()/restore() affects the current transformation matrix

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.transformation.worker.js b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.transformation.worker.js new file mode 100644 index 0000000000..1647dfb790 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.transformation.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.state.saverestore.transformation +// Description:save()/restore() affects the current transformation matrix +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("save()/restore() affects the current transformation matrix"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.save(); + ctx.translate(200, 0); + ctx.restore(); + ctx.fillStyle = '#f00'; + ctx.fillRect(-200, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.underflow.html b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.underflow.html new file mode 100644 index 0000000000..a6713adde2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.underflow.html @@ -0,0 +1,31 @@ + + +OffscreenCanvas test: 2d.state.saverestore.underflow + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.state.saverestore.underflow

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  restore() with an empty stack has no effect

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.underflow.worker.js b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.underflow.worker.js new file mode 100644 index 0000000000..8ed4bcbc10 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.underflow.worker.js @@ -0,0 +1,26 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.state.saverestore.underflow +// Description:restore() with an empty stack has no effect +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("restore() with an empty stack has no effect"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + for (var i = 0; i < 16; ++i) + ctx.restore(); + ctx.lineWidth = 0.5; + ctx.restore(); + _assertSame(ctx.lineWidth, 0.5, "ctx.lineWidth", "0.5"); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.order.html b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.order.html new file mode 100644 index 0000000000..d438c27433 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.order.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.transformation.order + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.transformation.order

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Transformations are applied in the right order

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.order.worker.js b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.order.worker.js new file mode 100644 index 0000000000..219cbe8421 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.order.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.transformation.order +// Description:Transformations are applied in the right order +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Transformations are applied in the right order"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.scale(2, 1); + ctx.rotate(Math.PI / 2); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, -50, 50, 50); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.direction.html b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.direction.html new file mode 100644 index 0000000000..fb0f295062 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.direction.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.transformation.rotate.direction + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.transformation.rotate.direction

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  rotate() is clockwise

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.direction.worker.js b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.direction.worker.js new file mode 100644 index 0000000000..b92b7d8368 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.direction.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.transformation.rotate.direction +// Description:rotate() is clockwise +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("rotate() is clockwise"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.rotate(Math.PI / 2); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, -100, 50, 100); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.nonfinite.html b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.nonfinite.html new file mode 100644 index 0000000000..dbde38370d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.nonfinite.html @@ -0,0 +1,38 @@ + + +OffscreenCanvas test: 2d.transformation.rotate.nonfinite + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.transformation.rotate.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  rotate() with Infinity/NaN is ignored

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.nonfinite.worker.js b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.nonfinite.worker.js new file mode 100644 index 0000000000..52b6605e45 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.nonfinite.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.transformation.rotate.nonfinite +// Description:rotate() with Infinity/NaN is ignored +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("rotate() with Infinity/NaN is ignored"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.translate(100, 10); + ctx.rotate(Infinity); + ctx.rotate(-Infinity); + ctx.rotate(NaN); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(-100, -10, 100, 50); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.radians.html b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.radians.html new file mode 100644 index 0000000000..28006028ca --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.radians.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.transformation.rotate.radians + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.transformation.rotate.radians

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  rotate() uses radians

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.radians.worker.js b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.radians.worker.js new file mode 100644 index 0000000000..0851691156 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.radians.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.transformation.rotate.radians +// Description:rotate() uses radians +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("rotate() uses radians"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.rotate(Math.PI); // should fail obviously if this is 3.1 degrees + ctx.fillStyle = '#0f0'; + ctx.fillRect(-100, -50, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrap.html b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrap.html new file mode 100644 index 0000000000..aea14ceddf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrap.html @@ -0,0 +1,38 @@ + + +OffscreenCanvas test: 2d.transformation.rotate.wrap + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.transformation.rotate.wrap

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  rotate() wraps large positive values correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrap.worker.js b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrap.worker.js new file mode 100644 index 0000000000..4d0c2f5b5d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrap.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.transformation.rotate.wrap +// Description:rotate() wraps large positive values correctly +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("rotate() wraps large positive values correctly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.rotate(Math.PI * (1 + 4096)); // == pi (mod 2*pi) + // We need about pi +/- 0.001 in order to get correct-looking results + // 32-bit floats can store pi*4097 with precision 2^-10, so that should + // be safe enough on reasonable implementations + ctx.fillStyle = '#0f0'; + ctx.fillRect(-100, -50, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,2, 0,255,0,255); + _assertPixel(canvas, 98,47, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrapnegative.html b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrapnegative.html new file mode 100644 index 0000000000..7363007a4d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrapnegative.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.transformation.rotate.wrapnegative + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.transformation.rotate.wrapnegative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  rotate() wraps large negative values correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrapnegative.worker.js b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrapnegative.worker.js new file mode 100644 index 0000000000..932ecf6512 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrapnegative.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.transformation.rotate.wrapnegative +// Description:rotate() wraps large negative values correctly +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("rotate() wraps large negative values correctly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.rotate(-Math.PI * (1 + 4096)); + ctx.fillStyle = '#0f0'; + ctx.fillRect(-100, -50, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,2, 0,255,0,255); + _assertPixel(canvas, 98,47, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.zero.html b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.zero.html new file mode 100644 index 0000000000..965d0e0768 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.zero.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.transformation.rotate.zero + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.transformation.rotate.zero

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  rotate() by 0 does nothing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.zero.worker.js b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.zero.worker.js new file mode 100644 index 0000000000..659c9fd7a0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.zero.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.transformation.rotate.zero +// Description:rotate() by 0 does nothing +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("rotate() by 0 does nothing"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.rotate(0); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.basic.html b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.basic.html new file mode 100644 index 0000000000..d4063f7129 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.basic.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.transformation.scale.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.transformation.scale.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  scale() works

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.basic.worker.js new file mode 100644 index 0000000000..5e79daf3f4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.basic.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.transformation.scale.basic +// Description:scale() works +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("scale() works"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.scale(2, 4); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 12.5); + _assertPixel(canvas, 90,40, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.large.html b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.large.html new file mode 100644 index 0000000000..ae8f954a71 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.large.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.transformation.scale.large + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.transformation.scale.large

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  scale() with large scale factors works

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Not really that large at all, but it hits the limits in Firefox. + diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.large.worker.js b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.large.worker.js new file mode 100644 index 0000000000..6d71627728 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.large.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.transformation.scale.large +// Description:scale() with large scale factors works +// Note:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Not really that large at all, but it hits the limits in Firefox. + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("scale() with large scale factors works"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.scale(1e5, 1e5); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 1, 1); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.multiple.html b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.multiple.html new file mode 100644 index 0000000000..6a899d1dd6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.multiple.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.transformation.scale.multiple + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.transformation.scale.multiple

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Multiple scale()s combine

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.multiple.worker.js b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.multiple.worker.js new file mode 100644 index 0000000000..921e95aa72 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.multiple.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.transformation.scale.multiple +// Description:Multiple scale()s combine +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Multiple scale()s combine"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.scale(Math.sqrt(2), Math.sqrt(2)); + ctx.scale(Math.sqrt(2), Math.sqrt(2)); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 25); + _assertPixel(canvas, 90,40, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.negative.html b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.negative.html new file mode 100644 index 0000000000..68c5780332 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.negative.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.transformation.scale.negative + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.transformation.scale.negative

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  scale() with negative scale factors works

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.negative.worker.js b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.negative.worker.js new file mode 100644 index 0000000000..cb0f01c618 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.negative.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.transformation.scale.negative +// Description:scale() with negative scale factors works +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("scale() with negative scale factors works"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.save(); + ctx.scale(-1, 1); + ctx.fillStyle = '#0f0'; + ctx.fillRect(-50, 0, 50, 50); + ctx.restore(); + + ctx.save(); + ctx.scale(1, -1); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, -50, 50, 50); + ctx.restore(); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.nonfinite.html b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.nonfinite.html new file mode 100644 index 0000000000..5fd95629c9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.nonfinite.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.transformation.scale.nonfinite + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.transformation.scale.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  scale() with Infinity/NaN is ignored

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.nonfinite.worker.js b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.nonfinite.worker.js new file mode 100644 index 0000000000..35f9c90e71 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.nonfinite.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.transformation.scale.nonfinite +// Description:scale() with Infinity/NaN is ignored +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("scale() with Infinity/NaN is ignored"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.translate(100, 10); + ctx.scale(Infinity, 0.1); + ctx.scale(-Infinity, 0.1); + ctx.scale(NaN, 0.1); + ctx.scale(0.1, Infinity); + ctx.scale(0.1, -Infinity); + ctx.scale(0.1, NaN); + ctx.scale(Infinity, Infinity); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(-100, -10, 100, 50); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.zero.html b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.zero.html new file mode 100644 index 0000000000..b4269bd140 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.zero.html @@ -0,0 +1,44 @@ + + +OffscreenCanvas test: 2d.transformation.scale.zero + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.transformation.scale.zero

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  scale() with a scale factor of zero works

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.zero.worker.js b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.zero.worker.js new file mode 100644 index 0000000000..9e90127cfe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.scale.zero.worker.js @@ -0,0 +1,39 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.transformation.scale.zero +// Description:scale() with a scale factor of zero works +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("scale() with a scale factor of zero works"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.save(); + ctx.translate(50, 0); + ctx.scale(0, 1); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.restore(); + + ctx.save(); + ctx.translate(0, 25); + ctx.scale(1, 0); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.restore(); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.multiple.html b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.multiple.html new file mode 100644 index 0000000000..0395c561bf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.multiple.html @@ -0,0 +1,35 @@ + + +OffscreenCanvas test: 2d.transformation.setTransform.multiple + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.transformation.setTransform.multiple

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.multiple.worker.js b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.multiple.worker.js new file mode 100644 index 0000000000..e3e6daf878 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.multiple.worker.js @@ -0,0 +1,30 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.transformation.setTransform.multiple +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.setTransform(1/2,0, 0,1/2, 0,0); + ctx.setTransform(); + ctx.setTransform(2,0, 0,2, 0,0); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 25); + _assertPixel(canvas, 75,35, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.nonfinite.html b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.nonfinite.html new file mode 100644 index 0000000000..474b20a10b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.nonfinite.html @@ -0,0 +1,110 @@ + + +OffscreenCanvas test: 2d.transformation.setTransform.nonfinite + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.transformation.setTransform.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  setTransform() with Infinity/NaN is ignored

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.nonfinite.worker.js b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.nonfinite.worker.js new file mode 100644 index 0000000000..d99ea52dea --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.nonfinite.worker.js @@ -0,0 +1,105 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.transformation.setTransform.nonfinite +// Description:setTransform() with Infinity/NaN is ignored +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("setTransform() with Infinity/NaN is ignored"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.translate(100, 10); + ctx.setTransform(Infinity, 0, 0, 0, 0, 0); + ctx.setTransform(-Infinity, 0, 0, 0, 0, 0); + ctx.setTransform(NaN, 0, 0, 0, 0, 0); + ctx.setTransform(0, Infinity, 0, 0, 0, 0); + ctx.setTransform(0, -Infinity, 0, 0, 0, 0); + ctx.setTransform(0, NaN, 0, 0, 0, 0); + ctx.setTransform(0, 0, Infinity, 0, 0, 0); + ctx.setTransform(0, 0, -Infinity, 0, 0, 0); + ctx.setTransform(0, 0, NaN, 0, 0, 0); + ctx.setTransform(0, 0, 0, Infinity, 0, 0); + ctx.setTransform(0, 0, 0, -Infinity, 0, 0); + ctx.setTransform(0, 0, 0, NaN, 0, 0); + ctx.setTransform(0, 0, 0, 0, Infinity, 0); + ctx.setTransform(0, 0, 0, 0, -Infinity, 0); + ctx.setTransform(0, 0, 0, 0, NaN, 0); + ctx.setTransform(0, 0, 0, 0, 0, Infinity); + ctx.setTransform(0, 0, 0, 0, 0, -Infinity); + ctx.setTransform(0, 0, 0, 0, 0, NaN); + ctx.setTransform(Infinity, Infinity, 0, 0, 0, 0); + ctx.setTransform(Infinity, Infinity, Infinity, 0, 0, 0); + ctx.setTransform(Infinity, Infinity, Infinity, Infinity, 0, 0); + ctx.setTransform(Infinity, Infinity, Infinity, Infinity, Infinity, 0); + ctx.setTransform(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); + ctx.setTransform(Infinity, Infinity, Infinity, Infinity, 0, Infinity); + ctx.setTransform(Infinity, Infinity, Infinity, 0, Infinity, 0); + ctx.setTransform(Infinity, Infinity, Infinity, 0, Infinity, Infinity); + ctx.setTransform(Infinity, Infinity, Infinity, 0, 0, Infinity); + ctx.setTransform(Infinity, Infinity, 0, Infinity, 0, 0); + ctx.setTransform(Infinity, Infinity, 0, Infinity, Infinity, 0); + ctx.setTransform(Infinity, Infinity, 0, Infinity, Infinity, Infinity); + ctx.setTransform(Infinity, Infinity, 0, Infinity, 0, Infinity); + ctx.setTransform(Infinity, Infinity, 0, 0, Infinity, 0); + ctx.setTransform(Infinity, Infinity, 0, 0, Infinity, Infinity); + ctx.setTransform(Infinity, Infinity, 0, 0, 0, Infinity); + ctx.setTransform(Infinity, 0, Infinity, 0, 0, 0); + ctx.setTransform(Infinity, 0, Infinity, Infinity, 0, 0); + ctx.setTransform(Infinity, 0, Infinity, Infinity, Infinity, 0); + ctx.setTransform(Infinity, 0, Infinity, Infinity, Infinity, Infinity); + ctx.setTransform(Infinity, 0, Infinity, Infinity, 0, Infinity); + ctx.setTransform(Infinity, 0, Infinity, 0, Infinity, 0); + ctx.setTransform(Infinity, 0, Infinity, 0, Infinity, Infinity); + ctx.setTransform(Infinity, 0, Infinity, 0, 0, Infinity); + ctx.setTransform(Infinity, 0, 0, Infinity, 0, 0); + ctx.setTransform(Infinity, 0, 0, Infinity, Infinity, 0); + ctx.setTransform(Infinity, 0, 0, Infinity, Infinity, Infinity); + ctx.setTransform(Infinity, 0, 0, Infinity, 0, Infinity); + ctx.setTransform(Infinity, 0, 0, 0, Infinity, 0); + ctx.setTransform(Infinity, 0, 0, 0, Infinity, Infinity); + ctx.setTransform(Infinity, 0, 0, 0, 0, Infinity); + ctx.setTransform(0, Infinity, Infinity, 0, 0, 0); + ctx.setTransform(0, Infinity, Infinity, Infinity, 0, 0); + ctx.setTransform(0, Infinity, Infinity, Infinity, Infinity, 0); + ctx.setTransform(0, Infinity, Infinity, Infinity, Infinity, Infinity); + ctx.setTransform(0, Infinity, Infinity, Infinity, 0, Infinity); + ctx.setTransform(0, Infinity, Infinity, 0, Infinity, 0); + ctx.setTransform(0, Infinity, Infinity, 0, Infinity, Infinity); + ctx.setTransform(0, Infinity, Infinity, 0, 0, Infinity); + ctx.setTransform(0, Infinity, 0, Infinity, 0, 0); + ctx.setTransform(0, Infinity, 0, Infinity, Infinity, 0); + ctx.setTransform(0, Infinity, 0, Infinity, Infinity, Infinity); + ctx.setTransform(0, Infinity, 0, Infinity, 0, Infinity); + ctx.setTransform(0, Infinity, 0, 0, Infinity, 0); + ctx.setTransform(0, Infinity, 0, 0, Infinity, Infinity); + ctx.setTransform(0, Infinity, 0, 0, 0, Infinity); + ctx.setTransform(0, 0, Infinity, Infinity, 0, 0); + ctx.setTransform(0, 0, Infinity, Infinity, Infinity, 0); + ctx.setTransform(0, 0, Infinity, Infinity, Infinity, Infinity); + ctx.setTransform(0, 0, Infinity, Infinity, 0, Infinity); + ctx.setTransform(0, 0, Infinity, 0, Infinity, 0); + ctx.setTransform(0, 0, Infinity, 0, Infinity, Infinity); + ctx.setTransform(0, 0, Infinity, 0, 0, Infinity); + ctx.setTransform(0, 0, 0, Infinity, Infinity, 0); + ctx.setTransform(0, 0, 0, Infinity, Infinity, Infinity); + ctx.setTransform(0, 0, 0, Infinity, 0, Infinity); + ctx.setTransform(0, 0, 0, 0, Infinity, Infinity); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(-100, -10, 100, 50); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.skewed.html b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.skewed.html new file mode 100644 index 0000000000..2d24d61f4b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.skewed.html @@ -0,0 +1,55 @@ + + +OffscreenCanvas test: 2d.transformation.setTransform.skewed + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.transformation.setTransform.skewed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.skewed.worker.js b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.skewed.worker.js new file mode 100644 index 0000000000..161f4087e5 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.skewed.worker.js @@ -0,0 +1,50 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.transformation.setTransform.skewed +// Description: +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test(""); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + // Create green with a red square ring inside it + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(20, 10, 60, 30); + ctx.fillStyle = '#0f0'; + ctx.fillRect(40, 20, 20, 10); + + // Draw a skewed shape to fill that gap, to make sure it is aligned correctly + ctx.setTransform(1,4, 2,3, 5,6); + // Post-transform coordinates: + // [[20,10],[80,10],[80,40],[20,40],[20,10],[40,20],[40,30],[60,30],[60,20],[40,20],[20,10]]; + // Hence pre-transform coordinates: + var pts=[[-7.4,11.2],[-43.4,59.2],[-31.4,53.2],[4.6,5.2],[-7.4,11.2], + [-15.4,25.2],[-11.4,23.2],[-23.4,39.2],[-27.4,41.2],[-15.4,25.2], + [-7.4,11.2]]; + ctx.beginPath(); + ctx.moveTo(pts[0][0], pts[0][1]); + for (var i = 0; i < pts.length; ++i) + ctx.lineTo(pts[i][0], pts[i][1]); + ctx.fill(); + _assertPixel(canvas, 21,11, 0,255,0,255); + _assertPixel(canvas, 79,11, 0,255,0,255); + _assertPixel(canvas, 21,39, 0,255,0,255); + _assertPixel(canvas, 79,39, 0,255,0,255); + _assertPixel(canvas, 39,19, 0,255,0,255); + _assertPixel(canvas, 61,19, 0,255,0,255); + _assertPixel(canvas, 39,31, 0,255,0,255); + _assertPixel(canvas, 61,31, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.identity.html b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.identity.html new file mode 100644 index 0000000000..d88b3bc03c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.identity.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.transformation.transform.identity + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.transformation.transform.identity

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  transform() with the identity matrix does nothing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.identity.worker.js b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.identity.worker.js new file mode 100644 index 0000000000..67202628c6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.identity.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.transformation.transform.identity +// Description:transform() with the identity matrix does nothing +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("transform() with the identity matrix does nothing"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.transform(1,0, 0,1, 0,0); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.multiply.html b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.multiply.html new file mode 100644 index 0000000000..a7dfbe5f34 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.multiply.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.transformation.transform.multiply + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.transformation.transform.multiply

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  transform() multiplies the CTM

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.multiply.worker.js b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.multiply.worker.js new file mode 100644 index 0000000000..aa89a7d8ca --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.multiply.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.transformation.transform.multiply +// Description:transform() multiplies the CTM +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("transform() multiplies the CTM"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.transform(1,2, 3,4, 5,6); + ctx.transform(-2,1, 3/2,-1/2, 1,-2); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.nonfinite.html b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.nonfinite.html new file mode 100644 index 0000000000..c4cd459c8b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.nonfinite.html @@ -0,0 +1,110 @@ + + +OffscreenCanvas test: 2d.transformation.transform.nonfinite + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.transformation.transform.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  transform() with Infinity/NaN is ignored

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.nonfinite.worker.js b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.nonfinite.worker.js new file mode 100644 index 0000000000..c96af44b59 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.nonfinite.worker.js @@ -0,0 +1,105 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.transformation.transform.nonfinite +// Description:transform() with Infinity/NaN is ignored +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("transform() with Infinity/NaN is ignored"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.translate(100, 10); + ctx.transform(Infinity, 0, 0, 0, 0, 0); + ctx.transform(-Infinity, 0, 0, 0, 0, 0); + ctx.transform(NaN, 0, 0, 0, 0, 0); + ctx.transform(0, Infinity, 0, 0, 0, 0); + ctx.transform(0, -Infinity, 0, 0, 0, 0); + ctx.transform(0, NaN, 0, 0, 0, 0); + ctx.transform(0, 0, Infinity, 0, 0, 0); + ctx.transform(0, 0, -Infinity, 0, 0, 0); + ctx.transform(0, 0, NaN, 0, 0, 0); + ctx.transform(0, 0, 0, Infinity, 0, 0); + ctx.transform(0, 0, 0, -Infinity, 0, 0); + ctx.transform(0, 0, 0, NaN, 0, 0); + ctx.transform(0, 0, 0, 0, Infinity, 0); + ctx.transform(0, 0, 0, 0, -Infinity, 0); + ctx.transform(0, 0, 0, 0, NaN, 0); + ctx.transform(0, 0, 0, 0, 0, Infinity); + ctx.transform(0, 0, 0, 0, 0, -Infinity); + ctx.transform(0, 0, 0, 0, 0, NaN); + ctx.transform(Infinity, Infinity, 0, 0, 0, 0); + ctx.transform(Infinity, Infinity, Infinity, 0, 0, 0); + ctx.transform(Infinity, Infinity, Infinity, Infinity, 0, 0); + ctx.transform(Infinity, Infinity, Infinity, Infinity, Infinity, 0); + ctx.transform(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); + ctx.transform(Infinity, Infinity, Infinity, Infinity, 0, Infinity); + ctx.transform(Infinity, Infinity, Infinity, 0, Infinity, 0); + ctx.transform(Infinity, Infinity, Infinity, 0, Infinity, Infinity); + ctx.transform(Infinity, Infinity, Infinity, 0, 0, Infinity); + ctx.transform(Infinity, Infinity, 0, Infinity, 0, 0); + ctx.transform(Infinity, Infinity, 0, Infinity, Infinity, 0); + ctx.transform(Infinity, Infinity, 0, Infinity, Infinity, Infinity); + ctx.transform(Infinity, Infinity, 0, Infinity, 0, Infinity); + ctx.transform(Infinity, Infinity, 0, 0, Infinity, 0); + ctx.transform(Infinity, Infinity, 0, 0, Infinity, Infinity); + ctx.transform(Infinity, Infinity, 0, 0, 0, Infinity); + ctx.transform(Infinity, 0, Infinity, 0, 0, 0); + ctx.transform(Infinity, 0, Infinity, Infinity, 0, 0); + ctx.transform(Infinity, 0, Infinity, Infinity, Infinity, 0); + ctx.transform(Infinity, 0, Infinity, Infinity, Infinity, Infinity); + ctx.transform(Infinity, 0, Infinity, Infinity, 0, Infinity); + ctx.transform(Infinity, 0, Infinity, 0, Infinity, 0); + ctx.transform(Infinity, 0, Infinity, 0, Infinity, Infinity); + ctx.transform(Infinity, 0, Infinity, 0, 0, Infinity); + ctx.transform(Infinity, 0, 0, Infinity, 0, 0); + ctx.transform(Infinity, 0, 0, Infinity, Infinity, 0); + ctx.transform(Infinity, 0, 0, Infinity, Infinity, Infinity); + ctx.transform(Infinity, 0, 0, Infinity, 0, Infinity); + ctx.transform(Infinity, 0, 0, 0, Infinity, 0); + ctx.transform(Infinity, 0, 0, 0, Infinity, Infinity); + ctx.transform(Infinity, 0, 0, 0, 0, Infinity); + ctx.transform(0, Infinity, Infinity, 0, 0, 0); + ctx.transform(0, Infinity, Infinity, Infinity, 0, 0); + ctx.transform(0, Infinity, Infinity, Infinity, Infinity, 0); + ctx.transform(0, Infinity, Infinity, Infinity, Infinity, Infinity); + ctx.transform(0, Infinity, Infinity, Infinity, 0, Infinity); + ctx.transform(0, Infinity, Infinity, 0, Infinity, 0); + ctx.transform(0, Infinity, Infinity, 0, Infinity, Infinity); + ctx.transform(0, Infinity, Infinity, 0, 0, Infinity); + ctx.transform(0, Infinity, 0, Infinity, 0, 0); + ctx.transform(0, Infinity, 0, Infinity, Infinity, 0); + ctx.transform(0, Infinity, 0, Infinity, Infinity, Infinity); + ctx.transform(0, Infinity, 0, Infinity, 0, Infinity); + ctx.transform(0, Infinity, 0, 0, Infinity, 0); + ctx.transform(0, Infinity, 0, 0, Infinity, Infinity); + ctx.transform(0, Infinity, 0, 0, 0, Infinity); + ctx.transform(0, 0, Infinity, Infinity, 0, 0); + ctx.transform(0, 0, Infinity, Infinity, Infinity, 0); + ctx.transform(0, 0, Infinity, Infinity, Infinity, Infinity); + ctx.transform(0, 0, Infinity, Infinity, 0, Infinity); + ctx.transform(0, 0, Infinity, 0, Infinity, 0); + ctx.transform(0, 0, Infinity, 0, Infinity, Infinity); + ctx.transform(0, 0, Infinity, 0, 0, Infinity); + ctx.transform(0, 0, 0, Infinity, Infinity, 0); + ctx.transform(0, 0, 0, Infinity, Infinity, Infinity); + ctx.transform(0, 0, 0, Infinity, 0, Infinity); + ctx.transform(0, 0, 0, 0, Infinity, Infinity); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(-100, -10, 100, 50); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.skewed.html b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.skewed.html new file mode 100644 index 0000000000..2f3c0453e3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.skewed.html @@ -0,0 +1,55 @@ + + +OffscreenCanvas test: 2d.transformation.transform.skewed + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.transformation.transform.skewed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  transform() with skewy matrix transforms correctly

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.skewed.worker.js b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.skewed.worker.js new file mode 100644 index 0000000000..c7ebaf9a83 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.skewed.worker.js @@ -0,0 +1,50 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.transformation.transform.skewed +// Description:transform() with skewy matrix transforms correctly +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("transform() with skewy matrix transforms correctly"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + // Create green with a red square ring inside it + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(20, 10, 60, 30); + ctx.fillStyle = '#0f0'; + ctx.fillRect(40, 20, 20, 10); + + // Draw a skewed shape to fill that gap, to make sure it is aligned correctly + ctx.transform(1,4, 2,3, 5,6); + // Post-transform coordinates: + // [[20,10],[80,10],[80,40],[20,40],[20,10],[40,20],[40,30],[60,30],[60,20],[40,20],[20,10]]; + // Hence pre-transform coordinates: + var pts=[[-7.4,11.2],[-43.4,59.2],[-31.4,53.2],[4.6,5.2],[-7.4,11.2], + [-15.4,25.2],[-11.4,23.2],[-23.4,39.2],[-27.4,41.2],[-15.4,25.2], + [-7.4,11.2]]; + ctx.beginPath(); + ctx.moveTo(pts[0][0], pts[0][1]); + for (var i = 0; i < pts.length; ++i) + ctx.lineTo(pts[i][0], pts[i][1]); + ctx.fill(); + _assertPixel(canvas, 21,11, 0,255,0,255); + _assertPixel(canvas, 79,11, 0,255,0,255); + _assertPixel(canvas, 21,39, 0,255,0,255); + _assertPixel(canvas, 79,39, 0,255,0,255); + _assertPixel(canvas, 39,19, 0,255,0,255); + _assertPixel(canvas, 61,19, 0,255,0,255); + _assertPixel(canvas, 39,31, 0,255,0,255); + _assertPixel(canvas, 61,31, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.translate.basic.html b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.translate.basic.html new file mode 100644 index 0000000000..f68225c077 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.translate.basic.html @@ -0,0 +1,33 @@ + + +OffscreenCanvas test: 2d.transformation.translate.basic + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.transformation.translate.basic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  translate() works

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.translate.basic.worker.js b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.translate.basic.worker.js new file mode 100644 index 0000000000..f377ab8a48 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.translate.basic.worker.js @@ -0,0 +1,28 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.transformation.translate.basic +// Description:translate() works +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("translate() works"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.translate(100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(-100, -50, 100, 50); + _assertPixel(canvas, 90,40, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.translate.nonfinite.html b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.translate.nonfinite.html new file mode 100644 index 0000000000..ebab949b4c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.translate.nonfinite.html @@ -0,0 +1,42 @@ + + +OffscreenCanvas test: 2d.transformation.translate.nonfinite + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.transformation.translate.nonfinite

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  translate() with Infinity/NaN is ignored

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.translate.nonfinite.worker.js b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.translate.nonfinite.worker.js new file mode 100644 index 0000000000..7ad6fce2ba --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.translate.nonfinite.worker.js @@ -0,0 +1,37 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.transformation.translate.nonfinite +// Description:translate() with Infinity/NaN is ignored +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("translate() with Infinity/NaN is ignored"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.translate(100, 10); + ctx.translate(Infinity, 0.1); + ctx.translate(-Infinity, 0.1); + ctx.translate(NaN, 0.1); + ctx.translate(0.1, Infinity); + ctx.translate(0.1, -Infinity); + ctx.translate(0.1, NaN); + ctx.translate(Infinity, Infinity); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(-100, -10, 100, 50); + + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.p3.html b/testing/web-platform/tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.p3.html new file mode 100644 index 0000000000..e1391e9010 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.p3.html @@ -0,0 +1,39 @@ + + +OffscreenCanvas test: 2d.color.space.p3.to.p3 + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.color.space.p3.to.p3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  test getImageData with display-p3 and uint8 from display p3 uint8 canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.p3.worker.js b/testing/web-platform/tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.p3.worker.js new file mode 100644 index 0000000000..844cd93f81 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.p3.worker.js @@ -0,0 +1,34 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.color.space.p3.to.p3 +// Description:test getImageData with display-p3 and uint8 from display p3 uint8 canvas +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("test getImageData with display-p3 and uint8 from display p3 uint8 canvas"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d', {colorSpace: "display-p3"}); + + var color_style = 'rgb(50, 100, 150)'; + // [0.24304, 0.38818, 0.57227, 1.0] * 255 = [62, 99, 146, 255] + var pixel_expected = [62, 99, 146, 255]; + var epsilon = 2; + ctx.fillStyle = color_style; + ctx.fillRect(0, 0, 10, 10); + + var pixel = ctx.getImageData(5, 5, 1, 1, {colorSpace: "display-p3", storageFormat: "uint8"}).data; + _assertSame(pixel.length, pixel_expected.length, "pixel.length", "pixel_expected.length"); + assert_approx_equals(pixel[0], pixel_expected[0], 2); + assert_approx_equals(pixel[1], pixel_expected[1], 2); + assert_approx_equals(pixel[2], pixel_expected[2], 2); + assert_approx_equals(pixel[3], pixel_expected[3], 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.srgb.html b/testing/web-platform/tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.srgb.html new file mode 100644 index 0000000000..0628744421 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.srgb.html @@ -0,0 +1,38 @@ + + +OffscreenCanvas test: 2d.color.space.p3.to.srgb + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2d.color.space.p3.to.srgb

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  test getImageData with srsb and uint8 from display p3 uint8 canvas

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + diff --git a/testing/web-platform/tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.srgb.worker.js b/testing/web-platform/tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.srgb.worker.js new file mode 100644 index 0000000000..619c59076d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.srgb.worker.js @@ -0,0 +1,33 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.color.space.p3.to.srgb +// Description:test getImageData with srsb and uint8 from display p3 uint8 canvas +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("test getImageData with srsb and uint8 from display p3 uint8 canvas"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d', {colorSpace: "display-p3"}); + + var color_style = 'rgb(50, 100, 150)'; + var pixel_expected = [50, 100, 150, 255]; + var epsilon = 2; + ctx.fillStyle = color_style; + ctx.fillRect(0, 0, 10, 10); + + var pixel = ctx.getImageData(5, 5, 1, 1, {colorSpace: "srgb", storageFormat: "uint8"}).data; + _assertSame(pixel.length, pixel_expected.length, "pixel.length", "pixel_expected.length"); + assert_approx_equals(pixel[0], pixel_expected[0], 2); + assert_approx_equals(pixel[1], pixel_expected[1], 2); + assert_approx_equals(pixel[2], pixel_expected[2], 2); + assert_approx_equals(pixel[3], pixel_expected[3], 2); + t.done(); +}); +done(); diff --git a/testing/web-platform/tests/html/canvas/resources/2x2.png b/testing/web-platform/tests/html/canvas/resources/2x2.png new file mode 100644 index 0000000000..9be31562b3 Binary files /dev/null and b/testing/web-platform/tests/html/canvas/resources/2x2.png differ diff --git a/testing/web-platform/tests/html/canvas/resources/canvas-frame.css b/testing/web-platform/tests/html/canvas/resources/canvas-frame.css new file mode 100644 index 0000000000..0c97a680d1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/resources/canvas-frame.css @@ -0,0 +1,21 @@ +body { + font-size: small; + font-family: sans-serif; +} + +p { + line-height: 0; +} + +p:first-child { + display: inline; +} + +h1 { + display: inline; +} + +iframe, object { + border: 1px black solid; + margin: 2px; +} diff --git a/testing/web-platform/tests/html/canvas/resources/canvas-frame.css.headers b/testing/web-platform/tests/html/canvas/resources/canvas-frame.css.headers new file mode 100644 index 0000000000..e13897f157 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/resources/canvas-frame.css.headers @@ -0,0 +1 @@ +Content-Type: text/css; charset=utf-8 diff --git a/testing/web-platform/tests/html/canvas/resources/canvas-index.css b/testing/web-platform/tests/html/canvas/resources/canvas-index.css new file mode 100644 index 0000000000..ef35864bc0 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/resources/canvas-index.css @@ -0,0 +1,31 @@ +body { + font-size: small; + font-family: sans-serif; +} + +a { + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +h3 { + display: inline; + font-size: medium; +} + +h3 + p { + display: inline; + margin-left: 0.5em; +} + +li { + list-style-type: none; +} + +ul { + padding-left: 2em; + margin-left: 0; +} diff --git a/testing/web-platform/tests/html/canvas/resources/canvas-index.css.headers b/testing/web-platform/tests/html/canvas/resources/canvas-index.css.headers new file mode 100644 index 0000000000..e13897f157 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/resources/canvas-index.css.headers @@ -0,0 +1 @@ +Content-Type: text/css; charset=utf-8 diff --git a/testing/web-platform/tests/html/canvas/resources/canvas-spec.css b/testing/web-platform/tests/html/canvas/resources/canvas-spec.css new file mode 100644 index 0000000000..5882acb68e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/resources/canvas-spec.css @@ -0,0 +1,50 @@ +.testrefs { + font-size: small; + margin-left: 0.2em; + margin-right: 0.2em; + border-bottom: none !important; + + font-weight: normal; + font-style: normal; + white-space: normal; + font-family: sans-serif; +} + +.kw-must, .kw-required { + background: #fda; +} + +.kw-should { + background: #ffa; +} + +.kw-none { + background: #dfa; +} + + +pre.idl .testrefs :link { + color: #00c; +} + +pre.idl .testrefs :visited { + color: #609; +} + +.testrefs a:hover { + background: transparent; + text-decoration: none; +} + +.testrefs:before { + content: '['; +} + +.testrefs:after { + content: ']'; +} + +.testrefs a:first-child { + font-weight: bold; + text-decoration: none; +} diff --git a/testing/web-platform/tests/html/canvas/resources/canvas-spec.css.headers b/testing/web-platform/tests/html/canvas/resources/canvas-spec.css.headers new file mode 100644 index 0000000000..e13897f157 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/resources/canvas-spec.css.headers @@ -0,0 +1 @@ +Content-Type: text/css; charset=utf-8 diff --git a/testing/web-platform/tests/html/canvas/resources/canvas-tests.css b/testing/web-platform/tests/html/canvas/resources/canvas-tests.css new file mode 100644 index 0000000000..e006e812de --- /dev/null +++ b/testing/web-platform/tests/html/canvas/resources/canvas-tests.css @@ -0,0 +1,134 @@ +html.fail { + background: #f66; +} +html.pass { + background: #6f6; +} +html.needs_check { + background: #99f; +} + +body { + font-size: small; + font-family: sans-serif; + color: black; +} + +a:link { + color: #00c; +} +a:visited { + color: #808; +} + +body.framed { + font-size: x-small; +} + +h1 { + font-size: larger; + margin: 0; + padding-left: 0.5em; + text-indent: -0.5em; +} + +p { + margin: 0; +} + +p.notes { + margin-bottom: 0.5em; + font-style: italic; +} + +ul { + margin: 0; + margin-bottom: 0.5em; + padding: 0; + padding-left: 1em; +} + +.refs { + font-style: italic; + margin-bottom: 0.5em; +} + +.refs ul { + display: inline; + margin: 0; + padding: 0; +} + +.refs li { + display: inline; + list-style-type: none; + margin: 0; + padding: 0; +} + +canvas { + display: none; + visibility: hidden; + border: 2px #f0f solid; + background: url(../images/background.png); +} + +img.expected { + display: none; + border: 2px #f0f solid; + background: url(../images/background.png); +} + +iframe { + border: 2px #f0f solid; +} + +.output { + display: none; +} + +.show_output .output, .needs_check .output { + display: block !important; + visibility: visible !important; +} + +.show_output #show_output { + display: none; +} + +.resource { + visibility: hidden; + height: 0; +} + +.fallback { + font-size: 2em; + font-weight: bold; + color: #a00; +} + + +html.minimal body { + color: white; +} +html.fail.minimal { + background: #f00; +} +html.pass.minimal { + background: #080; +} +html.needs_check.minimal { + background: #008; +} +.minimal #d { + display: none !important; +} +.minimal .expectedtext { + visibility: hidden !important; +} +#passtext, #failtext { + display: none; +} +.minimal.pass #passtext, .minimal.fail #failtext { + display: block; +} diff --git a/testing/web-platform/tests/html/canvas/resources/canvas-tests.css.headers b/testing/web-platform/tests/html/canvas/resources/canvas-tests.css.headers new file mode 100644 index 0000000000..e13897f157 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/resources/canvas-tests.css.headers @@ -0,0 +1 @@ +Content-Type: text/css; charset=utf-8 diff --git a/testing/web-platform/tests/html/canvas/resources/canvas-tests.js b/testing/web-platform/tests/html/canvas/resources/canvas-tests.js new file mode 100644 index 0000000000..c6e2873283 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/resources/canvas-tests.js @@ -0,0 +1,221 @@ +function _valToString(val) +{ + if (val === undefined || val === null) + return '[' + typeof(val) + ']'; + return val.toString() + '[' + typeof(val) + ']'; +} + +function _assert(cond, text) +{ + assert_true(!!cond, text); +} + +function _assertSame(a, b, text_a, text_b) +{ + var msg = text_a + ' === ' + text_b + ' (got ' + _valToString(a) + + ', expected ' + _valToString(b) + ')'; + assert_equals(a, b, msg); +} + +function _assertDifferent(a, b, text_a, text_b) +{ + var msg = text_a + ' !== ' + text_b + ' (got ' + _valToString(a) + + ', expected not ' + _valToString(b) + ')'; + assert_not_equals(a, b, msg); +} + + +function _getPixel(canvas, x,y) +{ + var ctx = canvas.getContext('2d'); + var imgdata = ctx.getImageData(x, y, 1, 1); + return [ imgdata.data[0], imgdata.data[1], imgdata.data[2], imgdata.data[3] ]; +} + +function _assertPixel(canvas, x, y, r, g, b, a) +{ + var c = _getPixel(canvas, x,y); + assert_equals(c[0], r, 'Red channel of the pixel at (' + x + ', ' + y + ')'); + assert_equals(c[1], g, 'Green channel of the pixel at (' + x + ', ' + y + ')'); + assert_equals(c[2], b, 'Blue channel of the pixel at (' + x + ', ' + y + ')'); + assert_equals(c[3], a, 'Alpha channel of the pixel at (' + x + ', ' + y + ')'); +} + +function _assertPixelApprox(canvas, x, y, r, g, b, a, tolerance) +{ + 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 + ')'); +} + +function _assertMatricesApproxEqual(matA, matB) +{ + A = matA.toFloat32Array(); + B = matB.toFloat32Array(); + assert_equals(A.length, B.length); + for (var i = 0; i < A.length; i++) { + assert_approx_equals(A[i], B[i], 10e-6); + } +} + +function rad2deg(angle_in_radians) { + return angle_in_radians / Math.PI * 180; +} + +function deg2rad(angle_in_degrees) { + return angle_in_degrees / 180 * Math.PI; +} + +let _deferred = false; + +function deferTest() { + _deferred = true; +} + +function _addTest(testFn, attributes={}) +{ + on_event(window, "load", function() + { + t.step(function() { + var canvas = document.getElementById('c'); + var ctx = canvas.getContext('2d', attributes); + t.step(testFn, window, canvas, ctx); + }); + + if (!_deferred) { + t.done(); + } + }); +} + +function _assertGreen(ctx, canvasWidth, canvasHeight) +{ + var testColor = function(d, idx, expected) { + assert_equals(d[idx], expected, "d[" + idx + "]", String(expected)); + }; + var imagedata = ctx.getImageData(0, 0, canvasWidth, canvasHeight); + var w = imagedata.width, h = imagedata.height, d = imagedata.data; + for (var i = 0; i < h; ++i) { + for (var j = 0; j < w; ++j) { + testColor(d, 4 * (w * i + j) + 0, 0); + testColor(d, 4 * (w * i + j) + 1, 255); + testColor(d, 4 * (w * i + j) + 2, 0); + testColor(d, 4 * (w * i + j) + 3, 255); + } + } +} + +function addCrossOriginYellowImage() +{ + var img = new Image(); + img.id = "yellow.png"; + img.className = "resource"; + img.src = get_host_info().HTTP_REMOTE_ORIGIN + "/images/yellow.png"; + document.body.appendChild(img); +} + +function addCrossOriginRedirectYellowImage() +{ + var img = new Image(); + img.id = "yellow.png"; + img.className = "resource"; + img.src = get_host_info().HTTP_ORIGIN + "/common/redirect.py?location=" + + get_host_info().HTTP_REMOTE_ORIGIN + "/images/yellow.png"; + document.body.appendChild(img); +} + +function forEachCanvasSource(crossOriginUrl, sameOriginUrl, callback) { + function makeImage() { + return new Promise((resolve, reject) => { + const image = new Image(); + image.onload = () => resolve(image); + image.onerror = reject; + image.src = crossOriginUrl + "/images/red.png"; + }); + } + + const arguments = [ + { + name: "cross-origin HTMLImageElement", + factory: makeImage, + }, + + { + name: "cross-origin SVGImageElement", + factory: () => { + return new Promise((resolve, reject) => { + const image = document.createElementNS("http://www.w3.org/2000/svg", "image"); + image.onload = () => resolve(image); + image.onerror = reject; + image.setAttribute("externalResourcesRequired", "true"); + image.setAttributeNS("http://www.w3.org/1999/xlink", 'xlink:href', crossOriginUrl + "/images/red.png"); + document.body.appendChild(image); + }); + }, + }, + + { + name: "cross-origin HTMLVideoElement", + factory: () => { + return new Promise((resolve, reject) => { + const video = document.createElement("video"); + video.oncanplaythrough = () => resolve(video); + video.preload = "auto"; + video.onerror = reject; + video.src = getVideoURI(crossOriginUrl + "/media/movie_300"); + }); + }, + }, + + { + name: "redirected to cross-origin HTMLVideoElement", + factory: () => { + return new Promise((resolve, reject) => { + const video = document.createElement("video"); + video.oncanplaythrough = () => resolve(video); + video.preload = "auto"; + video.onerror = reject; + video.src = "/common/redirect.py?location=" + getVideoURI(crossOriginUrl + "/media/movie_300"); + }); + }, + }, + + { + name: "redirected to same-origin HTMLVideoElement", + factory: () => { + return new Promise((resolve, reject) => { + const video = document.createElement("video"); + video.oncanplaythrough = () => resolve(video); + video.preload = "auto"; + video.onerror = reject; + video.src = crossOriginUrl + "/common/redirect.py?location=" + getVideoURI(sameOriginUrl + "/media/movie_300"); + }); + }, + }, + + { + name: "unclean HTMLCanvasElement", + factory: () => { + return makeImage().then(image => { + const canvas = document.createElement("canvas"); + const context = canvas.getContext("2d"); + context.drawImage(image, 0, 0); + return canvas; + }); + }, + }, + + { + name: "unclean ImageBitmap", + factory: () => { + return makeImage().then(createImageBitmap); + }, + }, + ]; + + for (let { name, factory } of arguments) { + callback(name, factory); + } +} diff --git a/testing/web-platform/tests/html/canvas/resources/canvas-tests.js.headers b/testing/web-platform/tests/html/canvas/resources/canvas-tests.js.headers new file mode 100644 index 0000000000..6805c323df --- /dev/null +++ b/testing/web-platform/tests/html/canvas/resources/canvas-tests.js.headers @@ -0,0 +1 @@ +Content-Type: text/javascript; charset=utf-8 diff --git a/testing/web-platform/tests/html/canvas/tools/gentest.py b/testing/web-platform/tests/html/canvas/tools/gentest.py new file mode 100644 index 0000000000..36cb7fe0f6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/gentest.py @@ -0,0 +1,18 @@ +# To use this script: +# -make a python virtual environment somewhere (it doesn't matter where) +# python3 -m venv venv +# -enter the virtual environment +# source venv/bin/activate +# -install required packages in the venv +# pip3 install cairocffi jinja2 pyyaml +# -change to the directory with this script and run it +# python3 gentest.py + +from gentestutils import genTestUtils +from gentestutilsunion import genTestUtils_union + +genTestUtils('../element', '../element', 'templates.yaml', + 'name2dir-canvas.yaml', False) +genTestUtils('../offscreen', '../offscreen', 'templates.yaml', + 'name2dir-offscreen.yaml', True) +genTestUtils_union('name2dir.yaml') diff --git a/testing/web-platform/tests/html/canvas/tools/gentest_union.py b/testing/web-platform/tests/html/canvas/tools/gentest_union.py new file mode 100644 index 0000000000..38a37a81ac --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/gentest_union.py @@ -0,0 +1,3 @@ +from gentestutilsunion import genTestUtils_union + +genTestUtils_union('name2dir.yaml') diff --git a/testing/web-platform/tests/html/canvas/tools/gentestutils.py b/testing/web-platform/tests/html/canvas/tools/gentestutils.py new file mode 100644 index 0000000000..8fa33e3975 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/gentestutils.py @@ -0,0 +1,369 @@ +# Current code status: +# +# This was originally written by Philip Taylor for use at +# http://philip.html5.org/tests/canvas/suite/tests/ +# +# It has been adapted for use with the Web Platform Test Suite suite at +# https://github.com/web-platform-tests/wpt/ +# +# The original version had a number of now-removed features (multiple versions +# of each test case of varying verbosity, Mozilla mochitests, semi-automated +# test harness). It also had a different directory structure. + +# To update or add test cases: +# +# * Modify the tests*.yaml files. +# - 'name' is an arbitrary hierarchical name to help categorise tests. +# - 'desc' is a rough description of what behaviour the test aims to test. +# - 'code' is JavaScript code to execute, with some special commands starting +# with '@' +# - 'expected' is what the final canvas output should be: a string 'green' or +# 'clear' (100x50 images in both cases), or a string 'size 100 50' (or any +# other size) followed by Python code using Pycairo to generate the image. +# +# * Run "./build.sh". +# This requires a few Python modules which might not be ubiquitous. +# It will usually emit some warnings, which ideally should be fixed but can +# generally be safely ignored. +# +# * Test the tests, add new ones to Git, remove deleted ones from Git, etc. + +from typing import List, Mapping + +import re +import importlib +import os +import pathlib +import sys +import textwrap + +try: + import cairocffi as cairo # type: ignore +except ImportError: + import cairo + +try: + # Compatible and lots faster. + import syck as yaml # type: ignore +except ImportError: + import yaml + + +class Error(Exception): + """Base class for all exceptions raised by this module""" + + +class InvalidTestDefinitionError(Error): + """Raised on invalid test definition.""" + + +def _simpleEscapeJS(string: str) -> str: + return string.replace('\\', '\\\\').replace('"', '\\"') + + +def _escapeJS(string: str) -> str: + string = _simpleEscapeJS(string) + # Kind of an ugly hack, for nicer failure-message output. + string = re.sub(r'\[(\w+)\]', r'[\\""+(\1)+"\\"]', string) + return string + + +def _expand_nonfinite(method: str, argstr: str, tail: str) -> str: + """ + >>> print _expand_nonfinite('f', '<0 a>, <0 b>', ';') + f(a, 0); + f(0, b); + f(a, b); + >>> print _expand_nonfinite('f', '<0 a>, <0 b c>, <0 d>', ';') + f(a, 0, 0); + f(0, b, 0); + f(0, c, 0); + f(0, 0, d); + f(a, b, 0); + f(a, b, d); + f(a, 0, d); + f(0, b, d); + """ + # argstr is ", ..." (where usually + # 'invalid' is Infinity/-Infinity/NaN). + args = [] + for arg in argstr.split(', '): + match = re.match('<(.*)>', arg) + if match is None: + raise InvalidTestDefinitionError( + f"Expected arg to match format '<(.*)>', but was: {arg}") + a = match.group(1) + args.append(a.split(' ')) + calls = [] + # Start with the valid argument list. + call = [args[j][0] for j in range(len(args))] + # For each argument alone, try setting it to all its invalid values: + for i in range(len(args)): + for a in args[i][1:]: + c2 = call[:] + c2[i] = a + calls.append(c2) + # For all combinations of >= 2 arguments, try setting them to their + # first invalid values. (Don't do all invalid values, because the + # number of combinations explodes.) + def f(c: List[str], start: int, depth: int) -> None: + for i in range(start, len(args)): + if len(args[i]) > 1: + a = args[i][1] + c2 = c[:] + c2[i] = a + if depth > 0: + calls.append(c2) + f(c2, i + 1, depth + 1) + + f(call, 0, 0) + + return '\n'.join('%s(%s)%s' % (method, ', '.join(c), tail) for c in calls) + + +def _get_test_sub_dir(name: str, name_to_sub_dir: Mapping[str, str]) -> str: + for prefix in sorted(name_to_sub_dir.keys(), key=len, reverse=True): + if name.startswith(prefix): + return name_to_sub_dir[prefix] + raise InvalidTestDefinitionError( + 'Test "%s" has no defined target directory mapping' % name) + + +def _expand_test_code(code: str) -> str: + code = re.sub(r'@nonfinite ([^(]+)\(([^)]+)\)(.*)', lambda m: + _expand_nonfinite(m.group(1), m.group(2), m.group(3)), + code) # Must come before '@assert throws'. + + code = re.sub(r'@assert pixel (\d+,\d+) == (\d+,\d+,\d+,\d+);', + r'_assertPixel(canvas, \1, \2);', code) + + code = re.sub(r'@assert pixel (\d+,\d+) ==~ (\d+,\d+,\d+,\d+);', + r'_assertPixelApprox(canvas, \1, \2, 2);', code) + + code = re.sub(r'@assert pixel (\d+,\d+) ==~ (\d+,\d+,\d+,\d+) \+/- (\d+);', + r'_assertPixelApprox(canvas, \1, \2, \3);', code) + + code = re.sub(r'@assert throws (\S+_ERR) (.*);', + r'assert_throws_dom("\1", function() { \2; });', code) + + code = re.sub(r'@assert throws (\S+Error) (.*);', + r'assert_throws_js(\1, function() { \2; });', code) + + code = re.sub( + r'@assert (.*) === (.*);', lambda m: '_assertSame(%s, %s, "%s", "%s");' + % (m.group(1), m.group(2), _escapeJS(m.group(1)), _escapeJS(m.group(2)) + ), code) + + code = re.sub( + r'@assert (.*) !== (.*);', lambda m: + '_assertDifferent(%s, %s, "%s", "%s");' % (m.group(1), m.group( + 2), _escapeJS(m.group(1)), _escapeJS(m.group(2))), code) + + code = re.sub( + r'@assert (.*) =~ (.*);', lambda m: 'assert_regexp_match(%s, %s);' % ( + m.group(1), m.group(2)), code) + + code = re.sub( + r'@assert (.*);', lambda m: '_assert(%s, "%s");' % (m.group( + 1), _escapeJS(m.group(1))), code) + + code = re.sub(r' @moz-todo', '', code) + + code = re.sub(r'@moz-UniversalBrowserRead;', '', code) + + assert ('@' not in code) + + return code + + +_CANVAS_SIZE_REGEX = re.compile(r'(?P.*), (?P.*)', + re.MULTILINE | re.DOTALL) + + +def _get_canvas_size(test: Mapping[str, str]): + size = test.get('size', '100, 50') + match = _CANVAS_SIZE_REGEX.match(size) + if not match: + raise InvalidTestDefinitionError( + 'Invalid canvas size "%s" in test %s. Expected a string matching ' + 'this pattern: "%%s, %%s" %% (width, height)' % + (size, test['name'])) + return match.group('width'), match.group('height') + + +def _generate_test(test: Mapping[str, str], templates: Mapping[str, str], + sub_dir: str, test_output_dir: str, image_output_dir: str, + is_offscreen_canvas: bool): + name = test['name'] + + if test.get('expected', '') == 'green' and re.search( + r'@assert pixel .* 0,0,0,0;', test['code']): + print('Probable incorrect pixel test in %s' % name) + + code = _expand_test_code(test['code'].strip()) + code = textwrap.indent(code, ' ') + + expectation_html = '' + if 'expected' in test and test['expected'] is not None: + expected = test['expected'] + expected_img = None + if expected == 'green': + expected_img = '/images/green-100x50.png' + elif expected == 'clear': + expected_img = '/images/clear-100x50.png' + else: + if ';' in expected: + print('Found semicolon in %s' % name) + expected = re.sub( + r'^size (\d+) (\d+)', + r'surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, \1, \2)' + r'\ncr = cairo.Context(surface)', expected) + + expected += ("\nsurface.write_to_png('%s.png')\n" % + os.path.join(image_output_dir, sub_dir, name)) + eval(compile(expected, '' % name, 'exec'), {}, + {'cairo': cairo}) + expected_img = '%s.png' % name + + if expected_img: + expectation_html = ( + '

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ' + '' % expected_img) + + canvas = ' ' + test['canvas'] if 'canvas' in test else '' + width, height = _get_canvas_size(test) + + notes = '

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  %s' % test['notes'] if 'notes' in test else '' + + timeout = ('\n' % + test['timeout'] if 'timeout' in test else '') + timeout_js = ('// META: timeout=%s\n' % test['timeout'] + if 'timeout' in test else '') + + images = '' + for src in test.get('images', []): + img_id = src.split('/')[-1] + if '/' not in src: + src = '../images/%s' % src + images += '\n' % (src, img_id) + for src in test.get('svgimages', []): + img_id = src.split('/')[-1] + if '/' not in src: + src = '../images/%s' % src + images += ('' + '\n' % (src, img_id)) + images = images.replace('../images/', '/images/') + + fonts = '' + fonthack = '' + for font in test.get('fonts', []): + fonts += ('@font-face {\n font-family: %s;\n' + ' src: url("/fonts/%s.ttf");\n}\n' % (font, font)) + # Browsers require the font to actually be used in the page. + if test.get('fonthack', 1): + fonthack += ('A\n' % font) + if fonts: + fonts = '\n' % fonts + + fallback = test.get('fallback', + '

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ') + + desc = test.get('desc', '') + escaped_desc = _simpleEscapeJS(desc) + + attributes = test.get('attributes', '') + if attributes: + context_args = "'2d', %s" % attributes.strip() + attributes = ', ' + attributes.strip() + else: + context_args = "'2d'" + + template_params = { + 'name': name, + 'desc': desc, + 'escaped_desc': escaped_desc, + 'notes': notes, + 'images': images, + 'fonts': fonts, + 'fonthack': fonthack, + 'timeout': timeout, + 'timeout_js': timeout_js, + 'canvas': canvas, + 'width': width, + 'height': height, + 'expected': expectation_html, + 'code': code, + 'fallback': fallback, + 'attributes': attributes, + 'context_args': context_args + } + + test_path = os.path.join(test_output_dir, sub_dir, name) + if 'manual' in test: + test_path += '-manual' + + if is_offscreen_canvas: + pathlib.Path(f'{test_path}.html').write_text( + templates['offscreen'] % template_params, 'utf-8') + pathlib.Path(f'{test_path}.worker.js').write_text( + templates['worker'] % template_params, 'utf-8') + else: + pathlib.Path(f'{test_path}.html').write_text( + templates['element'] % template_params, 'utf-8') + + +def genTestUtils(TESTOUTPUTDIR: str, IMAGEOUTPUTDIR: str, TEMPLATEFILE: str, + NAME2DIRFILE: str, ISOFFSCREENCANVAS: bool) -> None: + # Run with --test argument to run unit tests + if len(sys.argv) > 1 and sys.argv[1] == '--test': + doctest = importlib.import_module('doctest') + doctest.testmod() + sys.exit() + + templates = yaml.safe_load(pathlib.Path(TEMPLATEFILE).read_text()) + name_to_sub_dir = yaml.safe_load(pathlib.Path(NAME2DIRFILE).read_text()) + + tests = [] + test_yaml_directory = 'yaml/element' + if ISOFFSCREENCANVAS: + test_yaml_directory = 'yaml/offscreen' + TESTSFILES = [ + os.path.join(test_yaml_directory, f) + for f in os.listdir(test_yaml_directory) if f.endswith('.yaml') + ] + for t in sum( + [yaml.safe_load(pathlib.Path(f).read_text()) for f in TESTSFILES], []): + if 'DISABLED' in t: + continue + if 'meta' in t: + eval(compile(t['meta'], '', 'exec'), {}, + {'tests': tests}) + else: + tests.append(t) + + # Ensure the test output directories exist. + testdirs = [TESTOUTPUTDIR, IMAGEOUTPUTDIR] + for sub_dir in set(name_to_sub_dir.values()): + testdirs.append('%s/%s' % (TESTOUTPUTDIR, sub_dir)) + for d in testdirs: + try: + os.mkdir(d) + except FileExistsError: + pass # Ignore if it already exists. + + used_tests = {} + for test in tests: + name = test['name'] + print('\r(%s)' % name, ' ' * 32, '\t') + + if name in used_tests: + print('Test %s is defined twice' % name) + used_tests[name] = 1 + + sub_dir = _get_test_sub_dir(name, name_to_sub_dir) + _generate_test(test, templates, sub_dir, TESTOUTPUTDIR, IMAGEOUTPUTDIR, + ISOFFSCREENCANVAS) + + print() diff --git a/testing/web-platform/tests/html/canvas/tools/gentestutilsunion.py b/testing/web-platform/tests/html/canvas/tools/gentestutilsunion.py new file mode 100644 index 0000000000..cf141f2f07 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/gentestutilsunion.py @@ -0,0 +1,535 @@ +# Current code status: +# +# This was originally written by Philip Taylor for use at +# http://philip.html5.org/tests/canvas/suite/tests/ +# +# It has been adapted for use with the Web Platform Test Suite suite at +# https://github.com/web-platform-tests/wpt/ +# +# The original version had a number of now-removed features (multiple versions +# of each test case of varying verbosity, Mozilla mochitests, semi-automated +# test harness). It also had a different directory structure. + +# To update or add test cases: +# +# * Modify the tests*.yaml files. +# - 'name' is an arbitrary hierarchical name to help categorise tests. +# - 'desc' is a rough description of what behaviour the test aims to test. +# - 'code' is JavaScript code to execute, with some special commands starting +# with '@'. +# - 'expected' is what the final canvas output should be: a string 'green' or +# 'clear' (100x50 images in both cases), or a string 'size 100 50' (or any +# other size) followed by Python code using Pycairo to generate the image. +# +# * Run "./build.sh". +# This requires a few Python modules which might not be ubiquitous. +# It will usually emit some warnings, which ideally should be fixed but can +# generally be safely ignored. +# +# * Test the tests, add new ones to Git, remove deleted ones from Git, etc. + +from typing import Any, List, Mapping, Optional, Set, Tuple + +import re +import collections +import dataclasses +import enum +import importlib +import itertools +import jinja2 +import os +import pathlib +import sys + +try: + import cairocffi as cairo # type: ignore +except ImportError: + import cairo + +try: + # Compatible and lots faster. + import syck as yaml # type: ignore +except ImportError: + import yaml + + +class Error(Exception): + """Base class for all exceptions raised by this module""" + + +class InvalidTestDefinitionError(Error): + """Raised on invalid test definition.""" + + +def _doubleQuoteEscape(string: str) -> str: + return string.replace('\\', '\\\\').replace('"', '\\"') + + +def _escapeJS(string: str) -> str: + string = _doubleQuoteEscape(string) + # Kind of an ugly hack, for nicer failure-message output. + string = re.sub(r'\[(\w+)\]', r'[\\""+(\1)+"\\"]', string) + return string + + +def _unroll(text: str) -> str: + """Unrolls text with all possible permutations of the parameter lists. + + Example: + >>> print _unroll('f = {: <1 | 2 | 3>};') + // a + f = {a: 1}; + f = {a: 2}; + f = {a: 3}; + // b + f = {b: 1}; + f = {b: 2}; + f = {b: 3}; + """ + patterns = [] # type: List[Tuple[str, List[str]]] + while True: + match = re.search(r'<([^>]+)>', text) + if not match: + break + key = f'@unroll_pattern_{len(patterns)}' + values = text[match.start(1):match.end(1)] + text = text[:match.start(0)] + key + text[match.end(0):] + patterns.append((key, [value.strip() for value in values.split('|')])) + + def unroll_patterns(text: str, + patterns: List[Tuple[str, List[str]]], + label: Optional[str] = None) -> List[str]: + if not patterns: + return [text] + patterns = patterns.copy() + key, values = patterns.pop(0) + return (['// ' + label] if label else []) + list( + itertools.chain.from_iterable( + unroll_patterns(text.replace(key, value), patterns, value) + for value in values)) + + result = '\n'.join(unroll_patterns(text, patterns)) + return result + + +def _expand_nonfinite(method: str, argstr: str, tail: str) -> str: + """ + >>> print _expand_nonfinite('f', '<0 a>, <0 b>', ';') + f(a, 0); + f(0, b); + f(a, b); + >>> print _expand_nonfinite('f', '<0 a>, <0 b c>, <0 d>', ';') + f(a, 0, 0); + f(0, b, 0); + f(0, c, 0); + f(0, 0, d); + f(a, b, 0); + f(a, b, d); + f(a, 0, d); + f(0, b, d); + """ + # argstr is ", ..." (where usually + # 'invalid' is Infinity/-Infinity/NaN). + args = [] + for arg in argstr.split(', '): + match = re.match('<(.*)>', arg) + if match is None: + raise InvalidTestDefinitionError( + f"Expected arg to match format '<(.*)>', but was: {arg}") + a = match.group(1) + args.append(a.split(' ')) + calls = [] + # Start with the valid argument list. + call = [args[j][0] for j in range(len(args))] + # For each argument alone, try setting it to all its invalid values: + for i in range(len(args)): + for a in args[i][1:]: + c2 = call[:] + c2[i] = a + calls.append(c2) + # For all combinations of >= 2 arguments, try setting them to their + # first invalid values. (Don't do all invalid values, because the + # number of combinations explodes.) + def f(c: List[str], start: int, depth: int) -> None: + for i in range(start, len(args)): + if len(args[i]) > 1: + a = args[i][1] + c2 = c[:] + c2[i] = a + if depth > 0: + calls.append(c2) + f(c2, i + 1, depth + 1) + + f(call, 0, 0) + + return '\n'.join('%s(%s)%s' % (method, ', '.join(c), tail) for c in calls) + + +def _get_test_sub_dir(name: str, name_to_sub_dir: Mapping[str, str]) -> str: + for prefix in sorted(name_to_sub_dir.keys(), key=len, reverse=True): + if name.startswith(prefix): + return name_to_sub_dir[prefix] + raise InvalidTestDefinitionError( + 'Test "%s" has no defined target directory mapping' % name) + + +def _remove_extra_newlines(text: str) -> str: + """Remove newlines if a backslash is found at end of line.""" + # Lines ending with '\' gets their newline character removed. + text = re.sub(r'\\\n', '', text, flags=re.MULTILINE | re.DOTALL) + + # Lines ending with '\-' gets their newline and any leading white spaces on + # the following line removed. + text = re.sub(r'\\-\n\s*', '', text, flags=re.MULTILINE | re.DOTALL) + return text + +def _expand_test_code(code: str) -> str: + code = _remove_extra_newlines(code) + + # Unroll expressions with a cross-product-style parameter expansion. + code = re.sub(r'@unroll ([^;]*;)', lambda m: _unroll(m.group(1)), code) + + code = re.sub(r'@nonfinite ([^(]+)\(([^)]+)\)(.*)', lambda m: + _expand_nonfinite(m.group(1), m.group(2), m.group(3)), + code) # Must come before '@assert throws'. + + code = re.sub(r'@assert pixel (\d+,\d+) == (\d+,\d+,\d+,\d+);', + r'_assertPixel(canvas, \1, \2);', code) + + code = re.sub(r'@assert pixel (\d+,\d+) ==~ (\d+,\d+,\d+,\d+);', + r'_assertPixelApprox(canvas, \1, \2, 2);', code) + + code = re.sub(r'@assert pixel (\d+,\d+) ==~ (\d+,\d+,\d+,\d+) \+/- (\d+);', + r'_assertPixelApprox(canvas, \1, \2, \3);', code) + + code = re.sub(r'@assert throws (\S+_ERR) (.*);', + r'assert_throws_dom("\1", function() { \2; });', code) + + code = re.sub(r'@assert throws (\S+Error) (.*);', + r'assert_throws_js(\1, function() { \2; });', code) + + code = re.sub( + r'@assert (.*) === (.*);', lambda m: '_assertSame(%s, %s, "%s", "%s");' + % (m.group(1), m.group(2), _escapeJS(m.group(1)), _escapeJS(m.group(2)) + ), code) + + code = re.sub( + r'@assert (.*) !== (.*);', lambda m: + '_assertDifferent(%s, %s, "%s", "%s");' % (m.group(1), m.group( + 2), _escapeJS(m.group(1)), _escapeJS(m.group(2))), code) + + code = re.sub( + r'@assert (.*) =~ (.*);', lambda m: 'assert_regexp_match(%s, %s);' % ( + m.group(1), m.group(2)), code) + + code = re.sub( + r'@assert (.*);', lambda m: '_assert(%s, "%s");' % (m.group( + 1), _escapeJS(m.group(1))), code) + + code = re.sub(r' @moz-todo', '', code) + + code = re.sub(r'@moz-UniversalBrowserRead;', '', code) + + assert ('@' not in code) + + return code + + +class CanvasType(str, enum.Enum): + HTML_CANVAS = 'htmlcanvas' + OFFSCREEN_CANVAS = 'offscreencanvas' + WORKER = 'worker' + + +def _get_enabled_canvas_types(test: Mapping[str, Any]) -> Set[CanvasType]: + return {CanvasType(t.lower()) for t in test.get('canvasType', CanvasType)} + + +@dataclasses.dataclass +class TestConfig: + out_dir: str + image_out_dir: str + + +def _validate_test(test: Mapping[str, Any]): + if test.get('expected', '') == 'green' and re.search( + r'@assert pixel .* 0,0,0,0;', test['code']): + print('Probable incorrect pixel test in %s' % test['name']) + + if 'size' in test and (not isinstance(test['size'], list) + or len(test['size']) != 2): + raise InvalidTestDefinitionError( + f'Invalid canvas size "{test["size"]}" in test {test["name"]}. ' + 'Expected an array with two numbers.') + + if 'test_type' in test and test['test_type'] != 'promise': + raise InvalidTestDefinitionError( + f'Test {test["name"]}\' test_type is invalid, it only accepts ' + '"promise" now for creating promise test type in the template ' + 'file.') + + if 'reference' in test and 'html_reference' in test: + raise InvalidTestDefinitionError( + f'Test {test["name"]} is invalid, "reference" and "html_reference" ' + 'can\'t both be specified at the same time.') + + +def _render_template(jinja_env: jinja2.Environment, + template: jinja2.Template, + params: Mapping[str, Any]) -> str: + """Renders the specified jinja template. + + The template is repetitively rendered until no more changes are observed. + This allows for template parameters to refer to other template parameters. + """ + rendered = template.render(params) + previous = '' + while rendered != previous: + previous = rendered + template = jinja_env.from_string(rendered) + rendered = template.render(params) + return rendered + + +def _render(jinja_env: jinja2.Environment, template_name: str, + params: Mapping[str, Any]): + params = dict(params) + params.update({ + # Render the code on its own, as it could contain templates expanding + # to multuple lines. This is needed to get proper indentation of the + # code in the main template. + 'code': _render_template(jinja_env, + jinja_env.from_string(params['code']), + params) + }) + + return _render_template(jinja_env, jinja_env.get_template(template_name), + params) + + +def _write_reference_test(jinja_env: jinja2.Environment, + params: Mapping[str, Any], + enabled_tests: Set[CanvasType], + canvas_path: str, offscreen_path: str): + if CanvasType.HTML_CANVAS in enabled_tests: + html_params = dict(params) + html_params.update({'canvas_type': CanvasType.HTML_CANVAS.value}) + pathlib.Path(f'{canvas_path}.html').write_text( + _render(jinja_env, "reftest_element.html", html_params), 'utf-8') + if CanvasType.OFFSCREEN_CANVAS in enabled_tests: + offscreen_params = dict(params) + offscreen_params.update({ + 'canvas_type': CanvasType.OFFSCREEN_CANVAS.value + }) + pathlib.Path(f'{offscreen_path}.html').write_text( + _render(jinja_env, "reftest_offscreen.html", offscreen_params), + 'utf-8') + if CanvasType.WORKER in enabled_tests: + worker_params = dict(params) + worker_params.update({'canvas_type': CanvasType.WORKER.value}) + pathlib.Path(f'{offscreen_path}.w.html').write_text( + _render(jinja_env, "reftest_worker.html", worker_params), 'utf-8') + + js_ref = params.get('reference', '') + html_ref = params.get('html_reference', '') + ref_params = dict(params) + ref_params.update({ + 'is_test_reference': True, + 'code': js_ref or html_ref + }) + ref_template_name = 'reftest_element.html' if js_ref else 'reftest.html' + if CanvasType.HTML_CANVAS in enabled_tests: + pathlib.Path(f'{canvas_path}-expected.html').write_text( + _render(jinja_env, ref_template_name, ref_params), 'utf-8') + if {CanvasType.OFFSCREEN_CANVAS, CanvasType.WORKER} & enabled_tests: + pathlib.Path(f'{offscreen_path}-expected.html').write_text( + _render(jinja_env, ref_template_name, ref_params), 'utf-8') + + +def _write_testharness_test(jinja_env: jinja2.Environment, + params: Mapping[str, Any], + enabled_tests: Set[CanvasType], + canvas_path: str, + offscreen_path: str): + # Create test cases for canvas and offscreencanvas. + if CanvasType.HTML_CANVAS in enabled_tests: + html_params = dict(params) + html_params.update({'canvas_type': CanvasType.HTML_CANVAS.value}) + pathlib.Path(f'{canvas_path}.html').write_text( + _render(jinja_env, "testharness_element.html", html_params), + 'utf-8') + + if CanvasType.OFFSCREEN_CANVAS in enabled_tests: + offscreen_params = dict(params) + offscreen_params.update({ + 'canvas_type': CanvasType.OFFSCREEN_CANVAS.value + }) + pathlib.Path(f'{offscreen_path}.html').write_text( + _render(jinja_env, "testharness_offscreen.html", offscreen_params), + 'utf-8') + + if CanvasType.WORKER in enabled_tests: + worker_params = dict(params) + worker_params.update({'canvas_type': CanvasType.WORKER.value}) + pathlib.Path(f'{offscreen_path}.worker.js').write_text( + _render(jinja_env, "testharness_worker.js", worker_params), + 'utf-8') + + +def _generate_test(test: Mapping[str, Any], jinja_env: jinja2.Environment, + sub_dir: str, enabled_tests: Set[CanvasType], + html_canvas_cfg: TestConfig, + offscreen_canvas_cfg: TestConfig) -> None: + _validate_test(test) + + name = test['name'] + + expected_img = None + if 'expected' in test and test['expected'] is not None: + expected = test['expected'] + if expected == 'green': + expected_img = '/images/green-100x50.png' + elif expected == 'clear': + expected_img = '/images/clear-100x50.png' + else: + if ';' in expected: + print('Found semicolon in %s' % name) + expected = re.sub( + r'^size (\d+) (\d+)', + r'surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, \1, \2)' + r'\ncr = cairo.Context(surface)', expected) + + if CanvasType.HTML_CANVAS in enabled_tests: + expected_canvas = ( + expected + "\nsurface.write_to_png('%s.png')\n" % + os.path.join(html_canvas_cfg.image_out_dir, sub_dir, name)) + eval(compile(expected_canvas, '' % name, 'exec'), {}, + {'cairo': cairo}) + + if {CanvasType.OFFSCREEN_CANVAS, CanvasType.WORKER} & enabled_tests: + expected_offscreen = ( + expected + + "\nsurface.write_to_png('%s.png')\n" % os.path.join( + offscreen_canvas_cfg.image_out_dir, sub_dir, name)) + eval(compile(expected_offscreen, '' % name, 'exec'), + {}, {'cairo': cairo}) + + expected_img = '%s.png' % name + + # Defaults: + params = { + 'desc': '', + 'size': [100, 50], + } + + params.update(test) + params.update({ + 'code': _expand_test_code(test['code']), + 'expected_img': expected_img + }) + + canvas_path = os.path.join(html_canvas_cfg.out_dir, sub_dir, name) + offscreen_path = os.path.join(offscreen_canvas_cfg.out_dir, sub_dir, name) + if 'manual' in test: + canvas_path += '-manual' + offscreen_path += '-manual' + + if 'reference' in test or 'html_reference' in test: + _write_reference_test(jinja_env, params, enabled_tests, + canvas_path, offscreen_path) + else: + _write_testharness_test(jinja_env, params, enabled_tests, canvas_path, + offscreen_path) + + +def genTestUtils_union(NAME2DIRFILE: str) -> None: + CANVASOUTPUTDIR = '../element' + CANVASIMAGEOUTPUTDIR = '../element' + OFFSCREENCANVASOUTPUTDIR = '../offscreen' + OFFSCREENCANVASIMAGEOUTPUTDIR = '../offscreen' + + jinja_env = jinja2.Environment( + loader=jinja2.PackageLoader("gentestutilsunion"), + keep_trailing_newline=True, + trim_blocks=True, + lstrip_blocks=True) + + jinja_env.filters['double_quote_escape'] = _doubleQuoteEscape + + # Run with --test argument to run unit tests. + if len(sys.argv) > 1 and sys.argv[1] == '--test': + doctest = importlib.import_module('doctest') + doctest.testmod() + sys.exit() + + name_to_sub_dir = yaml.safe_load(pathlib.Path(NAME2DIRFILE).read_text()) + + tests = [] + test_yaml_directory = 'yaml-new' + TESTSFILES = [ + os.path.join(test_yaml_directory, f) + for f in os.listdir(test_yaml_directory) if f.endswith('.yaml') + ] + for t in sum( + [yaml.safe_load(pathlib.Path(f).read_text()) for f in TESTSFILES], []): + if 'DISABLED' in t: + continue + if 'meta' in t: + eval(compile(t['meta'], '', 'exec'), {}, + {'tests': tests}) + else: + tests.append(t) + + # Ensure the test output directories exist. + testdirs = [ + CANVASOUTPUTDIR, OFFSCREENCANVASOUTPUTDIR, CANVASIMAGEOUTPUTDIR, + OFFSCREENCANVASIMAGEOUTPUTDIR + ] + for sub_dir in set(name_to_sub_dir.values()): + testdirs.append('%s/%s' % (CANVASOUTPUTDIR, sub_dir)) + testdirs.append('%s/%s' % (OFFSCREENCANVASOUTPUTDIR, sub_dir)) + for d in testdirs: + try: + os.mkdir(d) + except FileExistsError: + pass # Ignore if it already exists, + + used_tests = collections.defaultdict(set) + for original_test in tests: + variants = original_test.get('variants', {'': dict()}) + for variant_name, variant_params in variants.items(): + test = original_test.copy() + if variant_name or variant_params: + # Append variant name. Variant names starting with '_' are + # not appended, which is useful to create variants with the same + # name in different folders (element vs. offscreen). + if not variant_name.startswith('_'): + test['name'] += '.' + variant_name + test.update(variant_params) + + name = test['name'] + print('\r(%s)' % name, ' ' * 32, '\t') + + enabled_canvas_types = _get_enabled_canvas_types(test) + + already_tested = used_tests[name].intersection( + enabled_canvas_types) + if already_tested: + raise InvalidTestDefinitionError( + f'Test {name} is defined twice for types {already_tested}') + used_tests[name].update(enabled_canvas_types) + + sub_dir = _get_test_sub_dir(name, name_to_sub_dir) + _generate_test( + test, + jinja_env, + sub_dir, + enabled_canvas_types, + html_canvas_cfg=TestConfig( + out_dir=CANVASOUTPUTDIR, + image_out_dir=CANVASIMAGEOUTPUTDIR), + offscreen_canvas_cfg=TestConfig( + out_dir=OFFSCREENCANVASOUTPUTDIR, + image_out_dir=OFFSCREENCANVASIMAGEOUTPUTDIR)) + + print() diff --git a/testing/web-platform/tests/html/canvas/tools/name2dir-canvas.yaml b/testing/web-platform/tests/html/canvas/tools/name2dir-canvas.yaml new file mode 100644 index 0000000000..1e0caff5b9 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/name2dir-canvas.yaml @@ -0,0 +1,26 @@ +2d.transformation: "transformations" +2d.color.space: 'wide-gamut-canvas' +2d.composite: "compositing" +2d.coordinatespace: "conformance-requirements" +2d.missingargs: "conformance-requirements" +2d.type.delete: "conformance-requirements" +2d.voidreturn: "conformance-requirements" +2d.drawImage: "drawing-images-to-the-canvas" +2d.clearRect: "drawing-rectangles-to-the-canvas" +2d.fillRect: "drawing-rectangles-to-the-canvas" +2d.strokeRect: "drawing-rectangles-to-the-canvas" +2d.text: "text" +2d.fillStyle: "fill-and-stroke-styles" +2d.gradient: "fill-and-stroke-styles" +2d.pattern: "fill-and-stroke-styles" +2d.strokeStyle: "fill-and-stroke-styles" +2d.path: "path-objects" +2d.imageData: "pixel-manipulation" +2d.reset: "reset" +2d.shadow: "shadows" +2d.filter: "filters" +2d.state: "the-canvas-state" +2d.scrollPathIntoView: "scroll" +2d.video: "video" +2d.canvas.host: "canvas-host" +2d.canvas.context: "canvas-context" diff --git a/testing/web-platform/tests/html/canvas/tools/name2dir-offscreen.yaml b/testing/web-platform/tests/html/canvas/tools/name2dir-offscreen.yaml new file mode 100644 index 0000000000..c52acb793b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/name2dir-offscreen.yaml @@ -0,0 +1,22 @@ +2d.state: "the-canvas-state" +2d.transformation: "transformations" +2d.color.space: "wide-gamut-canvas" +2d.composite: "compositing" +2d.fillStyle: "fill-and-stroke-styles" +2d.gradient: "fill-and-stroke-styles" +2d.pattern: "fill-and-stroke-styles" +2d.strokeStyle: "fill-and-stroke-styles" +2d.shadow: "shadows" +2d.filter: "filters" +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.path: "path-objects" +2d.text: "text" +2d.coordinatespace: "conformance-requirements" +2d.missingargs: "conformance-requirements" +2d.voidreturn: "conformance-requirements" +2d.canvas.host: "canvas-host" +2d.canvas.context: "canvas-context" \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/tools/name2dir.yaml b/testing/web-platform/tests/html/canvas/tools/name2dir.yaml new file mode 100644 index 0000000000..ae69c15378 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/name2dir.yaml @@ -0,0 +1,25 @@ +2d.transformation: "transformations" +2d.color.space: 'wide-gamut-canvas' +2d.composite: "compositing" +2d.conformance.requirements: "conformance-requirements" +2d.drawImage: "drawing-images-to-the-canvas" +2d.clearRect: "drawing-rectangles-to-the-canvas" +2d.fillRect: "drawing-rectangles-to-the-canvas" +2d.strokeRect: "drawing-rectangles-to-the-canvas" +2d.text: "text" +2d.fillStyle: "fill-and-stroke-styles" +2d.gradient: "fill-and-stroke-styles" +2d.pattern: "fill-and-stroke-styles" +2d.strokeStyle: "fill-and-stroke-styles" +2d.line: "line-styles" +2d.path: "path-objects" +2d.imageData: "pixel-manipulation" +2d.reset: "reset" +2d.shadow: "shadows" +2d.filter: "filters" +2d.layer: "layers" +2d.state: "the-canvas-state" +2d.scrollPathIntoView: "scroll" +2d.video: "video" +2d.canvas.host: "canvas-host" +2d.canvas.context: "canvas-context" diff --git a/testing/web-platform/tests/html/canvas/tools/templates.yaml b/testing/web-platform/tests/html/canvas/tools/templates.yaml new file mode 100644 index 0000000000..0806872cbd --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/templates.yaml @@ -0,0 +1,80 @@ +offscreen: | + + + OffscreenCanvas test: %(name)s%(timeout)s + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  %(name)s

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  %(desc)s

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + %(notes)s + + + +worker: | + %(timeout_js)s// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. + // OffscreenCanvas test in a worker:%(name)s + // Description:%(desc)s + // Note:%(notes)s + + importScripts("/resources/testharness.js"); + importScripts("/html/canvas/resources/canvas-tests.js"); + + var t = async_test("%(escaped_desc)s"); + var t_pass = t.done.bind(t); + var t_fail = t.step_func(function(reason) { + throw reason; + }); + t.step(function() { + + var canvas = new OffscreenCanvas(%(width)s, %(height)s); + var ctx = canvas.getContext(%(context_args)s); + + %(code)s + }); + done(); + + +element: | + + + Canvas test: %(name)s + + + + + %(fonts)s + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  %(name)s

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  %(desc)s

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + %(notes)s + %(fonthack)s

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + %(fallback)s + %(expected)s +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + %(images)s diff --git a/testing/web-platform/tests/html/canvas/tools/templates/reftest.html b/testing/web-platform/tests/html/canvas/tools/templates/reftest.html new file mode 100644 index 0000000000..4c9affbbbb --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/templates/reftest.html @@ -0,0 +1,14 @@ + + +Canvas test: {{ name }} +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    {{ name }}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    {{ desc }}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +{% if notes %}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    {{ notes }}{% endif %} + +{{ code | trim }} +{% for image in images %} + +{% endfor -%} +{% for svgimage in svgimages %} + +{% endfor -%} diff --git a/testing/web-platform/tests/html/canvas/tools/templates/reftest_element.html b/testing/web-platform/tests/html/canvas/tools/templates/reftest_element.html new file mode 100644 index 0000000000..6684e9c615 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/templates/reftest_element.html @@ -0,0 +1,34 @@ + + +{% if test_type == 'promise' %} +{% endif %} +{% if not is_test_reference %} + +{% if fuzzy %} +{% endif %} +{% endif %} +{% if timeout %} +{% endif %} +Canvas test: {{ name }} +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    {{ name }}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    {{ desc }}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +{% if notes %}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    {{ notes }}{% endif %} + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + const canvas = document.getElementById("canvas"); + const ctx = canvas.getContext('2d'{% if attributes %}, {{ attributes }}{% endif %}); + + {{ code | trim | indent(2) }} + {% if test_type == 'promise' %} + document.documentElement.classList.remove("reftest-wait"); + {% endif %} + +{% for image in images %} + +{% endfor -%} +{% for svgimage in svgimages %} + +{% endfor -%} +{% if test_type == 'promise' %}{% endif %} diff --git a/testing/web-platform/tests/html/canvas/tools/templates/reftest_offscreen.html b/testing/web-platform/tests/html/canvas/tools/templates/reftest_offscreen.html new file mode 100644 index 0000000000..1d0d93dfa1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/templates/reftest_offscreen.html @@ -0,0 +1,29 @@ + + +{% if test_type == 'promise' %} +{% endif %} + +{% if fuzzy %} +{% endif %} +{% if timeout %} +{% endif %} +Canvas test: {{ name }} +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    {{ name }}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    {{ desc }}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +{% if notes %}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    {{ notes }}{% endif %} + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + const canvas = new OffscreenCanvas({{ size[0] }}, {{ size[1] }}); + const ctx = canvas.getContext('2d'{% if attributes %}, {{ attributes }}{% endif %}); + + {{ code | trim | indent(2) }} + + const outputCanvas = document.getElementById("canvas"); + outputCanvas.getContext('2d'{% if attributes %}, {{ attributes }}{% endif %}).drawImage(canvas, 0, 0); + {% if test_type == 'promise' %} + document.documentElement.classList.remove("reftest-wait"); + {% endif %} + +{% if test_type == 'promise' %}{% endif %} diff --git a/testing/web-platform/tests/html/canvas/tools/templates/reftest_worker.html b/testing/web-platform/tests/html/canvas/tools/templates/reftest_worker.html new file mode 100644 index 0000000000..e636d3634b --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/templates/reftest_worker.html @@ -0,0 +1,37 @@ + + + + +{% if fuzzy %} +{% endif %} +{% if timeout %} +{% endif %} +Canvas test: {{ name }} +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    {{ name }}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    {{ desc }}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +{% if notes %}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    {{ notes }}{% endif %} + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + diff --git a/testing/web-platform/tests/html/canvas/tools/templates/testharness_element.html b/testing/web-platform/tests/html/canvas/tools/templates/testharness_element.html new file mode 100644 index 0000000000..56cde7936a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/templates/testharness_element.html @@ -0,0 +1,68 @@ + + +Canvas test: {{ name }} + + + + +{% if fonts %} + +{% endif %} + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    {{ name }}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    {{ desc }}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +{% if notes %}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    {{ notes }} +{% else %} + +{% endif %} +{% if fonts and not font_unused_in_dom %} +{% for font in fonts %} +A +{% endfor %} +{% endif %} +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Actual output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FAIL (fallback content)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +{% if expected_img %} +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Expected output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +{%- endif +%} +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +{% for image in images %} + +{% endfor -%} +{% for svgimage in svgimages %} + +{% endfor +%} diff --git a/testing/web-platform/tests/html/canvas/tools/templates/testharness_offscreen.html b/testing/web-platform/tests/html/canvas/tools/templates/testharness_offscreen.html new file mode 100644 index 0000000000..8ebbff77a6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/templates/testharness_offscreen.html @@ -0,0 +1,45 @@ + + +OffscreenCanvas test: {{ name }} +{% if timeout %}{% endif %} + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      {{ name }}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      {{ desc }}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +{% if notes %}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      {{ notes }}{% endif +%} + +{% for svgimage in svgimages %} + +{% endfor %} diff --git a/testing/web-platform/tests/html/canvas/tools/templates/testharness_worker.js b/testing/web-platform/tests/html/canvas/tools/templates/testharness_worker.js new file mode 100644 index 0000000000..f1f04e7bb6 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/templates/testharness_worker.js @@ -0,0 +1,35 @@ +{% if timeout %}// META: timeout={{ timeout }}{% endif %} +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:{{ name }} +// Description:{{ desc }} +// Note:{% if notes %}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      {{ notes }}{% endif +%} + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +{# Promise vs. async test header: #} +{% if test_type == 'promise' %} +promise_test(async t => { +{% else %} +var t = async_test("{{ desc | double_quote_escape }}"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { +{% endif %} + +{# Test body: #} + var canvas = new OffscreenCanvas({{ size[0] }}, {{ size[1] }}); + var ctx = canvas.getContext('2d'{% if attributes %}, {{ attributes }}{% endif %}); + + {{ code | trim | indent(2)}} + t.done(); + +{#- Promise vs. async test footer: +#} +{% if test_type == 'promise' %} +}, "{{ desc }}"); +{% else %} +}); +{% endif %} +done(); diff --git a/testing/web-platform/tests/html/canvas/tools/yaml-new/color_space.yaml b/testing/web-platform/tests/html/canvas/tools/yaml-new/color_space.yaml new file mode 100644 index 0000000000..39556caf0a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/yaml-new/color_space.yaml @@ -0,0 +1,319 @@ +- name: 2d.color.space.p3.to.p3 + desc: test getImageData with display-p3 and uint8 from display p3 uint8 canvas + attributes: '{colorSpace: "display-p3"}' + code: | + var color_style = 'rgb(50, 100, 150)'; + // [0.24304, 0.38818, 0.57227, 1.0] * 255 = [62, 99, 146, 255] + var pixel_expected = [62, 99, 146, 255]; + var epsilon = 2; + ctx.fillStyle = color_style; + ctx.fillRect(0, 0, 10, 10); + + var pixel = ctx.getImageData(5, 5, 1, 1, {colorSpace: "display-p3", storageFormat: "uint8"}).data; + @assert pixel.length === pixel_expected.length; + assert_approx_equals(pixel[0], pixel_expected[0], 2); + assert_approx_equals(pixel[1], pixel_expected[1], 2); + assert_approx_equals(pixel[2], pixel_expected[2], 2); + assert_approx_equals(pixel[3], pixel_expected[3], 2); + +- name: 2d.color.space.p3.to.srgb + desc: test getImageData with srsb and uint8 from display p3 uint8 canvas + attributes: '{colorSpace: "display-p3"}' + code: | + var color_style = 'rgb(50, 100, 150)'; + var pixel_expected = [50, 100, 150, 255]; + var epsilon = 2; + ctx.fillStyle = color_style; + ctx.fillRect(0, 0, 10, 10); + + var pixel = ctx.getImageData(5, 5, 1, 1, {colorSpace: "srgb", storageFormat: "uint8"}).data; + @assert pixel.length === pixel_expected.length; + assert_approx_equals(pixel[0], pixel_expected[0], 2); + assert_approx_equals(pixel[1], pixel_expected[1], 2); + assert_approx_equals(pixel[2], pixel_expected[2], 2); + assert_approx_equals(pixel[3], pixel_expected[3], 2); + +- name: 2d.color.space.p3.toBlob.p3.canvas + desc: test if toblob returns p3 data from p3 color space canvas + attributes: '{colorSpace: "display-p3"}' + canvasType: + ['HTMLCanvas'] + code: | + ctx.fillStyle = "rgba(155, 27, 27, 1)"; + ctx.fillRect(0, 0, 1, 1); + ctx.fillStyle = "rgba(27, 155, 27, 0)"; + ctx.fillRect(1, 0, 1, 1); + ctx.fillStyle = "rgba(27, 27, 155, 0.5)"; + ctx.fillRect(0, 1, 1, 1); + ctx.fillStyle = "rgba(27, 27, 27, 0.5)"; + ctx.fillRect(1, 1, 1, 1); + expectedPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data; + + var image = new Image(); + image.onload = t.step_func_done(function() { + var dstCanvas = document.createElement("canvas"); + dstCanvas.width = 2; + dstCanvas.height = 2; + var ctx = dstCanvas.getContext('2d', {colorSpace: "display-p3"}); + ctx.drawImage(image, 0, 0); + var actualPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data; + assert_array_approx_equals(actualPixels, expectedPixels, 2); + }); + + canvas.toBlob(function(blob) { + var urlCreator = window.URL || window.webkitURL; + image.src = urlCreator.createObjectURL(blob); + }, 'image/png', 1); + +- name: 2d.color.space.p3.toDataURL.p3.canvas + desc: test if toDataURL returns p3 data from canvas with p3 color space + attributes: '{colorSpace: "display-p3"}' + canvasType: + ['HTMLCanvas'] + code: | + ctx.fillStyle = "rgba(155, 27, 27, 1)"; + ctx.fillRect(0, 0, 1, 1); + ctx.fillStyle = "rgba(27, 155, 27, 0)"; + ctx.fillRect(1, 0, 1, 1); + ctx.fillStyle = "rgba(27, 27, 155, 0.5)"; + ctx.fillRect(0, 1, 1, 1); + ctx.fillStyle = "rgba(27, 27, 27, 0.5)"; + ctx.fillRect(1, 1, 1, 1); + expectedPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data; + + var image = new Image(); + image.onload = t.step_func_done(function() { + var dstCanvas = document.createElement("canvas"); + dstCanvas.width = 2; + dstCanvas.height = 2; + var ctx = dstCanvas.getContext('2d', {colorSpace: "display-p3"}); + ctx.drawImage(image, 0, 0); + var actualPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data; + assert_array_approx_equals(actualPixels, expectedPixels, 2); + }); + image.src = canvas.toDataURL(); + +- name: 2d.color.space.p3.toDataURL.jpeg.p3.canvas + desc: test if toDataURL('image/jpeg') returns p3 data from canvas with p3 color space + attributes: '{colorSpace: "display-p3"}' + canvasType: + ['HTMLCanvas'] + code: | + ctx.fillStyle = "rgba(155, 27, 27, 1)"; + ctx.fillRect(0, 0, 1, 1); + ctx.fillStyle = "rgba(27, 155, 27, 0)"; + ctx.fillRect(1, 0, 1, 1); + ctx.fillStyle = "rgba(27, 27, 155, 0.5)"; + ctx.fillRect(0, 1, 1, 1); + ctx.fillStyle = "rgba(27, 27, 27, 0.5)"; + ctx.fillRect(1, 1, 1, 1); + expectedPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data; + + var image = new Image(); + image.onload = t.step_func_done(function() { + var dstCanvas = document.createElement("canvas"); + dstCanvas.width = 2; + dstCanvas.height = 2; + var ctx = dstCanvas.getContext('2d', {colorSpace: "display-p3"}); + ctx.drawImage(image, 0, 0); + var actualPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data; + assert_array_approx_equals(actualPixels, expectedPixels, 2); + }); + image.src = canvas.toDataURL("image/jpeg"); + +- name: 2d.color.space.p3.toBlob.with.putImageData + desc: Use putImageData to put some p3 data in canvas and test if toBlob returns the same data + attributes: '{colorSpace: "display-p3"}' + canvasType: + ['HTMLCanvas'] + code: | + canvas.width = 2; + canvas.height = 2; + + // Create an ImageData using createImageData and populate its data array. + var image_data = ctx.createImageData(canvas.width, canvas.height, {colorSpace: "display-p3"}); + var color_data = [[255, 100, 150, 1.0], [255, 100, 150, 0.5], + [255, 100, 150, 0.5], [255, 100, 150, 0]]; + var data = image_data.data; + for (var i = 0; i < data.length / 4; ++i) { + data[4*i + 0] = color_data[i][0]; + data[4*i + 1] = color_data[i][1]; + data[4*i + 2] = color_data[i][2]; + data[4*i + 3] = color_data[i][3]; + } + ctx.putImageData(image_data, 0, 0); + expectedPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data; + + var image = new Image(); + image.onload = t.step_func_done(function() { + var dstCanvas = document.createElement("canvas"); + dstCanvas.width = 2; + dstCanvas.height = 2; + var ctx = dstCanvas.getContext('2d', {colorSpace: "display-p3"}); + ctx.drawImage(image, 0, 0); + var actualPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data; + assert_array_approx_equals(actualPixels, expectedPixels, 2); + }); + canvas.toBlob(function(blob) { + var urlCreator = window.URL || window.webkitURL; + image.src = urlCreator.createObjectURL(blob); + }, 'image/png', 1); + +- name: 2d.color.space.p3.toDataURL.with.putImageData + desc: Use putImageData to put some p3 data in canvas and test if toDataURL returns the same data + attributes: '{colorSpace: "display-p3"}' + canvasType: + ['HTMLCanvas'] + code: | + canvas.width = 2; + canvas.height = 2; + + // Create an ImageData using createImageData and populate its data array. + var image_data = ctx.createImageData(canvas.width, canvas.height, {colorSpace: "display-p3"}); + var color_data = [[255, 100, 150, 1.0], [255, 100, 150, 0.5], + [255, 100, 150, 0.5], [255, 100, 150, 0]]; + var data = image_data.data; + for (var i = 0; i < data.length / 4; ++i) { + data[4*i + 0] = color_data[i][0]; + data[4*i + 1] = color_data[i][1]; + data[4*i + 2] = color_data[i][2]; + data[4*i + 3] = color_data[i][3]; + } + ctx.putImageData(image_data, 0, 0); + expectedPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data; + + var image = new Image(); + image.onload = t.step_func_done(function() { + var dstCanvas = document.createElement("canvas"); + dstCanvas.width = 2; + dstCanvas.height = 2; + var ctx = dstCanvas.getContext('2d', {colorSpace: "display-p3"}); + ctx.drawImage(image, 0, 0); + var actualPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data; + assert_array_approx_equals(actualPixels, expectedPixels, 2); + }); + image.src = canvas.toDataURL(); + +- name: 2d.color.space.p3.fillText + desc: Test if fillText can be used with a solid display-p3 color + attributes: '{colorSpace: "display-p3"}' + canvasType: ['HTMLCanvas'] + code: | + deferTest(); + + const fullRedInP3 = [255, 0, 0, 255]; + const sRGBRedInP3 = [234, 51, 35, 255]; + + canvas.width = 100; + canvas.height = 100; + + let f = new FontFace("Ahem", "url(/fonts/Ahem.ttf)"); + document.fonts.add(f); + f.load().then(function() { + t.step(function() { + ctx.font = "40px Ahem"; + + ctx.fillStyle = "#f00"; + ctx.fillText("A", 0, 50); + + ctx.fillStyle = "black"; + ctx.fillStyle = "color(display-p3 100% 0 0)"; + ctx.fillText("A", 50, 50); + + let pixels = ctx.getImageData(0, 0, canvas.width, canvas.height, { colorSpace: "display-p3" }).data; + let pixelAt = function(x, y) { + let offset = (y * canvas.width + x) * 4; + return [pixels[offset], pixels[offset + 1], pixels[offset + 2], pixels[offset + 3]]; + }; + + assert_array_equals(pixelAt(25, 25), sRGBRedInP3); + assert_array_equals(pixelAt(75, 25), fullRedInP3); + + t.done(); + }); + }); + +- name: 2d.color.space.p3.strokeText + desc: Test if strokeText can be used with a solid display-p3 color + attributes: '{colorSpace: "display-p3"}' + canvasType: + ['HTMLCanvas'] + code: | + deferTest(); + + const fullRedInP3 = [255, 0, 0, 255]; + const sRGBRedInP3 = [234, 51, 35, 255]; + + canvas.width = 100; + canvas.height = 100; + + let f = new FontFace("Ahem", "url(/fonts/Ahem.ttf)"); + document.fonts.add(f); + f.load().then(function() { + t.step(function() { + ctx.font = "40px Ahem"; + + ctx.strokeStyle = "#f00"; + ctx.lineWidth = 20; + ctx.strokeText("A", 0, 50); + + ctx.strokeStyle = "black"; + ctx.strokeStyle = "color(display-p3 100% 0 0)"; + ctx.strokeText("A", 50, 50); + + let pixels = ctx.getImageData(0, 0, canvas.width, canvas.height, { colorSpace: "display-p3" }).data; + let pixelAt = function(x, y) { + let offset = (y * canvas.width + x) * 4; + return [pixels[offset], pixels[offset + 1], pixels[offset + 2], pixels[offset + 3]]; + }; + + assert_array_equals(pixelAt(25, 25), sRGBRedInP3); + assert_array_equals(pixelAt(75, 25), fullRedInP3); + + t.done(); + }); + }); + +- name: 2d.color.space.p3.fillText.shadow + desc: Test if fillText can be used with a display-p3 shadow color + attributes: '{colorSpace: "display-p3"}' + canvasType: + ['HTMLCanvas'] + code: | + deferTest(); + + const fullRedInP3 = [255, 0, 0, 255]; + const sRGBRedInP3 = [234, 51, 35, 255]; + + canvas.width = 100; + canvas.height = 100; + + let f = new FontFace("Ahem", "url(/fonts/Ahem.ttf)"); + document.fonts.add(f); + f.load().then(function() { + t.step(function() { + ctx.font = "40px Ahem"; + + ctx.fillStyle = "black"; + ctx.shadowBlur = 4; + ctx.shadowOffsetX = 0; + ctx.shadowOffsetY = 50; + ctx.shadowColor = "#f00"; + ctx.fillText("A", 0, 0); + + ctx.shadowColor = "black"; + ctx.shadowColor = "color(display-p3 100% 0 0)"; + ctx.fillText("A", 50, 0); + + let pixels = ctx.getImageData(0, 0, canvas.width, canvas.height, { colorSpace: "display-p3" }).data; + let pixelAt = function(x, y) { + let offset = (y * canvas.width + x) * 4; + return [pixels[offset], pixels[offset + 1], pixels[offset + 2], pixels[offset + 3]]; + }; + + assert_array_equals(pixelAt(25, 25), sRGBRedInP3); + assert_array_equals(pixelAt(75, 25), fullRedInP3); + + t.done(); + }); + }); diff --git a/testing/web-platform/tests/html/canvas/tools/yaml-new/compositing.yaml b/testing/web-platform/tests/html/canvas/tools/yaml-new/compositing.yaml new file mode 100644 index 0000000000..bd7fae1d62 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/yaml-new/compositing.yaml @@ -0,0 +1,232 @@ +- name: 2d.composite.globalAlpha.range + code: | + ctx.globalAlpha = 0.5; + // This may not set it to exactly 0.5 if it is rounded/quantised, so + // remember for future comparisons. + var a = ctx.globalAlpha; + @assert ctx.globalAlpha === a; + ctx.globalAlpha = 1.1; + @assert ctx.globalAlpha === a; + ctx.globalAlpha = -0.1; + @assert ctx.globalAlpha === a; + ctx.globalAlpha = 0; + @assert ctx.globalAlpha === 0; + ctx.globalAlpha = 1; + @assert ctx.globalAlpha === 1; + +- name: 2d.composite.globalAlpha.invalid + code: | + ctx.globalAlpha = 0.5; + // This may not set it to exactly 0.5 if it is rounded/quantised, so + // remember for future comparisons. + var a = ctx.globalAlpha; + ctx.globalAlpha = Infinity; + @assert ctx.globalAlpha === a; + ctx.globalAlpha = -Infinity; + @assert ctx.globalAlpha === a; + ctx.globalAlpha = NaN; + @assert ctx.globalAlpha === a; + +- name: 2d.composite.globalAlpha.default + code: | + @assert ctx.globalAlpha === 1.0; + +- name: 2d.composite.globalAlpha.fill + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + // Avoiding any potential alpha = 0 optimisations. + ctx.globalAlpha = 0.01; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 ==~ 2,253,0,255; + expected: green + +- name: 2d.composite.globalAlpha.canvas + canvasType: ['HTMLCanvas'] + code: | + var canvas2 = document.createElement('canvas'); + canvas2.width = 100; + canvas2.height = 50; + var ctx2 = canvas2.getContext('2d'); + ctx2.fillStyle = '#f00'; + ctx2.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + // Avoiding any potential alpha = 0 optimisations. + ctx.globalAlpha = 0.01; + ctx.drawImage(canvas2, 0, 0); + @assert pixel 50,25 ==~ 2,253,0,255; + expected: green + +- name: 2d.composite.globalAlpha.canvaspattern + canvasType: ['HTMLCanvas'] + code: | + var canvas2 = document.createElement('canvas'); + canvas2.width = 100; + canvas2.height = 50; + var ctx2 = canvas2.getContext('2d'); + ctx2.fillStyle = '#f00'; + ctx2.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = ctx.createPattern(canvas2, 'no-repeat'); + // Avoiding any potential alpha = 0 optimisations. + ctx.globalAlpha = 0.01; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 ==~ 2,253,0,255; + expected: green + +- name: 2d.composite.globalAlpha.canvascopy + canvasType: ['HTMLCanvas'] + code: | + var canvas2 = document.createElement('canvas'); + canvas2.width = 100; + canvas2.height = 50; + var ctx2 = canvas2.getContext('2d'); + ctx2.fillStyle = '#0f0'; + ctx2.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.globalCompositeOperation = 'copy' + ctx.globalAlpha = 0.51; + ctx.drawImage(canvas2, 0, 0); + @assert pixel 50,25 ==~ 0,255,0,130; + expected: green + + +- name: 2d.composite.operation.get + code: | + var modes = ['source-atop', 'source-in', 'source-out', 'source-over', + 'destination-atop', 'destination-in', 'destination-out', 'destination-over', + 'lighter', 'copy', 'xor']; + for (var i = 0; i < modes.length; ++i) + { + ctx.globalCompositeOperation = modes[i]; + @assert ctx.globalCompositeOperation === modes[i]; + } + +- name: 2d.composite.operation.unrecognised + code: | + ctx.globalCompositeOperation = 'xor'; + ctx.globalCompositeOperation = 'nonexistent'; + @assert ctx.globalCompositeOperation === 'xor'; + +- name: 2d.composite.operation.darker + code: | + ctx.globalCompositeOperation = 'xor'; + ctx.globalCompositeOperation = 'darker'; + @assert ctx.globalCompositeOperation === 'xor'; + +- name: 2d.composite.operation.over + code: | + ctx.globalCompositeOperation = 'xor'; + ctx.globalCompositeOperation = 'over'; + @assert ctx.globalCompositeOperation === 'xor'; + +- name: 2d.composite.operation.clear + code: | + ctx.globalCompositeOperation = 'xor'; + ctx.globalCompositeOperation = 'clear'; + @assert ctx.globalCompositeOperation === 'clear'; + +- name: 2d.composite.operation.highlight + code: | + ctx.globalCompositeOperation = 'xor'; + ctx.globalCompositeOperation = 'highlight'; + @assert ctx.globalCompositeOperation === 'xor'; + +- name: 2d.composite.operation.nullsuffix + code: | + ctx.globalCompositeOperation = 'xor'; + ctx.globalCompositeOperation = 'source-over\0'; + @assert ctx.globalCompositeOperation === 'xor'; + +- name: 2d.composite.operation.casesensitive + code: | + ctx.globalCompositeOperation = 'xor'; + ctx.globalCompositeOperation = 'Source-over'; + @assert ctx.globalCompositeOperation === 'xor'; + +- name: 2d.composite.operation.default + code: | + @assert ctx.globalCompositeOperation === 'source-over'; + + +- name: 2d.composite.globalAlpha.image + test_type: promise + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + // Avoiding any potential alpha = 0 optimisations. + ctx.globalAlpha = 0.01; + const response = await fetch('/images/red.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + + ctx.drawImage(bitmap, 0, 0); + @assert pixel 50,25 ==~ 2,253,0,255; + expected: green + +- name: 2d.composite.globalAlpha.canvas + canvasType: ['OffscreenCanvas', 'Worker'] + code: | + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var ctx2 = offscreenCanvas2.getContext('2d'); + ctx2.fillStyle = '#f00'; + ctx2.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + // Avoiding any potential alpha = 0 optimisations. + ctx.globalAlpha = 0.01; + ctx.drawImage(offscreenCanvas2, 0, 0); + @assert pixel 50,25 ==~ 2,253,0,255; + +- name: 2d.composite.globalAlpha.imagepattern + test_type: promise + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + const response = await fetch('/images/red.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + // Avoiding any potential alpha = 0 optimisations. + ctx.globalAlpha = 0.01; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 ==~ 2,253,0,255; + expected: green + +- name: 2d.composite.globalAlpha.canvaspattern + canvasType: ['OffscreenCanvas', 'Worker'] + code: | + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var ctx2 = offscreenCanvas2.getContext('2d'); + ctx2.fillStyle = '#f00'; + ctx2.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = ctx.createPattern(offscreenCanvas2, 'no-repeat'); + // Avoiding any potential alpha = 0 optimisations. + ctx.globalAlpha = 0.01; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 ==~ 2,253,0,255; + +- name: 2d.composite.globalAlpha.canvascopy + canvasType: ['OffscreenCanvas', 'Worker'] + code: | + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var ctx2 = offscreenCanvas2.getContext('2d'); + ctx2.fillStyle = '#0f0'; + ctx2.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy' + ctx.globalAlpha = 0.51; + ctx.drawImage(offscreenCanvas2, 0, 0); + @assert pixel 50,25 ==~ 0,255,0,130; diff --git a/testing/web-platform/tests/html/canvas/tools/yaml-new/conformance_requirements.yaml b/testing/web-platform/tests/html/canvas/tools/yaml-new/conformance_requirements.yaml new file mode 100644 index 0000000000..3483d115f4 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/yaml-new/conformance_requirements.yaml @@ -0,0 +1,178 @@ +- name: 2d.conformance.requirements.delete + desc: window.CanvasRenderingContext2D is Configurable + notes: &bindings Defined in "Web IDL" (draft) + canvasType: ['HTMLCanvas'] + code: | + @assert window.CanvasRenderingContext2D !== undefined; + @assert delete window.CanvasRenderingContext2D === true; + @assert window.CanvasRenderingContext2D === undefined; + +- name: 2d.conformance.requirements.basics + desc: void methods return undefined + notes: *bindings + code: | + @assert ctx.save() === undefined; + @assert ctx.restore() === undefined; + @assert ctx.scale(1, 1) === undefined; + @assert ctx.rotate(0) === undefined; + @assert ctx.translate(0, 0) === undefined; + if (ctx.transform) { // (avoid spurious failures, since the aim here is not to test that all features are supported) + @assert ctx.transform(1, 0, 0, 1, 0, 0) === undefined; + } + if (ctx.setTransform) { + @assert ctx.setTransform(1, 0, 0, 1, 0, 0) === undefined; + @assert ctx.setTransform() === undefined; + } + @assert ctx.clearRect(0, 0, 0, 0) === undefined; + @assert ctx.fillRect(0, 0, 0, 0) === undefined; + @assert ctx.strokeRect(0, 0, 0, 0) === undefined; + @assert ctx.beginPath() === undefined; + @assert ctx.closePath() === undefined; + @assert ctx.moveTo(0, 0) === undefined; + @assert ctx.lineTo(0, 0) === undefined; + @assert ctx.quadraticCurveTo(0, 0, 0, 0) === undefined; + @assert ctx.bezierCurveTo(0, 0, 0, 0, 0, 0) === undefined; + @assert ctx.arcTo(0, 0, 0, 0, 1) === undefined; + @assert ctx.rect(0, 0, 0, 0) === undefined; + @assert ctx.arc(0, 0, 1, 0, 0, true) === undefined; + @assert ctx.fill() === undefined; + @assert ctx.stroke() === undefined; + @assert ctx.clip() === undefined; + if (ctx.fillText) { + @assert ctx.fillText('test', 0, 0) === undefined; + @assert ctx.strokeText('test', 0, 0) === undefined; + } + if (ctx.putImageData) { + @assert ctx.putImageData(ctx.getImageData(0, 0, 1, 1), 0, 0) === undefined; + } + @assert ctx.drawImage(canvas, 0, 0, 1, 1, 0, 0, 0, 0) === undefined; + @assert ctx.createLinearGradient(0, 0, 0, 0).addColorStop(0, 'white') === undefined; + +- name: 2d.conformance.requirements.missingargs + desc: Missing arguments cause TypeError + code: | + @assert throws TypeError ctx.scale(); + @assert throws TypeError ctx.scale(1); + @assert throws TypeError ctx.rotate(); + @assert throws TypeError ctx.translate(); + @assert throws TypeError ctx.translate(0); + if (ctx.transform) { // (avoid spurious failures, since the aim here is not to test that all features are supported) + @assert throws TypeError ctx.transform(); + @assert throws TypeError ctx.transform(1); + @assert throws TypeError ctx.transform(1, 0); + @assert throws TypeError ctx.transform(1, 0, 0); + @assert throws TypeError ctx.transform(1, 0, 0, 1); + @assert throws TypeError ctx.transform(1, 0, 0, 1, 0); + } + if (ctx.setTransform) { + @assert throws TypeError ctx.setTransform(1); + @assert throws TypeError ctx.setTransform(1, 0); + @assert throws TypeError ctx.setTransform(1, 0, 0); + @assert throws TypeError ctx.setTransform(1, 0, 0, 1); + @assert throws TypeError ctx.setTransform(1, 0, 0, 1, 0); + } + @assert throws TypeError ctx.createLinearGradient(); + @assert throws TypeError ctx.createLinearGradient(0); + @assert throws TypeError ctx.createLinearGradient(0, 0); + @assert throws TypeError ctx.createLinearGradient(0, 0, 1); + @assert throws TypeError ctx.createRadialGradient(); + @assert throws TypeError ctx.createRadialGradient(0); + @assert throws TypeError ctx.createRadialGradient(0, 0); + @assert throws TypeError ctx.createRadialGradient(0, 0, 1); + @assert throws TypeError ctx.createRadialGradient(0, 0, 1, 0); + @assert throws TypeError ctx.createRadialGradient(0, 0, 1, 0, 0); + @assert throws TypeError ctx.createPattern(canvas); + @assert throws TypeError ctx.clearRect(); + @assert throws TypeError ctx.clearRect(0); + @assert throws TypeError ctx.clearRect(0, 0); + @assert throws TypeError ctx.clearRect(0, 0, 0); + @assert throws TypeError ctx.fillRect(); + @assert throws TypeError ctx.fillRect(0); + @assert throws TypeError ctx.fillRect(0, 0); + @assert throws TypeError ctx.fillRect(0, 0, 0); + @assert throws TypeError ctx.strokeRect(); + @assert throws TypeError ctx.strokeRect(0); + @assert throws TypeError ctx.strokeRect(0, 0); + @assert throws TypeError ctx.strokeRect(0, 0, 0); + @assert throws TypeError ctx.moveTo(); + @assert throws TypeError ctx.moveTo(0); + @assert throws TypeError ctx.lineTo(); + @assert throws TypeError ctx.lineTo(0); + @assert throws TypeError ctx.quadraticCurveTo(); + @assert throws TypeError ctx.quadraticCurveTo(0); + @assert throws TypeError ctx.quadraticCurveTo(0, 0); + @assert throws TypeError ctx.quadraticCurveTo(0, 0, 0); + @assert throws TypeError ctx.bezierCurveTo(); + @assert throws TypeError ctx.bezierCurveTo(0); + @assert throws TypeError ctx.bezierCurveTo(0, 0); + @assert throws TypeError ctx.bezierCurveTo(0, 0, 0); + @assert throws TypeError ctx.bezierCurveTo(0, 0, 0, 0); + @assert throws TypeError ctx.bezierCurveTo(0, 0, 0, 0, 0); + @assert throws TypeError ctx.arcTo(); + @assert throws TypeError ctx.arcTo(0); + @assert throws TypeError ctx.arcTo(0, 0); + @assert throws TypeError ctx.arcTo(0, 0, 0); + @assert throws TypeError ctx.arcTo(0, 0, 0, 0); + @assert throws TypeError ctx.rect(); + @assert throws TypeError ctx.rect(0); + @assert throws TypeError ctx.rect(0, 0); + @assert throws TypeError ctx.rect(0, 0, 0); + @assert throws TypeError ctx.arc(); + @assert throws TypeError ctx.arc(0); + @assert throws TypeError ctx.arc(0, 0); + @assert throws TypeError ctx.arc(0, 0, 1); + @assert throws TypeError ctx.arc(0, 0, 1, 0); + // (6th argument to arc is optional) + if (ctx.isPointInPath) { + @assert throws TypeError ctx.isPointInPath(); + @assert throws TypeError ctx.isPointInPath(0); + } + if (ctx.drawFocusRing) { + @assert throws TypeError ctx.drawFocusRing(); + @assert throws TypeError ctx.drawFocusRing(canvas); + @assert throws TypeError ctx.drawFocusRing(canvas, 0); + } + if (ctx.fillText) { + @assert throws TypeError ctx.fillText(); + @assert throws TypeError ctx.fillText('test'); + @assert throws TypeError ctx.fillText('test', 0); + @assert throws TypeError ctx.strokeText(); + @assert throws TypeError ctx.strokeText('test'); + @assert throws TypeError ctx.strokeText('test', 0); + @assert throws TypeError ctx.measureText(); + } + @assert throws TypeError ctx.drawImage(); + @assert throws TypeError ctx.drawImage(canvas); + @assert throws TypeError ctx.drawImage(canvas, 0); + // TODO: n >= 3 args on drawImage could be either a valid overload, + // or too few for another overload, or too many for another + // overload - what should happen? + if (ctx.createImageData) { + @assert throws TypeError ctx.createImageData(); + @assert throws TypeError ctx.createImageData(1); + } + if (ctx.getImageData) { + @assert throws TypeError ctx.getImageData(); + @assert throws TypeError ctx.getImageData(0); + @assert throws TypeError ctx.getImageData(0, 0); + @assert throws TypeError ctx.getImageData(0, 0, 1); + } + if (ctx.putImageData) { + var imgdata = ctx.getImageData(0, 0, 1, 1); + @assert throws TypeError ctx.putImageData(); + @assert throws TypeError ctx.putImageData(imgdata); + @assert throws TypeError ctx.putImageData(imgdata, 0); + } + var g = ctx.createLinearGradient(0, 0, 0, 0); + @assert throws TypeError g.addColorStop(); @moz-todo + @assert throws TypeError g.addColorStop(0); @moz-todo + + +- name: 2d.conformance.requirements.drawings + desc: void methods return undefined + images: + - yellow.png + canvasType: ['HTMLCanvas'] + code: | + @assert ctx.drawImage(document.getElementById('yellow.png'), 0, 0, 1, 1, 0, 0, 0, 0) === undefined; + diff --git a/testing/web-platform/tests/html/canvas/tools/yaml-new/drawing-images-to-the-canvas.yaml b/testing/web-platform/tests/html/canvas/tools/yaml-new/drawing-images-to-the-canvas.yaml new file mode 100644 index 0000000000..93c556288d --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/yaml-new/drawing-images-to-the-canvas.yaml @@ -0,0 +1,640 @@ +- name: 2d.drawImage.canvas + canvasType: ['HTMLCanvas'] + code: | + var canvas2 = document.createElement('canvas'); + canvas2.width = 100; + canvas2.height = 50; + var ctx2 = canvas2.getContext('2d'); + ctx2.fillStyle = '#0f0'; + ctx2.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#f00'; + ctx.drawImage(canvas2, 0, 0); + + @assert pixel 0,0 ==~ 0,255,0,255; + @assert pixel 99,0 ==~ 0,255,0,255; + @assert pixel 0,49 ==~ 0,255,0,255; + @assert pixel 99,49 ==~ 0,255,0,255; + + ctx.drawImage(document.createElement('canvas'), 0, 0); + + @assert pixel 0,0 ==~ 0,255,0,255; + @assert pixel 99,0 ==~ 0,255,0,255; + @assert pixel 0,49 ==~ 0,255,0,255; + @assert pixel 99,49 ==~ 0,255,0,255; + expected: green + +- name: 2d.drawImage.self.1 + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + ctx.drawImage(canvas, 50, 0); + + @assert pixel 0,0 ==~ 0,255,0,255; + @assert pixel 99,0 ==~ 0,255,0,255; + @assert pixel 0,49 ==~ 0,255,0,255; + @assert pixel 99,49 ==~ 0,255,0,255; + expected: green + +- name: 2d.drawImage.self.2 + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 1, 100, 49); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 1); + ctx.drawImage(canvas, 0, 1); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 2); + + @assert pixel 0,0 ==~ 0,255,0,255; + @assert pixel 99,0 ==~ 0,255,0,255; + @assert pixel 0,49 ==~ 0,255,0,255; + @assert pixel 99,49 ==~ 0,255,0,255; + expected: green + +- name: 2d.drawImage.null + code: | + @assert throws TypeError ctx.drawImage(null, 0, 0); + +- name: 2d.drawImage.wrongtype + desc: Incorrect image types in drawImage do not match any defined overloads, so + WebIDL throws a TypeError + code: | + @assert throws TypeError ctx.drawImage(undefined, 0, 0); + @assert throws TypeError ctx.drawImage(0, 0, 0); + @assert throws TypeError ctx.drawImage("", 0, 0); + +- name: 2d.drawImage.wrongtype.paragraph + desc: Incorrect image types in drawImage do not match any defined overloads, so + WebIDL throws a TypeError + notes: &bindings Defined in "Web IDL" (draft) + canvasType: ['HTMLCanvas'] + code: | + @assert throws TypeError ctx.drawImage(document.createElement('p'), 0, 0); + +- name: 2d.drawImage.incomplete.nosrc + canvasType: ['HTMLCanvas'] + mozilla: {throws: !!null ''} + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var img = new Image(); + ctx.drawImage(img, 0, 0); + @assert pixel 50,25 ==~ 0,255,0,255; + expected: green + +- name: 2d.drawImage.incomplete.immediate + canvasType: ['HTMLCanvas'] + images: + - red.png + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var img = new Image(); + img.src = '../images/red.png'; + // This triggers the "update the image data" algorithm. + // The image will not go to the "completely available" state + // until a fetch task in the networking task source is processed, + // so the image must not be fully decodable yet: + ctx.drawImage(img, 0, 0); + @assert pixel 50,25 ==~ 0,255,0,255; @moz-todo + expected: green + +- name: 2d.drawImage.incomplete.reload + canvasType: ['HTMLCanvas'] + images: + - yellow.png + - red.png + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var img = document.getElementById('yellow.png'); + img.src = '../images/red.png'; + // This triggers the "update the image data" algorithm, + // and resets the image to the "unavailable" state. + // The image will not go to the "completely available" state + // until a fetch task in the networking task source is processed, + // so the image must not be fully decodable yet: + ctx.drawImage(img, 0, 0); + @assert pixel 50,25 ==~ 0,255,0,255; @moz-todo + expected: green + +- name: 2d.drawImage.incomplete.emptysrc + canvasType: ['HTMLCanvas'] + images: + - red.png + mozilla: {throws: !!null ''} + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var img = document.getElementById('red.png'); + img.src = ""; + ctx.drawImage(img, 0, 0); + @assert pixel 50,25 ==~ 0,255,0,255; + expected: green + +- name: 2d.drawImage.incomplete.removedsrc + canvasType: ['HTMLCanvas'] + images: + - red.png + mozilla: {throws: !!null ''} + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var img = document.getElementById('red.png'); + img.removeAttribute('src'); + ctx.drawImage(img, 0, 0); + @assert pixel 50,25 ==~ 0,255,0,255; + expected: green + +- name: 2d.drawImage.nonexistent + canvasType: ['HTMLCanvas'] + images: + - not-found-at-all.png + code: | + var img = document.getElementById('not-found-at-all.png'); + @assert throws INVALID_STATE_ERR ctx.drawImage(img, 0, 0); + +- name: 2d.drawImage.zerocanvas + desc: drawImage with zero-sized canvas as the source shoud throw exception + canvasType: ['HTMLCanvas'] + code: | + var canvas2 = document.createElement('canvas'); + canvas2.width = 0; + canvas2.height = 50; + @assert throws INVALID_STATE_ERR ctx.drawImage(canvas2, 0, 0); + + canvas2.width = 50; + canvas2.height = 0; + @assert throws INVALID_STATE_ERR ctx.drawImage(canvas2, 0, 0); + + canvas2.width = 0; + canvas2.height = 0; + @assert throws INVALID_STATE_ERR ctx.drawImage(canvas2, 0, 0); + +- name: 2d.drawImage.animated.gif + desc: drawImage() of an animated GIF draws the first frame + canvasType: ['HTMLCanvas'] + images: + - anim-gr.gif + code: | + deferTest(); + step_timeout(t.step_func_done(function () { + ctx.drawImage(document.getElementById('anim-gr.gif'), 0, 0); + @assert pixel 50,25 ==~ 0,255,0,255; + }), 500); + expected: green + +# TODO: drawImage shadows + +- name: 2d.drawImage.3arg + test_type: promise + code: | + const response_red = await fetch('/images/red.png'); + const blob_red = await response_red.blob(); + const bitmap_red = await createImageBitmap(blob_red); + + const response_green = await fetch('/images/green.png'); + const blob_green = await response_green.blob(); + const bitmap_green = await createImageBitmap(blob_green); + + ctx.drawImage(bitmap_green, 0, 0); + ctx.drawImage(bitmap_red, -100, 0); + ctx.drawImage(bitmap_red, 100, 0); + ctx.drawImage(bitmap_red, 0, -50); + ctx.drawImage(bitmap_red, 0, 50); + @assert pixel 0,0 ==~ 0,255,0,255; + @assert pixel 99,0 ==~ 0,255,0,255; + @assert pixel 0,49 ==~ 0,255,0,255; + @assert pixel 99,49 ==~ 0,255,0,255; + +- name: 2d.drawImage.5arg + test_type: promise + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + const response_red = await fetch('/images/red.png'); + const blob_red = await response_red.blob(); + const bitmap_red = await createImageBitmap(blob_red); + + const response_green = await fetch('/images/green.png'); + const blob_green = await response_green.blob(); + const bitmap_green = await createImageBitmap(blob_green); + + ctx.drawImage(bitmap_green, 50, 0, 50, 50); + ctx.drawImage(bitmap_red, 0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50); + @assert pixel 0,0 ==~ 0,255,0,255; + @assert pixel 99,0 ==~ 0,255,0,255; + @assert pixel 0,49 ==~ 0,255,0,255; + @assert pixel 99,49 ==~ 0,255,0,255; + +- name: 2d.drawImage.9arg.basic + test_type: promise + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + const response = await fetch('/images/green.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + + ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, 50); + @assert pixel 0,0 ==~ 0,255,0,255; + @assert pixel 99,0 ==~ 0,255,0,255; + @assert pixel 0,49 ==~ 0,255,0,255; + @assert pixel 99,49 ==~ 0,255,0,255; + expected: green + +- name: 2d.drawImage.9arg.sourcepos + test_type: promise + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + const response = await fetch('/images/rgrg-256x256.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + ctx.drawImage(bitmap, 140, 20, 100, 50, 0, 0, 100, 50); + @assert pixel 0,0 ==~ 0,255,0,255; + @assert pixel 99,0 ==~ 0,255,0,255; + @assert pixel 0,49 ==~ 0,255,0,255; + @assert pixel 99,49 ==~ 0,255,0,255; + expected: green + +- name: 2d.drawImage.9arg.sourcesize + test_type: promise + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + const response = await fetch('/images/rgrg-256x256.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + ctx.drawImage(bitmap, 0, 0, 256, 256, 0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 51, 26); + ctx.fillRect(49, 24, 51, 26); + @assert pixel 0,0 ==~ 0,255,0,255; + @assert pixel 99,0 ==~ 0,255,0,255; + @assert pixel 0,49 ==~ 0,255,0,255; + @assert pixel 99,49 ==~ 0,255,0,255; + @assert pixel 20,20 ==~ 0,255,0,255; + @assert pixel 80,20 ==~ 0,255,0,255; + @assert pixel 20,30 ==~ 0,255,0,255; + @assert pixel 80,30 ==~ 0,255,0,255; + expected: green + +- name: 2d.drawImage.9arg.destpos + test_type: promise + code: | + const response_red = await fetch('/images/red.png'); + const blob_red = await response_red.blob(); + const bitmap_red = await createImageBitmap(blob_red); + + const response_green = await fetch('/images/green.png'); + const blob_green = await response_green.blob(); + const bitmap_green = await createImageBitmap(blob_green); + + ctx.drawImage(bitmap_green, 0, 0, 100, 50, 0, 0, 100, 50); + ctx.drawImage(bitmap_green, 0, 0, 100, 50, -100, 0, 100, 50); + ctx.drawImage(bitmap_red, 0, 0, 100, 50, 100, 0, 100, 50); + ctx.drawImage(bitmap_red, 0, 0, 100, 50, 0, -50, 100, 50); + ctx.drawImage(bitmap_red, 0, 0, 100, 50, 0, 50, 100, 50); + @assert pixel 0,0 ==~ 0,255,0,255; + @assert pixel 99,0 ==~ 0,255,0,255; + @assert pixel 0,49 ==~ 0,255,0,255; + @assert pixel 99,49 ==~ 0,255,0,255; + +- name: 2d.drawImage.9arg.destsize + test_type: promise + code: | + const response_red = await fetch('/images/red.png'); + const blob_red = await response_red.blob(); + const bitmap_red = await createImageBitmap(blob_red); + + const response_green = await fetch('/images/green.png'); + const blob_green = await response_green.blob(); + const bitmap_green = await createImageBitmap(blob_green); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.drawImage(bitmap_green, 1, 1, 1, 1, 0, 0, 100, 50); + ctx.drawImage(bitmap_red, 0, 0, 100, 50, -50, 0, 50, 50); + ctx.drawImage(bitmap_red, 0, 0, 100, 50, 100, 0, 50, 50); + ctx.drawImage(bitmap_red, 0, 0, 100, 50, 0, -25, 100, 25); + ctx.drawImage(bitmap_red, 0, 0, 100, 50, 0, 50, 100, 25); + @assert pixel 0,0 ==~ 0,255,0,255; + @assert pixel 99,0 ==~ 0,255,0,255; + @assert pixel 0,49 ==~ 0,255,0,255; + @assert pixel 99,49 ==~ 0,255,0,255; + +- name: 2d.drawImage.canvas + canvasType: ['OffscreenCanvas', 'Worker'] + code: | + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var ctx2 = offscreenCanvas2.getContext('2d'); + ctx2.fillStyle = '#0f0'; + ctx2.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.drawImage(offscreenCanvas2, 0, 0); + @assert pixel 0,0 ==~ 0,255,0,255; + @assert pixel 99,0 ==~ 0,255,0,255; + @assert pixel 0,49 ==~ 0,255,0,255; + @assert pixel 99,49 ==~ 0,255,0,255; + +- name: 2d.drawImage.zerocanvas + canvasType: ['OffscreenCanvas', 'Worker'] + code: | + var offscreenCanvas2 = new OffscreenCanvas(0, 10); + @assert throws INVALID_STATE_ERR ctx.drawImage(offscreenCanvas2, 0, 0); + + offscreenCanvas2.width = 10; + offscreenCanvas2.height = 0; + @assert throws INVALID_STATE_ERR ctx.drawImage(offscreenCanvas2, 0, 0); + + offscreenCanvas2.width = 0; + offscreenCanvas2.height = 0; + @assert throws INVALID_STATE_ERR ctx.drawImage(offscreenCanvas2, 0, 0); + +- name: 2d.drawImage.floatsource + test_type: promise + code: | + const response = await fetch('/images/green.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + ctx.drawImage(bitmap, 10.1, 10.1, 0.1, 0.1, 0, 0, 100, 50); + @assert pixel 50,25 ==~ 0,255,0,255; + Expected: green + +- name: 2d.drawImage.zerosource + desc: drawImage with zero-sized source rectangle draws nothing without exception + test_type: promise + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + const response = await fetch('/images/red.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + ctx.drawImage(bitmap, 10, 10, 0, 1, 0, 0, 100, 50); + ctx.drawImage(bitmap, 10, 10, 1, 0, 0, 0, 100, 50); + ctx.drawImage(bitmap, 10, 10, 0, 0, 0, 0, 100, 50); + @assert pixel 50,25 ==~ 0,255,0,255; + expected: green + +- name: 2d.drawImage.zerosource.image + desc: drawImage with zero-sized source rectangle from image draws nothing without exception + test_type: promise + canvasType: ['HTMLCanvas', 'OffscreenCanvas'] + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + function loadImage(src) { + return new Promise((resolve, reject) => { + const img = new Image(); + img.onload = () => resolve(img); + img.onerror = (err) => reject(err); + img.src = src; + }); + } + const img1 = await loadImage('/images/red-zerowidth.svg'); + const img2 = await loadImage('/images/red-zeroheight.svg'); + const img3 = await loadImage('/images/red-zerosize.svg'); + + ctx.drawImage(img1, 0, 0, 100, 50); + ctx.drawImage(img2, 0, 0, 100, 50); + ctx.drawImage(img3, 0, 0, 100, 50); + _assertPixel(canvas, 50, 25, 0, 255, 0, 255); + expected: green + + +- name: 2d.drawImage.negativesource + desc: Negative source width/height represents the correct rectangle + mozilla: {throws: !!null ''} + test_type: promise + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + const response = await fetch('/images/ggrr-256x256.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + ctx.drawImage(bitmap, 100, 78, -100, 50, 0, 0, 50, 50); + ctx.drawImage(bitmap, 100, 128, -100, -50, 50, 0, 50, 50); + @assert pixel 1,1 ==~ 0,255,0,255; + @assert pixel 1,48 ==~ 0,255,0,255; + @assert pixel 98,1 ==~ 0,255,0,255; + @assert pixel 98,48 ==~ 0,255,0,255; + @assert pixel 48,1 ==~ 0,255,0,255; + @assert pixel 48,48 ==~ 0,255,0,255; + @assert pixel 51,1 ==~ 0,255,0,255; + @assert pixel 51,48 ==~ 0,255,0,255; + @assert pixel 25,25 ==~ 0,255,0,255; + @assert pixel 75,25 ==~ 0,255,0,255; + expected: green + +- name: 2d.drawImage.negativedest + desc: Negative destination width/height represents the correct rectangle + mozilla: {throws: !!null ''} + test_type: promise + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + const response = await fetch('/images/ggrr-256x256.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + ctx.drawImage(bitmap, 100, 78, 50, 50, 0, 50, 50, -50); + ctx.drawImage(bitmap, 100, 128, 50, -50, 100, 50, -50, -50); + @assert pixel 1,1 ==~ 0,255,0,255; + @assert pixel 1,48 ==~ 0,255,0,255; + @assert pixel 98,1 ==~ 0,255,0,255; + @assert pixel 98,48 ==~ 0,255,0,255; + @assert pixel 48,1 ==~ 0,255,0,255; + @assert pixel 48,48 ==~ 0,255,0,255; + @assert pixel 51,1 ==~ 0,255,0,255; + @assert pixel 51,48 ==~ 0,255,0,255; + @assert pixel 25,25 ==~ 0,255,0,255; + @assert pixel 75,25 ==~ 0,255,0,255; + expected: green + +- name: 2d.drawImage.negativedir + desc: Negative dimensions do not affect the direction of the image + mozilla: {throws: !!null ''} + test_type: promise + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + const response = await fetch('/images/ggrr-256x256.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + ctx.drawImage(bitmap, 0, 178, 50, -100, 0, 0, 50, 100); + ctx.drawImage(bitmap, 0, 78, 50, 100, 50, 100, 50, -100); + @assert pixel 1,1 ==~ 0,255,0,255; + @assert pixel 1,48 ==~ 0,255,0,255; + @assert pixel 98,1 ==~ 0,255,0,255; + @assert pixel 98,48 ==~ 0,255,0,255; + @assert pixel 48,1 ==~ 0,255,0,255; + @assert pixel 48,48 ==~ 0,255,0,255; + @assert pixel 51,1 ==~ 0,255,0,255; + @assert pixel 51,48 ==~ 0,255,0,255; + @assert pixel 25,25 ==~ 0,255,0,255; + @assert pixel 75,25 ==~ 0,255,0,255; + expected: green + +- name: 2d.drawImage.outsidesource + DISABLED: fix this to match the current spec (transparent black outside source) + canvasType: ['OffscreenCanvas', 'Worker'] + code: | + const response_red = await fetch('/images/red.png'); + const blob_red = await response_red.blob(); + const bitmap_red = await createImageBitmap(blob_red); + + const response_green = await fetch('/images/green.png'); + const blob_green = await response_green.blob(); + const bitmap_green = await createImageBitmap(blob_green); + ctx.drawImage(bitmap_green, 10.5, 10.5, 89.5, 39.5, 0, 0, 100, 50); + ctx.drawImage(bitmap_green, 5.5, 5.5, -5.5, -5.5, 0, 0, 100, 50); + ctx.drawImage(bitmap_green, 100, 50, -5, -5, 0, 0, 100, 50); + @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, -0.001, 0, 100, 50, 0, 0, 100, 50); + @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, 0, -0.001, 100, 50, 0, 0, 100, 50); + @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, 0, 0, 100.001, 50, 0, 0, 100, 50); + @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, 0, 0, 100, 50.001, 0, 0, 100, 50); + @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, 50, 0, 50.001, 50, 0, 0, 100, 50); @moz-todo + @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, 0, 0, -5, 5, 0, 0, 100, 50); + @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, 0, 0, 5, -5, 0, 0, 100, 50); + @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, 110, 60, -20, -20, 0, 0, 100, 50); + @assert pixel 50,25 ==~ 0,255,0,255; @moz-todo + expected: green + +- name: 2d.drawImage.broken + test_type: promise + code: | + const response = await fetch('/images/broken.png'); + const blob = await response.blob(); + + await promise_rejects_dom(t, 'InvalidStateError', createImageBitmap(blob), 'The source image could not be decoded.'); + expected: green + +- name: 2d.drawImage.svg + desc: drawImage() of an SVG image + test_type: promise + canvasType: ['HTMLCanvas', 'OffscreenCanvas'] + code: | + const img = new Image(); + const imageLoadPromise = new Promise((resolve, reject) => { + img.onload = () => resolve(); + img.onerror = (err) => reject(err); + }); + img.src = '/images/green.svg'; + await imageLoadPromise; + + ctx.drawImage(img, 0, 0); + _assertPixelApprox(canvas, 50, 25, 0, 255, 0, 255, 2); + expected: green + +- name: 2d.drawImage.path + test_type: promise + code: | + ctx.fillStyle = '#0f0'; + ctx.rect(0, 0, 100, 50); + const response = await fetch('/images/red.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + + ctx.drawImage(bitmap, 0, 0); + ctx.fill(); + @assert pixel 50,25 ==~ 0,255,0,255; + expected: green + +- name: 2d.drawImage.transform + test_type: promise + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.translate(100, 0); + const response = await fetch('/images/red.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + + ctx.drawImage(bitmap, 0, 0); + @assert pixel 50,25 ==~ 0,255,0,255; + expected: green + +- name: 2d.drawImage.alpha + test_type: promise + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalAlpha = 0; + const response = await fetch('/images/red.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + + ctx.drawImage(bitmap, 0, 0); + @assert pixel 50,25 ==~ 0,255,0,255; + expected: green + +- name: 2d.drawImage.clip + test_type: promise + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.rect(-10, -10, 1, 1); + ctx.clip(); + const response = await fetch('/images/red.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.rect(-10, -10, 1, 1); + ctx.clip(); + ctx.drawImage(bitmap, 0, 0); + @assert pixel 50,25 ==~ 0,255,0,255; + expected: green + +- name: 2d.drawImage.composite + test_type: promise + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-over'; + const response = await fetch('/images/red.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + + ctx.drawImage(bitmap, 0, 0); + @assert pixel 50,25 ==~ 0,255,0,255; + expected: green + +- name: 2d.drawImage.nowrap + desc: Stretched images do not get pixels wrapping around the edges + test_type: promise + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + const response = await fetch('/images/redtransparent.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + + ctx.drawImage(bitmap, -1950, 0, 2000, 50); + @assert pixel 45,25 ==~ 0,255,0,255; + @assert pixel 50,25 ==~ 0,255,0,255; + @assert pixel 55,25 ==~ 0,255,0,255; + expected: green + +- name: 2d.drawImage.nonfinite + desc: drawImage() with Infinity/NaN is ignored + test_type: promise + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + const response = await fetch('/images/redtransparent.png'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + + @nonfinite ctx.drawImage(, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>); + @nonfinite ctx.drawImage(, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <100 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>); + @nonfinite ctx.drawImage(, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <100 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <100 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>); + @assert pixel 50,25 == 0,255,0,255; + expected: green diff --git a/testing/web-platform/tests/html/canvas/tools/yaml-new/drawing-rectangles-to-the-canvas.yaml b/testing/web-platform/tests/html/canvas/tools/yaml-new/drawing-rectangles-to-the-canvas.yaml new file mode 100644 index 0000000000..408e932abe --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/yaml-new/drawing-rectangles-to-the-canvas.yaml @@ -0,0 +1,469 @@ +- name: 2d.clearRect.basic + desc: clearRect clears to transparent black + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.clearRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,0,0,0; + expected: clear + +- name: 2d.clearRect.path + desc: clearRect does not affect the current path + code: | + ctx.fillStyle = '#0f0'; + ctx.beginPath(); + ctx.rect(0, 0, 100, 50); + ctx.clearRect(0, 0, 16, 16); + ctx.fill(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.clearRect.zero + desc: clearRect of zero pixels has no effect + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.clearRect(0, 0, 100, 0); + ctx.clearRect(0, 0, 0, 50); + ctx.clearRect(0, 0, 0, 0); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.clearRect.negative + desc: clearRect of negative sizes works + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.clearRect(0, 0, 50, 25); + ctx.clearRect(100, 0, -50, 25); + ctx.clearRect(0, 50, 50, -25); + ctx.clearRect(100, 50, -50, -25); + @assert pixel 25,12 == 0,0,0,0; + @assert pixel 75,12 == 0,0,0,0; + @assert pixel 25,37 == 0,0,0,0; + @assert pixel 75,37 == 0,0,0,0; + expected: clear + +- name: 2d.clearRect.transform + desc: clearRect is affected by transforms + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.scale(10, 10); + ctx.translate(0, 5); + ctx.clearRect(0, -5, 10, 5); + @assert pixel 50,25 == 0,0,0,0; + expected: clear + +- name: 2d.clearRect.globalalpha + desc: clearRect is not affected by globalAlpha + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalAlpha = 0.1; + ctx.clearRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,0,0,0; + expected: clear + +- name: 2d.clearRect.globalcomposite + desc: clearRect is not affected by globalCompositeOperation + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.clearRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,0,0,0; + expected: clear + +- name: 2d.clearRect.clip + desc: clearRect is affected by clipping regions + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.beginPath(); + ctx.rect(0, 0, 16, 16); + ctx.clip(); + ctx.clearRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 16, 16); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.clearRect.shadow + desc: clearRect does not draw shadows + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#f00'; + ctx.shadowBlur = 0; + ctx.shadowOffsetX = 0; + ctx.shadowOffsetY = 50; + ctx.clearRect(0, -50, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.clearRect.nonfinite + desc: clearRect() with Infinity/NaN is ignored + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + @nonfinite ctx.clearRect(<0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <100 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>); + @assert pixel 50,25 == 0,255,0,255; + expected: green + + +- name: 2d.fillRect.basic + desc: fillRect works + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.fillRect.path + desc: fillRect does not affect the current path + code: | + ctx.beginPath(); + ctx.rect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 16, 16); + ctx.fillStyle = '#0f0'; + ctx.fill(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.fillRect.zero + desc: fillRect of zero pixels has no effect + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 0); + ctx.fillRect(0, 0, 0, 50); + ctx.fillRect(0, 0, 0, 0); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.fillRect.negative + desc: fillRect of negative sizes works + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 25); + ctx.fillRect(100, 0, -50, 25); + ctx.fillRect(0, 50, 50, -25); + ctx.fillRect(100, 50, -50, -25); + @assert pixel 25,12 == 0,255,0,255; + @assert pixel 75,12 == 0,255,0,255; + @assert pixel 25,37 == 0,255,0,255; + @assert pixel 75,37 == 0,255,0,255; + expected: green + +- name: 2d.fillRect.transform + desc: fillRect is affected by transforms + code: | + ctx.scale(10, 10); + ctx.translate(0, 5); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, -5, 10, 5); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +# don't bother testing globalalpha, globalcomposite because they're already heavily used by other test cases + +- name: 2d.fillRect.clip + desc: fillRect is affected by clipping regions + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.beginPath(); + ctx.rect(0, 0, 16, 16); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 16, 16); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.fillRect.shadow + desc: fillRect draws shadows + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowBlur = 0; + ctx.shadowOffsetX = 0; + ctx.shadowOffsetY = 50; + ctx.fillRect(0, -50, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.fillRect.nonfinite + desc: fillRect() with Infinity/NaN is ignored + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + @nonfinite ctx.fillRect(<0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <100 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>); + @assert pixel 50,25 == 0,255,0,255; + expected: green + + +- name: 2d.strokeRect.basic + desc: strokeRect works + code: | + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.strokeRect(25, 24, 50, 2); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.strokeRect.path + desc: strokeRect does not affect the current path + code: | + ctx.beginPath(); + ctx.rect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 5; + ctx.strokeRect(0, 0, 16, 16); + ctx.fillStyle = '#0f0'; + ctx.fill(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.strokeRect.zero.1 + desc: strokeRect of 0x0 pixels draws nothing + code: | + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 250; + ctx.strokeRect(50, 25, 0, 0); + @assert pixel 50,25 == 0,0,0,0; + expected: clear + +- name: 2d.strokeRect.zero.2 + desc: strokeRect of 0x0 pixels draws nothing, including caps and joins + code: | + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 250; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + ctx.strokeRect(50, 25, 0, 0); + @assert pixel 50,25 == 0,0,0,0; + expected: clear + +- name: 2d.strokeRect.zero.3 + desc: strokeRect of Nx0 pixels draws a straight line + code: | + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.strokeRect(0, 25, 100, 0); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.strokeRect.zero.4 + desc: strokeRect of Nx0 pixels draws a closed line with no caps + code: | + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 250; + ctx.lineCap = 'round'; + ctx.strokeRect(100, 25, 100, 0); + @assert pixel 50,25 == 0,0,0,0; + expected: clear + +- name: 2d.strokeRect.zero.5 + desc: strokeRect of Nx0 pixels draws a closed line with joins + code: | + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 250; + ctx.lineJoin = 'round'; + ctx.strokeRect(100, 25, 100, 0); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.strokeRect.negative + desc: strokeRect of negative sizes works + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 25; + ctx.strokeRect(12, 12, 26, 1); + ctx.strokeRect(88, 12, -26, 1); + ctx.strokeRect(12, 38, 26, -1); + ctx.strokeRect(88, 38, -26, -1); + @assert pixel 25,12 == 0,255,0,255; + @assert pixel 75,12 == 0,255,0,255; + @assert pixel 25,37 == 0,255,0,255; + @assert pixel 75,37 == 0,255,0,255; + expected: green + +- name: 2d.strokeRect.transform + desc: fillRect is affected by transforms + code: | + ctx.scale(10, 10); + ctx.translate(0, 5); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 5; + ctx.strokeRect(2.5, -2.6, 5, 0.2); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.strokeRect.globalalpha + desc: strokeRect is affected by globalAlpha + code: | + ctx.globalAlpha = 0; + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 50; + ctx.strokeRect(25, 24, 50, 2); + @assert pixel 50,25 == 0,0,0,0; + expected: clear + +- name: 2d.strokeRect.globalcomposite + desc: strokeRect is not affected by globalCompositeOperation + code: | + ctx.globalCompositeOperation = 'source-in'; + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 50; + ctx.strokeRect(25, 24, 50, 2); + @assert pixel 50,25 == 0,0,0,0; + expected: clear + +- name: 2d.strokeRect.clip + desc: strokeRect is affected by clipping regions + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.beginPath(); + ctx.rect(0, 0, 16, 16); + ctx.clip(); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 50; + ctx.strokeRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 16, 16); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.strokeRect.shadow + desc: strokeRect draws shadows + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.shadowColor = '#0f0'; + ctx.shadowBlur = 0; + ctx.shadowOffsetX = 0; + ctx.shadowOffsetY = 50; + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 50; + ctx.strokeRect(0, -75, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.strokeRect.nonfinite + desc: strokeRect() with Infinity/NaN is ignored + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 150; + @nonfinite ctx.strokeRect(<0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <100 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.fillStyle.colorObject + desc: ctx.fillStyle works with color objects + canvasType: + ['HTMLCanvas'] + code: | + ctx.fillStyle = {r: 1, g: 0, b: 0}; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 255,0,0,255; + ctx.fillStyle = {r: 0, g: 0, b: 1}; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,0,255,255; + ctx.fillStyle = {r: 0.2, g: 0.4, b: 0.6}; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 51,102,153,255; + ctx.fillStyle = {r: 0, g: 1, b: 0}; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + ctx.fillStyle = {r: -1, g: 0, b: 0}; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,0,0,255; + ctx.fillStyle = {r: 0, g: 2, b: 0}; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.fillStyle.colorObject.transparency + desc: ctx.fillStyle with color objects has transparency + canvasType: + ['HTMLCanvas'] + code: | + ctx.fillStyle = {r: 0, g: 1, b: 0, a: 0}; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,0,0,0; + ctx.clearRect(0, 0, 100, 50); + ctx.fillStyle = {r: 0, g: 1, b: 0, a: -1}; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,0,0,0; + ctx.clearRect(0, 0, 100, 50); + ctx.fillStyle = {r: 0, g: 1, b: 0, a: 0.5}; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,128; + ctx.clearRect(0, 0, 100, 50); + ctx.fillStyle = {r: 0, g: 1, b: 0, a: 1}; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.strokeStyle.colorObject + desc: ctx.strokeStyle works with color objects + canvasType: + ['HTMLCanvas'] + code: | + ctx.lineWidth = 50; + ctx.strokeStyle = {r: 1, g: 0, b: 0}; + ctx.strokeRect(25, 24, 50, 2); + @assert pixel 50,25 == 255,0,0,255; + ctx.strokeStyle = {r: 0, g: 0, b: 1}; + ctx.strokeRect(25, 24, 50, 2); + @assert pixel 50,25 == 0,0,255,255; + ctx.strokeStyle = {r: 0.2, g: 0.4, b: 0.6}; + ctx.strokeRect(25, 24, 50, 2); + @assert pixel 50,25 == 51,102,153,255; + ctx.strokeStyle = {r: 0, g: 1, b: 0}; + ctx.strokeRect(25, 24, 50, 2); + @assert pixel 50,25 == 0,255,0,255; + ctx.strokeStyle = {r: -1, g: 0, b: 0}; + ctx.strokeRect(25, 24, 50, 2); + @assert pixel 50,25 == 0,0,0,255; + ctx.strokeStyle = {r: 0, g: 2, b: 0}; + ctx.strokeRect(25, 24, 50, 2); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.strokeStyle.colorObject.transparency + desc: ctx.strokeStyle with color objects has transparency + canvasType: + ['HTMLCanvas'] + code: | + ctx.lineWidth = 50; + ctx.strokeStyle = {r: 0, g: 1, b: 0, a: 0}; + ctx.strokeRect(25, 24, 50, 2); + @assert pixel 50,25 == 0,0,0,0; + ctx.strokeStyle = {r: 0, g: 1, b: 0, a: -1}; + ctx.strokeRect(25, 24, 50, 2); + @assert pixel 50,25 == 0,0,0,0; + ctx.clearRect(0, 0, 100, 50); + ctx.strokeStyle = {r: 0, g: 1, b: 0, a: 0.5}; + ctx.strokeRect(25, 24, 50, 2); + @assert pixel 50,25 == 0,255,0,128; + ctx.clearRect(0, 0, 100, 50); + ctx.strokeStyle = {r: 0, g: 1, b: 0, a: 1}; + ctx.strokeRect(25, 24, 50, 2); + @assert pixel 50,25 == 0,255,0,255; + expected: green diff --git a/testing/web-platform/tests/html/canvas/tools/yaml-new/fill-and-stroke-styles.yaml b/testing/web-platform/tests/html/canvas/tools/yaml-new/fill-and-stroke-styles.yaml new file mode 100644 index 0000000000..c992af6e7c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/yaml-new/fill-and-stroke-styles.yaml @@ -0,0 +1,2104 @@ +- name: 2d.fillStyle.parse.current.basic + desc: currentColor is computed from the canvas element + canvasType: ['HtmlCanvas'] + code: | + canvas.setAttribute('style', 'color: #0f0'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'currentColor'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.fillStyle.parse.current.changed + desc: currentColor is computed when the attribute is set, not when it is painted + canvasType: ['HtmlCanvas'] + code: | + canvas.setAttribute('style', 'color: #0f0'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'currentColor'; + canvas.setAttribute('style', 'color: #f00'); + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.fillStyle.parse.current.removed + desc: currentColor is solid black when the canvas element is not in a document + canvasType: ['HtmlCanvas'] + code: | + // Try not to let it undetectably incorrectly pick up opaque-black + // from other parts of the document: + document.body.parentNode.setAttribute('style', 'color: #f00'); + document.body.setAttribute('style', 'color: #f00'); + canvas.setAttribute('style', 'color: #f00'); + + var canvas2 = document.createElement('canvas'); + var ctx2 = canvas2.getContext('2d'); + ctx2.fillStyle = '#f00'; + ctx2.fillStyle = 'currentColor'; + ctx2.fillRect(0, 0, 100, 50); + ctx.drawImage(canvas2, 0, 0); + + document.body.parentNode.removeAttribute('style'); + document.body.removeAttribute('style'); + + @assert pixel 50,25 == 0,0,0,255; + expected: | + size 100 50 + cr.set_source_rgb(0, 0, 0) + cr.rectangle(0, 0, 100, 50) + cr.fill() + +- name: 2d.fillStyle.invalidstring + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillStyle = 'invalid'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.fillStyle.invalidtype + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillStyle = null; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.fillStyle.get.solid + code: | + ctx.fillStyle = '#fa0'; + @assert ctx.fillStyle === '#ffaa00'; + +- name: 2d.fillStyle.get.semitransparent + code: | + ctx.fillStyle = 'rgba(255,255,255,0.45)'; + @assert ctx.fillStyle =~ /^rgba\(255, 255, 255, 0\.4\d+\)$/; + +- name: 2d.fillStyle.get.halftransparent + code: | + ctx.fillStyle = 'rgba(255,255,255,0.5)'; + @assert ctx.fillStyle === 'rgba(255, 255, 255, 0.5)'; + +- name: 2d.fillStyle.get.transparent + code: | + ctx.fillStyle = 'rgba(0,0,0,0)'; + @assert ctx.fillStyle === 'rgba(0, 0, 0, 0)'; + +- name: 2d.fillStyle.default + code: | + @assert ctx.fillStyle === '#000000'; + +- name: 2d.fillStyle.toStringFunctionCallback + desc: Passing a function in to ctx.fillStyle or ctx.strokeStyle with a toString callback works as specified + code: | + ctx.fillStyle = { toString: function() { return "#008000"; } }; + @assert ctx.fillStyle === "#008000"; + ctx.fillStyle = {}; + @assert ctx.fillStyle === "#008000"; + ctx.fillStyle = 800000; + @assert ctx.fillStyle === "#008000"; + @assert throws TypeError ctx.fillStyle = { toString: function() { throw new TypeError; } }; + ctx.strokeStyle = { toString: function() { return "#008000"; } }; + @assert ctx.strokeStyle === "#008000"; + ctx.strokeStyle = {}; + @assert ctx.strokeStyle === "#008000"; + ctx.strokeStyle = 800000; + @assert ctx.strokeStyle === "#008000"; + @assert throws TypeError ctx.strokeStyle = { toString: function() { throw new TypeError; } }; + +- name: 2d.strokeStyle.default + code: | + @assert ctx.strokeStyle === '#000000'; + + +- name: 2d.gradient.object.type + desc: window.CanvasGradient exists and has the right properties + notes: &bindings Defined in "Web IDL" (draft) + code: | + {% set root = 'self' if canvas_type == 'worker' else 'window' %} + @assert {{ root }}.CanvasGradient !== undefined; + @assert {{ root }}.CanvasGradient.prototype.addColorStop !== undefined; + +- name: 2d.gradient.object.return + desc: createLinearGradient() and createRadialGradient() returns objects implementing + CanvasGradient + code: | + {% set root = 'self' if canvas_type == 'worker' else 'window' %} + {{ root }}.CanvasGradient.prototype.thisImplementsCanvasGradient = true; + + var g1 = ctx.createLinearGradient(0, 0, 100, 0); + @assert g1.addColorStop !== undefined; + @assert g1.thisImplementsCanvasGradient === true; + + var g2 = ctx.createRadialGradient(0, 0, 10, 0, 0, 20); + @assert g2.addColorStop !== undefined; + @assert g2.thisImplementsCanvasGradient === true; + +- name: 2d.gradient.interpolate.solid + code: | + var g = ctx.createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.gradient.interpolate.color + code: | + var g = ctx.createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, '#ff0'); + g.addColorStop(1, '#00f'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 25,25 ==~ 191,191,63,255 +/- 3; + @assert pixel 50,25 ==~ 127,127,127,255 +/- 3; + @assert pixel 75,25 ==~ 63,63,191,255 +/- 3; + expected: | + size 100 50 + g = cairo.LinearGradient(0, 0, 100, 0) + g.add_color_stop_rgb(0, 1,1,0) + g.add_color_stop_rgb(1, 0,0,1) + cr.set_source(g) + cr.rectangle(0, 0, 100, 50) + cr.fill() + +- name: 2d.gradient.interpolate.alpha + code: | + ctx.fillStyle = '#ff0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, 'rgba(0,0,255, 0)'); + g.addColorStop(1, 'rgba(0,0,255, 1)'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 25,25 ==~ 191,191,63,255 +/- 3; + @assert pixel 50,25 ==~ 127,127,127,255 +/- 3; + @assert pixel 75,25 ==~ 63,63,191,255 +/- 3; + expected: | + size 100 50 + g = cairo.LinearGradient(0, 0, 100, 0) + g.add_color_stop_rgb(0, 1,1,0) + g.add_color_stop_rgb(1, 0,0,1) + cr.set_source(g) + cr.rectangle(0, 0, 100, 50) + cr.fill() + +- name: 2d.gradient.interpolate.coloralpha + code: | + var g = ctx.createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, 'rgba(255,255,0, 0)'); + g.addColorStop(1, 'rgba(0,0,255, 1)'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 25,25 ==~ 190,190,65,65 +/- 3; + @assert pixel 50,25 ==~ 126,126,128,128 +/- 3; + @assert pixel 75,25 ==~ 62,62,192,192 +/- 3; + expected: | + size 100 50 + g = cairo.LinearGradient(0, 0, 100, 0) + g.add_color_stop_rgba(0, 1,1,0, 0) + g.add_color_stop_rgba(1, 0,0,1, 1) + cr.set_source(g) + cr.rectangle(0, 0, 100, 50) + cr.fill() + +- name: 2d.gradient.interpolate.outside + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createLinearGradient(25, 0, 75, 0); + g.addColorStop(0.4, '#0f0'); + g.addColorStop(0.6, '#0f0'); + + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 20,25 ==~ 0,255,0,255; + @assert pixel 50,25 ==~ 0,255,0,255; + @assert pixel 80,25 ==~ 0,255,0,255; + expected: green + +- name: 2d.gradient.interpolate.zerosize.fill + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.rect(0, 0, 100, 50); + ctx.fill(); + @assert pixel 40,20 == 0,255,0,255; + expected: green + +- name: 2d.gradient.interpolate.zerosize.stroke + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.strokeStyle = g; + ctx.rect(20, 20, 60, 10); + ctx.stroke(); + @assert pixel 19,19 == 0,255,0,255; + @assert pixel 20,19 == 0,255,0,255; + @assert pixel 21,19 == 0,255,0,255; + @assert pixel 19,20 == 0,255,0,255; + @assert pixel 20,20 == 0,255,0,255; + @assert pixel 21,20 == 0,255,0,255; + @assert pixel 19,21 == 0,255,0,255; + @assert pixel 20,21 == 0,255,0,255; + @assert pixel 21,21 == 0,255,0,255; + expected: green + +- name: 2d.gradient.interpolate.zerosize.fillRect + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 40,20 == 0,255,0,255; @moz-todo + expected: green + +- name: 2d.gradient.interpolate.zerosize.strokeRect + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.strokeStyle = g; + ctx.strokeRect(20, 20, 60, 10); + @assert pixel 19,19 == 0,255,0,255; + @assert pixel 20,19 == 0,255,0,255; + @assert pixel 21,19 == 0,255,0,255; + @assert pixel 19,20 == 0,255,0,255; + @assert pixel 20,20 == 0,255,0,255; + @assert pixel 21,20 == 0,255,0,255; + @assert pixel 19,21 == 0,255,0,255; + @assert pixel 20,21 == 0,255,0,255; + @assert pixel 21,21 == 0,255,0,255; + expected: green + +- name: 2d.gradient.interpolate.zerosize.fillText + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.font = '100px sans-serif'; + ctx.fillText("AA", 0, 50); + _assertGreen(ctx, 100, 50); + expected: green + +- name: 2d.gradient.interpolate.zerosize.strokeText + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.strokeStyle = g; + ctx.font = '100px sans-serif'; + ctx.strokeText("AA", 0, 50); + _assertGreen(ctx, 100, 50); + expected: green + + +- name: 2d.gradient.interpolate.vertical + code: | + var g = ctx.createLinearGradient(0, 0, 0, 50); + g.addColorStop(0, '#ff0'); + g.addColorStop(1, '#00f'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,12 ==~ 191,191,63,255 +/- 10; + @assert pixel 50,25 ==~ 127,127,127,255 +/- 5; + @assert pixel 50,37 ==~ 63,63,191,255 +/- 10; + expected: | + size 100 50 + g = cairo.LinearGradient(0, 0, 0, 50) + g.add_color_stop_rgb(0, 1,1,0) + g.add_color_stop_rgb(1, 0,0,1) + cr.set_source(g) + cr.rectangle(0, 0, 100, 50) + cr.fill() + +- name: 2d.gradient.interpolate.multiple + code: | + canvas.width = 200; + var g = ctx.createLinearGradient(0, 0, 200, 0); + g.addColorStop(0, '#ff0'); + g.addColorStop(0.5, '#0ff'); + g.addColorStop(1, '#f0f'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 200, 50); + @assert pixel 50,25 ==~ 127,255,127,255 +/- 3; + @assert pixel 100,25 ==~ 0,255,255,255 +/- 3; + @assert pixel 150,25 ==~ 127,127,255,255 +/- 3; + expected: | + size 200 50 + g = cairo.LinearGradient(0, 0, 200, 0) + g.add_color_stop_rgb(0.0, 1,1,0) + g.add_color_stop_rgb(0.5, 0,1,1) + g.add_color_stop_rgb(1.0, 1,0,1) + cr.set_source(g) + cr.rectangle(0, 0, 200, 50) + cr.fill() + +- name: 2d.gradient.interpolate.overlap + code: | + canvas.width = 200; + var g = ctx.createLinearGradient(0, 0, 200, 0); + g.addColorStop(0, '#f00'); + g.addColorStop(0, '#ff0'); + g.addColorStop(0.25, '#00f'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.25, '#ff0'); + g.addColorStop(0.5, '#00f'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.75, '#00f'); + g.addColorStop(0.75, '#f00'); + g.addColorStop(0.75, '#ff0'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.5, '#ff0'); + g.addColorStop(1, '#00f'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 200, 50); + @assert pixel 49,25 ==~ 0,0,255,255 +/- 16; + @assert pixel 51,25 ==~ 255,255,0,255 +/- 16; + @assert pixel 99,25 ==~ 0,0,255,255 +/- 16; + @assert pixel 101,25 ==~ 255,255,0,255 +/- 16; + @assert pixel 149,25 ==~ 0,0,255,255 +/- 16; + @assert pixel 151,25 ==~ 255,255,0,255 +/- 16; + expected: | + size 200 50 + g = cairo.LinearGradient(0, 0, 50, 0) + g.add_color_stop_rgb(0, 1,1,0) + g.add_color_stop_rgb(1, 0,0,1) + cr.set_source(g) + cr.rectangle(0, 0, 50, 50) + cr.fill() + + g = cairo.LinearGradient(50, 0, 100, 0) + g.add_color_stop_rgb(0, 1,1,0) + g.add_color_stop_rgb(1, 0,0,1) + cr.set_source(g) + cr.rectangle(50, 0, 50, 50) + cr.fill() + + g = cairo.LinearGradient(100, 0, 150, 0) + g.add_color_stop_rgb(0, 1,1,0) + g.add_color_stop_rgb(1, 0,0,1) + cr.set_source(g) + cr.rectangle(100, 0, 50, 50) + cr.fill() + + g = cairo.LinearGradient(150, 0, 200, 0) + g.add_color_stop_rgb(0, 1,1,0) + g.add_color_stop_rgb(1, 0,0,1) + cr.set_source(g) + cr.rectangle(150, 0, 50, 50) + cr.fill() + +- name: 2d.gradient.interpolate.overlap2 + code: | + var g = ctx.createLinearGradient(0, 0, 100, 0); + var ps = [ 0, 1/10, 1/4, 1/3, 1/2, 3/4, 1 ]; + for (var p = 0; p < ps.length; ++p) + { + g.addColorStop(ps[p], '#0f0'); + for (var i = 0; i < 15; ++i) + g.addColorStop(ps[p], '#f00'); + g.addColorStop(ps[p], '#0f0'); + } + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 1,25 == 0,255,0,255; + @assert pixel 30,25 == 0,255,0,255; + @assert pixel 40,25 == 0,255,0,255; + @assert pixel 60,25 == 0,255,0,255; + @assert pixel 80,25 == 0,255,0,255; + expected: green + +- name: 2d.gradient.empty + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createLinearGradient(0, 0, 0, 50); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 ==~ 0,255,0,255; + expected: green + +- name: 2d.gradient.object.update + code: | + var g = ctx.createLinearGradient(-100, 0, 200, 0); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + g.addColorStop(0.1, '#0f0'); + g.addColorStop(0.9, '#0f0'); + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 ==~ 0,255,0,255; + expected: green + +- name: 2d.gradient.object.compare + code: | + var g1 = ctx.createLinearGradient(0, 0, 100, 0); + var g2 = ctx.createLinearGradient(0, 0, 100, 0); + @assert g1 !== g2; + ctx.fillStyle = g1; + @assert ctx.fillStyle === g1; + +- name: 2d.gradient.object.crosscanvas + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var g = {{ create_canvas }}.getContext('2d').createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 ==~ 0,255,0,255; + expected: green + variants: + _HtmlCanvas: + canvasType: ['HtmlCanvas'] + create_canvas: document.createElement('canvas') + _OffscreenCanvas: + canvasType: ['OffscreenCanvas', 'Worker'] + create_canvas: new OffscreenCanvas(100, 50) + +- name: 2d.gradient.object.current + canvasType: ['HtmlCanvas'] + code: | + canvas.setAttribute('style', 'color: #f00'); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, 'currentColor'); + g.addColorStop(1, 'currentColor'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 ==~ 0,0,0,255; + expected: | + size 100 50 + cr.set_source_rgb(0, 0, 0) + cr.rectangle(0, 0, 100, 50) + cr.fill() + +- name: 2d.gradient.object.invalidoffset + code: | + var g = ctx.createLinearGradient(0, 0, 100, 0); + @assert throws INDEX_SIZE_ERR g.addColorStop(-1, '#000'); + @assert throws INDEX_SIZE_ERR g.addColorStop(2, '#000'); + @assert throws TypeError g.addColorStop(Infinity, '#000'); + @assert throws TypeError g.addColorStop(-Infinity, '#000'); + @assert throws TypeError g.addColorStop(NaN, '#000'); + +- name: 2d.gradient.object.invalidcolor + code: | + var g = ctx.createLinearGradient(0, 0, 100, 0); + @assert throws SYNTAX_ERR g.addColorStop(0, ""); + @assert throws SYNTAX_ERR g.addColorStop(0, 'rgb(NaN%, NaN%, NaN%)'); + @assert throws SYNTAX_ERR g.addColorStop(0, 'null'); + @assert throws SYNTAX_ERR g.addColorStop(0, 'undefined'); + @assert throws SYNTAX_ERR g.addColorStop(0, null); + @assert throws SYNTAX_ERR g.addColorStop(0, undefined); + + var g = ctx.createRadialGradient(0, 0, 0, 100, 0, 0); + @assert throws SYNTAX_ERR g.addColorStop(0, ""); + @assert throws SYNTAX_ERR g.addColorStop(0, 'rgb(NaN%, NaN%, NaN%)'); + @assert throws SYNTAX_ERR g.addColorStop(0, 'null'); + @assert throws SYNTAX_ERR g.addColorStop(0, 'undefined'); + @assert throws SYNTAX_ERR g.addColorStop(0, null); + @assert throws SYNTAX_ERR g.addColorStop(0, undefined); + + +- name: 2d.gradient.linear.nonfinite + desc: createLinearGradient() throws TypeError if arguments are not finite + notes: *bindings + code: | + @nonfinite @assert throws TypeError ctx.createLinearGradient(<0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <1 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>); + +- name: 2d.gradient.linear.transform.1 + desc: Linear gradient coordinates are relative to the coordinate space at the time + of filling + code: | + var g = ctx.createLinearGradient(0, 0, 200, 0); + g.addColorStop(0, '#f00'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.75, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.translate(-50, 0); + ctx.fillRect(50, 0, 100, 50); + @assert pixel 25,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 75,25 == 0,255,0,255; + expected: green + +- name: 2d.gradient.linear.transform.2 + desc: Linear gradient coordinates are relative to the coordinate space at the time + of filling + code: | + ctx.translate(100, 0); + var g = ctx.createLinearGradient(0, 0, 200, 0); + g.addColorStop(0, '#f00'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.75, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.translate(-150, 0); + ctx.fillRect(50, 0, 100, 50); + @assert pixel 25,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 75,25 == 0,255,0,255; + expected: green + +- name: 2d.gradient.linear.transform.3 + desc: Linear gradient transforms do not experience broken caching effects + code: | + var g = ctx.createLinearGradient(0, 0, 200, 0); + g.addColorStop(0, '#f00'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.75, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + ctx.translate(-50, 0); + ctx.fillRect(50, 0, 100, 50); + @assert pixel 25,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 75,25 == 0,255,0,255; + expected: green + +- name: 2d.gradient.radial.negative + desc: createRadialGradient() throws INDEX_SIZE_ERR if either radius is negative + code: | + @assert throws INDEX_SIZE_ERR ctx.createRadialGradient(0, 0, -0.1, 0, 0, 1); + @assert throws INDEX_SIZE_ERR ctx.createRadialGradient(0, 0, 1, 0, 0, -0.1); + @assert throws INDEX_SIZE_ERR ctx.createRadialGradient(0, 0, -0.1, 0, 0, -0.1); + +- name: 2d.gradient.radial.nonfinite + desc: createRadialGradient() throws TypeError if arguments are not finite + notes: *bindings + code: | + @nonfinite @assert throws TypeError ctx.createRadialGradient(<0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <1 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <1 Infinity -Infinity NaN>); + +- name: 2d.gradient.radial.inside1 + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(50, 25, 100, 50, 25, 200); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 50,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 98,25 ==~ 0,255,0,255 +/- 1; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 50,48 ==~ 0,255,0,255 +/- 1; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.gradient.radial.inside2 + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(50, 25, 200, 50, 25, 100); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 50,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 98,25 ==~ 0,255,0,255 +/- 1; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 50,48 ==~ 0,255,0,255 +/- 1; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.gradient.radial.inside3 + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(50, 25, 200, 50, 25, 100); + g.addColorStop(0, '#f00'); + g.addColorStop(0.993, '#f00'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 50,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 98,25 ==~ 0,255,0,255 +/- 1; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 50,48 ==~ 0,255,0,255 +/- 1; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.gradient.radial.outside1 + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(200, 25, 10, 200, 25, 20); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 50,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 98,25 ==~ 0,255,0,255 +/- 1; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 50,48 ==~ 0,255,0,255 +/- 1; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.gradient.radial.outside2 + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(200, 25, 20, 200, 25, 10); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 50,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 98,25 ==~ 0,255,0,255 +/- 1; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 50,48 ==~ 0,255,0,255 +/- 1; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.gradient.radial.outside3 + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(200, 25, 20, 200, 25, 10); + g.addColorStop(0, '#0f0'); + g.addColorStop(0.001, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 50,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 98,25 ==~ 0,255,0,255 +/- 1; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 50,48 ==~ 0,255,0,255 +/- 1; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.gradient.radial.touch1 + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(150, 25, 50, 200, 25, 100); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; @moz-todo + @assert pixel 50,1 == 0,255,0,255; @moz-todo + @assert pixel 98,1 == 0,255,0,255; @moz-todo + @assert pixel 1,25 == 0,255,0,255; @moz-todo + @assert pixel 50,25 == 0,255,0,255; @moz-todo + @assert pixel 98,25 ==~ 0,255,0,255 +/- 1; @moz-todo + @assert pixel 1,48 == 0,255,0,255; @moz-todo + @assert pixel 50,48 ==~ 0,255,0,255 +/- 1; @moz-todo + @assert pixel 98,48 == 0,255,0,255; @moz-todo + expected: green + +- name: 2d.gradient.radial.touch2 + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(-80, 25, 70, 0, 25, 150); + g.addColorStop(0, '#f00'); + g.addColorStop(0.01, '#0f0'); + g.addColorStop(0.99, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 50,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 98,25 ==~ 0,255,0,255 +/- 1; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 50,48 ==~ 0,255,0,255 +/- 1; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.gradient.radial.touch3 + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(120, -15, 25, 140, -30, 50); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; @moz-todo + @assert pixel 50,1 == 0,255,0,255; @moz-todo + @assert pixel 98,1 == 0,255,0,255; @moz-todo + @assert pixel 1,25 == 0,255,0,255; @moz-todo + @assert pixel 50,25 == 0,255,0,255; @moz-todo + @assert pixel 98,25 ==~ 0,255,0,255 +/- 1; @moz-todo + @assert pixel 1,48 == 0,255,0,255; @moz-todo + @assert pixel 50,48 ==~ 0,255,0,255 +/- 1; @moz-todo + @assert pixel 98,48 == 0,255,0,255; @moz-todo + expected: green + +- name: 2d.gradient.radial.equal + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(50, 25, 20, 50, 25, 20); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; @moz-todo + @assert pixel 50,1 == 0,255,0,255; @moz-todo + @assert pixel 98,1 == 0,255,0,255; @moz-todo + @assert pixel 1,25 == 0,255,0,255; @moz-todo + @assert pixel 50,25 == 0,255,0,255; @moz-todo + @assert pixel 98,25 ==~ 0,255,0,255 +/- 1; @moz-todo + @assert pixel 1,48 == 0,255,0,255; @moz-todo + @assert pixel 50,48 ==~ 0,255,0,255 +/- 1; @moz-todo + @assert pixel 98,48 == 0,255,0,255; @moz-todo + expected: green + +- name: 2d.gradient.radial.cone.behind + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(120, 25, 10, 211, 25, 100); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; @moz-todo + @assert pixel 50,1 == 0,255,0,255; @moz-todo + @assert pixel 98,1 == 0,255,0,255; @moz-todo + @assert pixel 1,25 == 0,255,0,255; @moz-todo + @assert pixel 50,25 == 0,255,0,255; @moz-todo + @assert pixel 98,25 ==~ 0,255,0,255 +/- 1; @moz-todo + @assert pixel 1,48 == 0,255,0,255; @moz-todo + @assert pixel 50,48 ==~ 0,255,0,255 +/- 1; @moz-todo + @assert pixel 98,48 == 0,255,0,255; @moz-todo + expected: green + +- name: 2d.gradient.radial.cone.front + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(311, 25, 10, 210, 25, 100); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 50,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 98,25 ==~ 0,255,0,255 +/- 1; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 50,48 ==~ 0,255,0,255 +/- 1; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.gradient.radial.cone.bottom + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(210, 25, 100, 230, 25, 101); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 50,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 98,25 ==~ 0,255,0,255 +/- 1; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 50,48 ==~ 0,255,0,255 +/- 1; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.gradient.radial.cone.top + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(230, 25, 100, 100, 25, 101); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 50,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 98,25 ==~ 0,255,0,255 +/- 1; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 50,48 ==~ 0,255,0,255 +/- 1; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.gradient.radial.cone.beside + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(0, 100, 40, 100, 100, 50); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; @moz-todo + @assert pixel 50,1 == 0,255,0,255; @moz-todo + @assert pixel 98,1 == 0,255,0,255; @moz-todo + @assert pixel 1,25 == 0,255,0,255; @moz-todo + @assert pixel 50,25 == 0,255,0,255; @moz-todo + @assert pixel 98,25 ==~ 0,255,0,255 +/- 1; @moz-todo + @assert pixel 1,48 == 0,255,0,255; @moz-todo + @assert pixel 50,48 ==~ 0,255,0,255 +/- 1; @moz-todo + @assert pixel 98,48 == 0,255,0,255; @moz-todo + expected: green + +- name: 2d.gradient.radial.cone.cylinder + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(210, 25, 100, 230, 25, 100); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 50,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 98,25 ==~ 0,255,0,255 +/- 1; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 50,48 ==~ 0,255,0,255 +/- 1; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.gradient.radial.cone.shape1 + code: | + var tol = 1; // tolerance to avoid antialiasing artifacts + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(30+tol, 40); + ctx.lineTo(110, -20+tol); + ctx.lineTo(110, 100-tol); + ctx.fill(); + + var g = ctx.createRadialGradient(30+10*5/2, 40, 10*3/2, 30+10*15/4, 40, 10*9/4); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 50,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 98,25 ==~ 0,255,0,255 +/- 1; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 50,48 ==~ 0,255,0,255 +/- 1; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.gradient.radial.cone.shape2 + code: | + var tol = 1; // tolerance to avoid antialiasing artifacts + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(30+10*5/2, 40, 10*3/2, 30+10*15/4, 40, 10*9/4); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(30-tol, 40); + ctx.lineTo(110, -20-tol); + ctx.lineTo(110, 100+tol); + ctx.fill(); + + @assert pixel 1,1 == 0,255,0,255; @moz-todo + @assert pixel 50,1 == 0,255,0,255; @moz-todo + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,25 == 0,255,0,255; @moz-todo + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 98,25 ==~ 0,255,0,255 +/- 1; + @assert pixel 1,48 == 0,255,0,255; @moz-todo + @assert pixel 50,48 ==~ 0,255,0,255 +/- 1; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.gradient.radial.transform.1 + desc: Radial gradient coordinates are relative to the coordinate space at the time + of filling + code: | + var g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2); + g.addColorStop(0, '#0f0'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.51, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.translate(50, 25); + ctx.scale(10, 10); + ctx.fillRect(-5, -2.5, 10, 5); + @assert pixel 25,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 75,25 == 0,255,0,255; + expected: green + +- name: 2d.gradient.radial.transform.2 + desc: Radial gradient coordinates are relative to the coordinate space at the time + of filling + code: | + ctx.translate(100, 0); + var g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2); + g.addColorStop(0, '#0f0'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.51, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.translate(-50, 25); + ctx.scale(10, 10); + ctx.fillRect(-5, -2.5, 10, 5); + @assert pixel 25,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 75,25 == 0,255,0,255; + expected: green + +- name: 2d.gradient.radial.transform.3 + desc: Radial gradient transforms do not experience broken caching effects + code: | + var g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2); + g.addColorStop(0, '#0f0'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.51, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + ctx.translate(50, 25); + ctx.scale(10, 10); + ctx.fillRect(-5, -2.5, 10, 5); + @assert pixel 25,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 75,25 == 0,255,0,255; + expected: green + +- name: 2d.gradient.conic.positive.rotation + desc: Conic gradient with positive rotation + code: | + const g = ctx.createConicGradient(3*Math.PI/2, 50, 25); + // It's red in the upper right region and green on the lower left region + g.addColorStop(0, "#f00"); + g.addColorStop(0.25, "#0f0"); + g.addColorStop(0.50, "#0f0"); + g.addColorStop(0.75, "#f00"); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 25,15 ==~ 255,0,0,255 +/- 3; + @assert pixel 75,40 ==~ 0,255,0,255 +/- 3; + expected: green + +- name: 2d.gradient.conic.negative.rotation + desc: Conic gradient with negative rotation + code: | + const g = ctx.createConicGradient(-Math.PI/2, 50, 25); + // It's red in the upper right region and green on the lower left region + g.addColorStop(0, "#f00"); + g.addColorStop(0.25, "#0f0"); + g.addColorStop(0.50, "#0f0"); + g.addColorStop(0.75, "#f00"); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 25,15 ==~ 255,0,0,255 +/- 3; + @assert pixel 75,40 ==~ 0,255,0,255 +/- 3; + expected: green + +- name: 2d.gradient.conic.invalid.inputs + desc: Conic gradient function with invalid inputs + code: | + @nonfinite @assert throws TypeError ctx.createConicGradient(<0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <1 Infinity -Infinity NaN>); + + const g = ctx.createConicGradient(0, 0, 25); + @nonfinite @assert throws TypeError g.addColorStop(, <'#f00'>); + @nonfinite @assert throws SYNTAX_ERR g.addColorStop(<0>, ); + +- name: 2d.pattern.basic.type + images: + - green.png + code: | + {% set root = 'self' if canvas_type == 'worker' else 'window' %} + @assert {{ root }}.CanvasPattern !== undefined; + + {{ root }}.CanvasPattern.prototype.thisImplementsCanvasPattern = true; + + {{ load_image }} + var pattern = ctx.createPattern(img, 'no-repeat'); + @assert pattern.thisImplementsCanvasPattern; + variants: &load-image-variant-definition + _HtmlCanvas: + canvasType: ['HtmlCanvas'] + load_image: var img = document.getElementById('{{ (images or svgimages)[0] }}'); + _OffscreenCanvas: + canvasType: ['OffscreenCanvas', 'Worker'] + test_type: promise + load_image: |- + var response = await fetch('/images/{{ (images or svgimages)[0] }}') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + +- name: 2d.pattern.basic.image + images: + - green.png + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + {{ load_image }} + var pattern = ctx.createPattern(img, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + variants: *load-image-variant-definition + +- name: 2d.pattern.basic.canvas + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + {{ create_canvas2 }} + var ctx2 = canvas2.getContext('2d'); + ctx2.fillStyle = '#0f0'; + ctx2.fillRect(0, 0, 100, 50); + + var pattern = ctx.createPattern(canvas2, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 50,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 98,25 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 50,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + variants: &create-canvas2-variant-definition + _HtmlCanvas: + canvasType: ['HtmlCanvas'] + create_canvas2: |- + var canvas2 = document.createElement('canvas'); + canvas2.width = 100; + canvas2.height = 50; + _OffscreenCanvas: + canvasType: ['OffscreenCanvas', 'Worker'] + create_canvas2: |- + var canvas2 = new OffscreenCanvas(100, 50); + +- name: 2d.pattern.basic.zerocanvas + code: | + canvas.width = 0; + canvas.height = 10; + @assert canvas.width === 0; + @assert canvas.height === 10; + @assert throws INVALID_STATE_ERR ctx.createPattern(canvas, 'repeat'); + + canvas.width = 10; + canvas.height = 0; + @assert canvas.width === 10; + @assert canvas.height === 0; + @assert throws INVALID_STATE_ERR ctx.createPattern(canvas, 'repeat'); + + canvas.width = 0; + canvas.height = 0; + @assert canvas.width === 0; + @assert canvas.height === 0; + @assert throws INVALID_STATE_ERR ctx.createPattern(canvas, 'repeat'); + +- name: 2d.pattern.basic.nocontext + code: | + {{ create_canvas2 }} + var pattern = ctx.createPattern(canvas2, 'no-repeat'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + variants: *create-canvas2-variant-definition + +- name: 2d.pattern.transform.identity + code: | + {{ create_canvas2 }} + var pattern = ctx.createPattern(canvas2, 'no-repeat'); + pattern.setTransform(new DOMMatrix()); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + variants: *create-canvas2-variant-definition + +- name: 2d.pattern.transform.infinity + code: | + {{ create_canvas2 }} + var pattern = ctx.createPattern(canvas2, 'no-repeat'); + pattern.setTransform({a: Infinity}); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + variants: *create-canvas2-variant-definition + +- name: 2d.pattern.transform.invalid + code: | + {{ create_canvas2 }} + var pattern = ctx.createPattern(canvas2, 'no-repeat'); + @assert throws TypeError pattern.setTransform({a: 1, m11: 2}); + variants: *create-canvas2-variant-definition + +- name: 2d.pattern.image.undefined + notes: *bindings + code: | + @assert throws TypeError ctx.createPattern(undefined, 'repeat'); + +- name: 2d.pattern.image.null + notes: *bindings + code: | + @assert throws TypeError ctx.createPattern(null, 'repeat'); + +- name: 2d.pattern.image.string + notes: *bindings + code: | + @assert throws TypeError ctx.createPattern('../images/red.png', 'repeat'); + +- name: 2d.pattern.image.incomplete.nosrc + canvasType: ['HtmlCanvas'] + code: | + var img = new Image(); + @assert ctx.createPattern(img, 'repeat') === null; + +- name: 2d.pattern.image.incomplete.immediate + canvasType: ['HtmlCanvas'] + images: + - red.png + code: | + var img = new Image(); + img.src = '../images/red.png'; + // This triggers the "update the image data" algorithm. + // The image will not go to the "completely available" state + // until a fetch task in the networking task source is processed, + // so the image must not be fully decodable yet: + @assert ctx.createPattern(img, 'repeat') === null; @moz-todo + +- name: 2d.pattern.image.incomplete.reload + canvasType: ['HtmlCanvas'] + images: + - yellow.png + - red.png + code: | + var img = document.getElementById('yellow.png'); + img.src = '../images/red.png'; + // This triggers the "update the image data" algorithm, + // and resets the image to the "unavailable" state. + // The image will not go to the "completely available" state + // until a fetch task in the networking task source is processed, + // so the image must not be fully decodable yet: + @assert ctx.createPattern(img, 'repeat') === null; @moz-todo + +- name: 2d.pattern.image.incomplete.emptysrc + canvasType: ['HtmlCanvas'] + images: + - red.png + mozilla: {throws: !!null ''} + code: | + var img = document.getElementById('red.png'); + img.src = ""; + @assert ctx.createPattern(img, 'repeat') === null; + +- name: 2d.pattern.image.incomplete.removedsrc + canvasType: ['HtmlCanvas'] + images: + - red.png + mozilla: {throws: !!null ''} + code: | + var img = document.getElementById('red.png'); + img.removeAttribute('src'); + @assert ctx.createPattern(img, 'repeat') === null; + +- name: 2d.pattern.image.broken + canvasType: ['HtmlCanvas'] + images: + - broken.png + code: | + var img = document.getElementById('broken.png'); + @assert throws INVALID_STATE_ERR ctx.createPattern(img, 'repeat'); + +- name: 2d.pattern.image.nonexistent + canvasType: ['HtmlCanvas'] + images: + - no-such-image-really.png + code: | + var img = document.getElementById('no-such-image-really.png'); + @assert throws INVALID_STATE_ERR ctx.createPattern(img, 'repeat'); + +- name: 2d.pattern.svgimage.nonexistent + canvasType: ['HtmlCanvas'] + svgimages: + - no-such-image-really.png + code: | + var img = document.getElementById('no-such-image-really.png'); + @assert throws INVALID_STATE_ERR ctx.createPattern(img, 'repeat'); + +- name: 2d.pattern.image.nonexistent-but-loading + canvasType: ['HtmlCanvas'] + code: | + var img = document.createElement("img"); + img.src = "/images/no-such-image-really.png"; + @assert ctx.createPattern(img, 'repeat') === null; + var img = document.createElementNS("http://www.w3.org/2000/svg", "image"); + img.src = "/images/no-such-image-really.png"; + @assert ctx.createPattern(img, 'repeat') === null; + +- name: 2d.pattern.image.nosrc + canvasType: ['HtmlCanvas'] + code: | + var img = document.createElement("img"); + @assert ctx.createPattern(img, 'repeat') === null; + var img = document.createElementNS("http://www.w3.org/2000/svg", "image"); + @assert ctx.createPattern(img, 'repeat') === null; + +- name: 2d.pattern.image.zerowidth + canvasType: ['HtmlCanvas'] + images: + - red-zerowidth.svg + code: | + var img = document.getElementById('red-zerowidth.svg'); + @assert ctx.createPattern(img, 'repeat') === null; + +- name: 2d.pattern.image.zeroheight + canvasType: ['HtmlCanvas'] + images: + - red-zeroheight.svg + code: | + var img = document.getElementById('red-zeroheight.svg'); + @assert ctx.createPattern(img, 'repeat') === null; + +- name: 2d.pattern.svgimage.zerowidth + canvasType: ['HtmlCanvas'] + svgimages: + - red-zerowidth.svg + code: | + var img = document.getElementById('red-zerowidth.svg'); + @assert ctx.createPattern(img, 'repeat') === null; + +- name: 2d.pattern.svgimage.zeroheight + canvasType: ['HtmlCanvas'] + svgimages: + - red-zeroheight.svg + code: | + var img = document.getElementById('red-zeroheight.svg'); + @assert ctx.createPattern(img, 'repeat') === null; + +- name: 2d.pattern.repeat.empty + images: + - green-1x1.png + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + {{ load_image }} + var pattern = ctx.createPattern(img, ""); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 200, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + variants: *load-image-variant-definition + +- name: 2d.pattern.repeat.null + code: | + @assert ctx.createPattern(canvas, null) != null; + +- name: 2d.pattern.repeat.undefined + code: | + @assert throws SYNTAX_ERR ctx.createPattern(canvas, undefined); + +- name: 2d.pattern.repeat.unrecognised + code: | + @assert throws SYNTAX_ERR ctx.createPattern(canvas, "invalid"); + +- name: 2d.pattern.repeat.unrecognisednull + code: | + @assert throws SYNTAX_ERR ctx.createPattern(canvas, "null"); + +- name: 2d.pattern.repeat.case + code: | + @assert throws SYNTAX_ERR ctx.createPattern(canvas, "Repeat"); + +- name: 2d.pattern.repeat.nullsuffix + code: | + @assert throws SYNTAX_ERR ctx.createPattern(canvas, "repeat\0"); + +- name: 2d.pattern.modify.image1 + canvasType: ['HtmlCanvas'] + images: + - green.png + code: | + var img = document.getElementById('green.png'); + var pattern = ctx.createPattern(img, 'no-repeat'); + deferTest(); + img.onload = t.step_func_done(function () + { + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + }); + img.src = '/images/red.png'; + expected: green + +- name: 2d.pattern.modify.image2 + canvasType: ['HtmlCanvas'] + images: + - green.png + code: | + var img = document.getElementById('green.png'); + var pattern = ctx.createPattern(img, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#00f'; + ctx.fillRect(0, 0, 100, 50); + deferTest(); + img.onload = t.step_func_done(function () + { + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + }); + img.src = '/images/red.png'; + expected: green + +- name: 2d.pattern.modify.canvas1 + canvasType: ['HtmlCanvas'] + code: | + {{ create_canvas2 }} + var ctx2 = canvas2.getContext('2d'); + ctx2.fillStyle = '#0f0'; + ctx2.fillRect(0, 0, 100, 50); + + var pattern = ctx.createPattern(canvas2, 'no-repeat'); + + ctx2.fillStyle = '#f00'; + ctx2.fillRect(0, 0, 100, 50); + + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + variants: *create-canvas2-variant-definition + +- name: 2d.pattern.modify.canvas2 + code: | + {{ create_canvas2 }} + var ctx2 = canvas2.getContext('2d'); + ctx2.fillStyle = '#0f0'; + ctx2.fillRect(0, 0, 100, 50); + + var pattern = ctx.createPattern(canvas2, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx2.fillStyle = '#f00'; + ctx2.fillRect(0, 0, 100, 50); + + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + variants: *create-canvas2-variant-definition + +- name: 2d.pattern.crosscanvas + images: + - green.png + code: | + {{ load_image }} + + var pattern = {{ create_canvas }}.getContext('2d').createPattern(img, 'no-repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + variants: + _HtmlCanvas: + canvasType: ['HtmlCanvas'] + load_image: var img = document.getElementById('{{ images[0] }}'); + create_canvas: document.createElement('canvas') + _OffscreenCanvas: + canvasType: ['OffscreenCanvas', 'Worker'] + test_type: promise + load_image: |- + var response = await fetch('/images/{{ images[0] }}') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + create_canvas: new OffscreenCanvas(100, 50) + +- name: 2d.pattern.paint.norepeat.basic + images: + - green.png + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + {{ load_image }} + var pattern = ctx.createPattern(img, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + variants: *load-image-variant-definition + +- name: 2d.pattern.paint.norepeat.outside + images: + - red.png + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + {{ load_image }} + var pattern = ctx.createPattern(img, 'no-repeat'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + ctx.fillRect(-100, 0, 100, 50); + ctx.fillRect(0, 50, 100, 50); + ctx.fillRect(100, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + variants: *load-image-variant-definition + +- name: 2d.pattern.paint.norepeat.coord1 + images: + - green.png + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + + {{ load_image }} + var pattern = ctx.createPattern(img, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.translate(50, 0); + ctx.fillRect(-50, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + variants: *load-image-variant-definition + +- name: 2d.pattern.paint.norepeat.coord2 + images: + - green.png + code: | + {{ load_image }} + var pattern = ctx.createPattern(img, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 50, 50); + + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + + ctx.fillStyle = pattern; + ctx.translate(50, 0); + ctx.fillRect(-50, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + variants: *load-image-variant-definition + +- name: 2d.pattern.paint.norepeat.coord3 + images: + - red.png + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + {{ load_image }} + var pattern = ctx.createPattern(img, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.translate(50, 25); + ctx.fillRect(-50, -25, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 25); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + variants: *load-image-variant-definition + +- name: 2d.pattern.paint.repeat.basic + images: + - green-16x16.png + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + {{ load_image }} + var pattern = ctx.createPattern(img, 'repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + variants: *load-image-variant-definition + +- name: 2d.pattern.paint.repeat.outside + images: + - green-16x16.png + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + {{ load_image }} + var pattern = ctx.createPattern(img, 'repeat'); + ctx.fillStyle = pattern; + ctx.translate(50, 25); + ctx.fillRect(-50, -25, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + variants: *load-image-variant-definition + +- name: 2d.pattern.paint.repeat.coord1 + images: + - rgrg-256x256.png + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + {{ load_image }} + var pattern = ctx.createPattern(img, 'repeat'); + ctx.fillStyle = pattern; + ctx.translate(-128, -78); + ctx.fillRect(128, 78, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + variants: *load-image-variant-definition + +- name: 2d.pattern.paint.repeat.coord2 + images: + - ggrr-256x256.png + code: | + {{ load_image }} + var pattern = ctx.createPattern(img, 'repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + variants: *load-image-variant-definition + +- name: 2d.pattern.paint.repeat.coord3 + images: + - rgrg-256x256.png + code: | + {{ load_image }} + var pattern = ctx.createPattern(img, 'repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + ctx.translate(-128, -78); + ctx.fillRect(128, 78, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + variants: *load-image-variant-definition + +- name: 2d.pattern.paint.repeatx.basic + images: + - green-16x16.png + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 16); + + {{ load_image }} + var pattern = ctx.createPattern(img, 'repeat-x'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + variants: *load-image-variant-definition + +- name: 2d.pattern.paint.repeatx.outside + images: + - red-16x16.png + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + {{ load_image }} + var pattern = ctx.createPattern(img, 'repeat-x'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 16); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + variants: *load-image-variant-definition + +- name: 2d.pattern.paint.repeatx.coord1 + images: + - red-16x16.png + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + {{ load_image }} + var pattern = ctx.createPattern(img, 'repeat-x'); + ctx.fillStyle = pattern; + ctx.translate(0, 16); + ctx.fillRect(0, -16, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 16); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,25 == 0,255,0,255; + @assert pixel 98,25 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + variants: *load-image-variant-definition + +- name: 2d.pattern.paint.repeaty.basic + images: + - green-16x16.png + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 16, 50); + + {{ load_image }} + var pattern = ctx.createPattern(img, 'repeat-y'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + variants: *load-image-variant-definition + +- name: 2d.pattern.paint.repeaty.outside + images: + - red-16x16.png + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + {{ load_image }} + var pattern = ctx.createPattern(img, 'repeat-y'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 16, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + variants: *load-image-variant-definition + +- name: 2d.pattern.paint.repeaty.coord1 + images: + - red-16x16.png + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + {{ load_image }} + var pattern = ctx.createPattern(img, 'repeat-y'); + ctx.fillStyle = pattern; + ctx.translate(48, 0); + ctx.fillRect(-48, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 16, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 50,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 50,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + variants: *load-image-variant-definition + +- name: 2d.pattern.paint.orientation.image + desc: Image patterns do not get flipped when painted + images: + - rrgg-256x256.png + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + {{ load_image }} + var pattern = ctx.createPattern(img, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.save(); + ctx.translate(0, -103); + ctx.fillRect(0, 103, 100, 50); + ctx.restore(); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 25); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + variants: *load-image-variant-definition + +- name: 2d.pattern.paint.orientation.canvas + desc: Canvas patterns do not get flipped when painted + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + {{ create_canvas2 }} + var ctx2 = canvas2.getContext('2d'); + ctx2.fillStyle = '#f00'; + ctx2.fillRect(0, 0, 100, 25); + ctx2.fillStyle = '#0f0'; + ctx2.fillRect(0, 25, 100, 25); + + var pattern = ctx.createPattern(canvas2, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 25); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + variants: *create-canvas2-variant-definition + +- name: 2d.pattern.animated.gif + desc: createPattern() of an animated GIF draws the first frame + canvasType: ['HtmlCanvas'] + images: + - anim-gr.gif + code: | + deferTest(); + step_timeout(function () { + var pattern = ctx.createPattern(document.getElementById('anim-gr.gif'), 'repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 50, 50); + step_timeout(t.step_func_done(function () { + ctx.fillRect(50, 0, 50, 50); + @assert pixel 25,25 ==~ 0,255,0,255; + @assert pixel 75,25 ==~ 0,255,0,255; + }), 250); + }, 250); + expected: green + +- name: 2d.fillStyle.CSSRGB + desc: CSSRGB works as color input + canvasType: ['HtmlCanvas', 'OffscreenCanvas'] + code: | + ctx.fillStyle = new CSSRGB(1, 0, 1); + @assert ctx.fillStyle === '#ff00ff'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 255,0,255,255; + + const color = new CSSRGB(0, CSS.percent(50), 0); + ctx.fillStyle = color; + @assert ctx.fillStyle === '#008000'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,128,0,255; + color.g = 0; + ctx.fillStyle = color; + @assert ctx.fillStyle === '#000000'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,0,0,255; + + color.alpha = 0; + ctx.fillStyle = color; + @assert ctx.fillStyle === 'rgba(0, 0, 0, 0)'; + ctx.reset(); + color.alpha = 0.5; + ctx.fillStyle = color; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,0,0,128; + + ctx.fillStyle = new CSSHSL(CSS.deg(0), 1, 1).toRGB(); + @assert ctx.fillStyle === '#ffffff'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 255,255,255,255; + + color.alpha = 1; + color.g = 1; + ctx.fillStyle = color; + ctx.fillRect(0, 0, 100, 50); + expected: green + +- name: 2d.fillStyle.CSSHSL + desc: CSSHSL works as color input + canvasType: ['HtmlCanvas', 'OffscreenCanvas'] + code: | + ctx.fillStyle = new CSSHSL(CSS.deg(180), 0.5, 0.5); + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 ==~ 64,191,191,255 +/- 3; + + const color = new CSSHSL(CSS.deg(180), 1, 1); + ctx.fillStyle = color; + @assert ctx.fillStyle === '#ffffff'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 255,255,255,255; + color.l = 0.5; + ctx.fillStyle = color; + @assert ctx.fillStyle === '#00ffff'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,255,255; + + ctx.fillStyle = new CSSRGB(1, 0, 1).toHSL(); + @assert ctx.fillStyle === '#ff00ff'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 255,0,255,255; + + color.h = CSS.deg(120); + color.s = 1; + color.l = 0.5; + ctx.fillStyle = color; + ctx.fillRect(0, 0, 100, 50); + expected: green + +- name: 2d.fillStyle.colormix + desc: color-mix works as color input + canvasType: ['HtmlCanvas', 'OffscreenCanvas', 'Worker'] + code: | + ctx.fillStyle = "color-mix(in srgb, red, blue)"; + @assert ctx.fillStyle === 'color(srgb 0.5 0 0.5)'; + ctx.fillStyle = "color-mix(in srgb, red, color(srgb 1 0 0))"; + @assert ctx.fillStyle === 'color(srgb 1 0 0)'; + +- name: 2d.fillStyle.colormix.currentcolor + desc: color-mix works as color input with currentcolor + canvasType: ['HtmlCanvas'] + code: | + canvas.setAttribute('style', 'color: magenta'); + ctx.fillStyle = "color-mix(in srgb, black, currentcolor)"; + @assert ctx.fillStyle === 'color(srgb 0.5 0 0.5)'; + ctx.strokeStyle = "color-mix(in srgb, black, currentcolor)"; + @assert ctx.strokeStyle === 'color(srgb 0.5 0 0.5)'; + +- name: 2d.strokeStyle.colormix + desc: color-mix works as color input + canvasType: ['HtmlCanvas', 'OffscreenCanvas'] + code: | + ctx.strokeStyle = "color-mix(in srgb, red, blue)"; + @assert ctx.strokeStyle === 'color(srgb 0.5 0 0.5)'; + ctx.strokeStyle = "color-mix(in srgb, red, color(srgb 1 0 0))"; + @assert ctx.strokeStyle === 'color(srgb 1 0 0)'; diff --git a/testing/web-platform/tests/html/canvas/tools/yaml-new/filters.yaml b/testing/web-platform/tests/html/canvas/tools/yaml-new/filters.yaml new file mode 100644 index 0000000000..01c83a33e2 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/yaml-new/filters.yaml @@ -0,0 +1,680 @@ +- name: 2d.filter.value + desc: test if ctx.filter works correctly + code: | + @assert ctx.filter == 'none'; + ctx.filter = 'blur(5px)'; + @assert ctx.filter == 'blur(5px)'; + ctx.save(); + ctx.filter = 'none'; + @assert ctx.filter == 'none'; + ctx.restore(); + @assert ctx.filter == 'blur(5px)'; + + ctx.filter = 'blur(10)'; + @assert ctx.filter == 'blur(5px)'; + ctx.filter = 'blur 10px'; + @assert ctx.filter == 'blur(5px)'; + + ctx.filter = 'inherit'; + @assert ctx.filter == 'blur(5px)'; + ctx.filter = 'initial'; + @assert ctx.filter == 'blur(5px)'; + ctx.filter = 'unset'; + @assert ctx.filter == 'blur(5px)'; + + ctx.filter = ''; + @assert ctx.filter == 'blur(5px)'; + ctx.filter = null; + @assert ctx.filter == 'blur(5px)'; + ctx.filter = undefined; + @assert ctx.filter == 'blur(5px)'; + + ctx.filter = 'blur( 5px)'; + assert_equals(ctx.filter, 'blur( 5px)'); + +- name: 2d.filter.canvasFilterObject.tentative + desc: Test CanvasFilter() object + canvasType: + ['HTMLCanvas'] + code: | + @assert ctx.filter == 'none'; + ctx.filter = 'blur(5px)'; + @assert ctx.filter == 'blur(5px)'; + ctx.filter = new CanvasFilter({name: 'gaussianBlur', stdDeviation: 5}); + @assert ctx.filter.toString() == '[object CanvasFilter]'; + ctx.filter = new CanvasFilter({name: 'gaussianBlur', stdDeviation: [1, 2]}); + @assert ctx.filter.toString() == '[object CanvasFilter]'; + ctx.filter = new CanvasFilter([ + {name: 'gaussianBlur', stdDeviation: 5}, + {name: 'gaussianBlur', stdDeviation: 10} + ]); + @assert ctx.filter.toString() == '[object CanvasFilter]'; + var canvas2 = document.createElement('canvas'); + var ctx2 = canvas2.getContext('2d'); + ctx2.filter = ctx.filter; + @assert ctx.filter.toString() == '[object CanvasFilter]'; + ctx.filter = 'blur(5px)'; + @assert ctx.filter == 'blur(5px)'; + ctx.filter = 'none'; + @assert ctx.filter == 'none'; + ctx.filter = new CanvasFilter({name: 'gaussianBlur', stdDeviation: 5}); + ctx.filter = 'this string is not a filter and should do nothing'; + @assert ctx.filter.toString() == '[object CanvasFilter]'; + +- name: 2d.filter.canvasFilterObject.tentative + desc: Test CanvasFilter() object + canvasType: ['OffscreenCanvas', 'Worker'] + code: | + @assert ctx.filter == 'none'; + ctx.filter = 'blur(5px)'; + @assert ctx.filter == 'blur(5px)'; + ctx.filter = new CanvasFilter({name: 'gaussianBlur', stdDeviation: 5}); + @assert ctx.filter.toString() == '[object CanvasFilter]'; + ctx.filter = new CanvasFilter({name: 'gaussianBlur', stdDeviation: [1, 2]}); + @assert ctx.filter.toString() == '[object CanvasFilter]'; + ctx.filter = new CanvasFilter([ + {name: 'gaussianBlur', stdDeviation: 5}, + {name: 'gaussianBlur', stdDeviation: 10} + ]); + @assert ctx.filter.toString() == '[object CanvasFilter]'; + var canvas2 = new OffscreenCanvas(100, 50); + var ctx2 = canvas2.getContext('2d'); + ctx2.filter = ctx.filter; + @assert ctx.filter.toString() == '[object CanvasFilter]'; + ctx.filter = 'blur(5px)'; + @assert ctx.filter == 'blur(5px)'; + ctx.filter = 'none'; + @assert ctx.filter == 'none'; + ctx.filter = new CanvasFilter({name: 'gaussianBlur', stdDeviation: 5}); + ctx.filter = 'this string is not a filter and should do nothing'; + @assert ctx.filter.toString() == '[object CanvasFilter]'; + +- name: 2d.filter.canvasFilterObject.blur.exceptions.tentative + desc: Test exceptions on CanvasFilter() blur.object + code: | + @assert throws TypeError ctx.filter = new CanvasFilter({name: 'gaussianBlur'}); + @assert throws TypeError ctx.filter = new CanvasFilter({name: 'gaussianBlur', stdDeviation: undefined}); + @assert throws TypeError ctx.filter = new CanvasFilter({name: 'gaussianBlur', stdDeviation: 'foo'}); + @assert throws TypeError ctx.filter = new CanvasFilter({name: 'gaussianBlur', stdDeviation: [1,2,3]}); + @assert throws TypeError ctx.filter = new CanvasFilter({name: 'gaussianBlur', stdDeviation: NaN}); + @assert throws TypeError ctx.filter = new CanvasFilter({name: 'gaussianBlur', stdDeviation: {}}); + +- name: 2d.filter.canvasFilterObject.colorMatrix.tentative + desc: Test the functionality of ColorMatrix filters in CanvasFilter objects + code: | + @assert throws TypeError new CanvasFilter({name: 'colorMatrix', values: undefined}); + @assert throws TypeError new CanvasFilter({name: 'colorMatrix', values: 'foo'}); + @assert throws TypeError new CanvasFilter({name: 'colorMatrix', values: null}); + @assert throws TypeError new CanvasFilter({name: 'colorMatrix', values: [1, 2, 3]}); + @assert throws TypeError new CanvasFilter({name: 'colorMatrix', values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 'a']}); + @assert throws TypeError new CanvasFilter({name: 'colorMatrix', values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, Infinity]}); + ctx.fillStyle = '#f00'; + ctx.filter = new CanvasFilter({name: 'colorMatrix', type: 'hueRotate', values: 0}); + ctx.fillRect(0, 0, 100, 50); + @assert pixel 10,10 ==~ 255,0,0,255; + ctx.filter = new CanvasFilter({name: 'colorMatrix', type: 'hueRotate', values: 90}); + ctx.fillRect(0, 0, 100, 50); + @assert pixel 10,10 ==~ 0,91,0,255; + ctx.filter = new CanvasFilter({name: 'colorMatrix', type: 'hueRotate', values: 180}); + ctx.fillRect(0, 0, 100, 50); + @assert pixel 10,10 ==~ 0,109,109,255; + ctx.filter = new CanvasFilter({name: 'colorMatrix', type: 'hueRotate', values: 270}); + ctx.fillRect(0, 0, 100, 50); + @assert pixel 10,10 ==~ 109,18,255,255; + ctx.filter = new CanvasFilter({name: 'colorMatrix', type: 'saturate', values: 0.5}); + ctx.fillRect(0, 0, 100, 50); + @assert pixel 10,10 ==~ 155,27,27,255; + ctx.clearRect(0, 0, 100, 50); + ctx.filter = new CanvasFilter({name: 'colorMatrix', type: 'luminanceToAlpha'}); + ctx.fillRect(0, 0, 100, 50); + @assert pixel 10,10 ==~ 0,0,0,54; + ctx.filter = new CanvasFilter({name: 'colorMatrix', values: [ + 0, 0, 0, 0, 0, + 1, 1, 1, 1, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 1, 0 + ]}); + ctx.fillRect(0, 0, 50, 25); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 25); + ctx.fillStyle = '#00f'; + ctx.fillRect(0, 25, 50, 25); + ctx.fillStyle = '#fff'; + ctx.fillRect(50, 25, 50, 25); + @assert pixel 10,10 ==~ 0,255,0,255; + @assert pixel 60,10 ==~ 0,255,0,255; + @assert pixel 10,30 ==~ 0,255,0,255; + @assert pixel 60,30 ==~ 0,255,0,255; + +- name: 2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative + desc: Test exceptions on CanvasFilter() convolveMatrix + code: | + @assert throws TypeError new CanvasFilter({name: 'convolveMatrix'}); + @assert throws TypeError new CanvasFilter({name: 'convolveMatrix', divisor: 2}); + @assert throws TypeError new CanvasFilter({name: 'convolveMatrix', kernelMatrix: null}); + @assert throws TypeError new CanvasFilter({name: 'convolveMatrix', kernelMatrix: 1}); + @assert throws TypeError new CanvasFilter({name: 'convolveMatrix', kernelMatrix: [[1, 0], [0]]}); + @assert throws TypeError new CanvasFilter({name: 'convolveMatrix', kernelMatrix: [[1, 'a'], [0]]}); + @assert throws TypeError new CanvasFilter({name: 'convolveMatrix', kernelMatrix: [[1, 0], 0]}); + @assert throws TypeError new CanvasFilter({name: 'convolveMatrix', kernelMatrix: [[1, 0], [0, Infinity]]}); + @assert throws TypeError new CanvasFilter({name: 'convolveMatrix', kernelMatrix: []}); + @assert throws TypeError new CanvasFilter({name: 'convolveMatrix', kernelMatrix: [1]}); + @assert throws TypeError new CanvasFilter({name: 'convolveMatrix', kernelMatrix: [1, 2, 3, 4]}); + @assert throws TypeError new CanvasFilter({name: 'convolveMatrix', kernelMatrix: [[], []]}); + @assert throws TypeError new CanvasFilter({name: 'convolveMatrix', kernelMatrix: [[1, 2], []]}); + @assert throws TypeError new CanvasFilter({name: 'convolveMatrix', kernelMatrix: [[], [1, 2]]}); + // This should not throw an error + ctx.filter = new CanvasFilter({name: 'convolveMatrix', kernelMatrix: [[]]}); + ctx.filter = new CanvasFilter({name: 'convolveMatrix', kernelMatrix: [[1]]}); + +- name: 2d.filter.canvasFilterObject.componentTransfer.linear.tentative + desc: Test pixels on CanvasFilter() componentTransfer with linear type + code: | + // From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement + function getColor(inputColor, slopes, intercepts) { + return [ + Math.max(0, Math.min(1, inputColor[0]/255 * slopes[0] + intercepts[0])) * 255, + Math.max(0, Math.min(1, inputColor[1]/255 * slopes[1] + intercepts[1])) * 255, + Math.max(0, Math.min(1, inputColor[2]/255 * slopes[2] + intercepts[2])) * 255, + ]; + } + + const slopes = [0.5, 1.2, -0.2]; + const intercepts = [0.25, 0, 0.5]; + ctx.filter = new CanvasFilter({name: 'componentTransfer', + funcR: {type: 'linear', slope: slopes[0], intercept: intercepts[0]}, + funcG: {type: 'linear', slope: slopes[1], intercept: intercepts[1]}, + funcB: {type: 'linear', slope: slopes[2], intercept: intercepts[2]}, + }); + + const inputColors = [ + [255, 255, 255], + [0, 0, 0], + [127, 0, 34], + [252, 186, 3], + [50, 68, 87], + ]; + + for (const color of inputColors) { + let outputColor = getColor(color, slopes, intercepts); + ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`; + ctx.fillRect(0, 0, 10, 10); + _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2); + } + +- name: 2d.filter.canvasFilterObject.componentTransfer.identity.tentative + desc: Test pixels on CanvasFilter() componentTransfer with identity type + code: | + ctx.filter = new CanvasFilter({name: 'componentTransfer', + funcR: {type: 'identity'}, + funcG: {type: 'identity'}, + funcB: {type: 'identity'}, + }); + + const inputColors = [ + [255, 255, 255], + [0, 0, 0], + [127, 0, 34], + [252, 186, 3], + [50, 68, 87], + ]; + + for (const color of inputColors) { + ctx.fillStyle = `rgba(${color[0]}, ${color[1]}, ${color[2]}, 1)`, + ctx.fillRect(0, 0, 10, 10); + _assertPixel(canvas, 5, 5, color[0],color[1],color[2],255); + } + +- name: 2d.filter.canvasFilterObject.componentTransfer.gamma.tentative + desc: Test pixels on CanvasFilter() componentTransfer with gamma type + code: | + // From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement + function getColor(inputColor, amplitude, exponent, offset) { + return [ + Math.max(0, Math.min(1, Math.pow(inputColor[0]/255, exponent[0]) * amplitude[0] + offset[0])) * 255, + Math.max(0, Math.min(1, Math.pow(inputColor[1]/255, exponent[1]) * amplitude[1] + offset[1])) * 255, + Math.max(0, Math.min(1, Math.pow(inputColor[2]/255, exponent[2]) * amplitude[2] + offset[2])) * 255, + ]; + } + + const amplitudes = [2, 1.1, 0.5]; + const exponents = [5, 3, 1]; + const offsets = [0.25, 0, 0.5]; + ctx.filter = new CanvasFilter({name: 'componentTransfer', + funcR: {type: 'gamma', amplitude: amplitudes[0], exponent: exponents[0], offset: offsets[0]}, + funcG: {type: 'gamma', amplitude: amplitudes[1], exponent: exponents[1], offset: offsets[1]}, + funcB: {type: 'gamma', amplitude: amplitudes[2], exponent: exponents[2], offset: offsets[2]}, + }); + + const inputColors = [ + [255, 255, 255], + [0, 0, 0], + [127, 0, 34], + [252, 186, 3], + [50, 68, 87], + ]; + + for (const color of inputColors) { + let outputColor = getColor(color, amplitudes, exponents, offsets); + ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`; + ctx.fillRect(0, 0, 10, 10); + _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2); + } + +- name: 2d.filter.canvasFilterObject.componentTransfer.table.tentative + desc: Test pixels on CanvasFilter() componentTransfer with table type + code: | + // From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement + function getTransformedValue(C, V) { + // Get the right interval + const n = V.length - 1; + const k = C == 1 ? n - 1 : Math.floor(C * n); + return V[k] + (C - k/n) * n * (V[k + 1] - V[k]); + } + + function getColor(inputColor, tableValues) { + const result = [0, 0, 0]; + for (const i in inputColor) { + const C = inputColor[i]/255; + const Cprime = getTransformedValue(C, tableValues[i]); + result[i] = Math.max(0, Math.min(1, Cprime)) * 255; + } + return result; + } + + tableValuesR = [0, 0, 1, 1]; + tableValuesG = [2, 0, 0.5, 3]; + tableValuesB = [1, -1, 5, 0]; + ctx.filter = new CanvasFilter({name: 'componentTransfer', + funcR: {type: 'table', tableValues: tableValuesR}, + funcG: {type: 'table', tableValues: tableValuesG}, + funcB: {type: 'table', tableValues: tableValuesB}, + }); + + const inputColors = [ + [255, 255, 255], + [0, 0, 0], + [127, 0, 34], + [252, 186, 3], + [50, 68, 87], + ]; + + for (const color of inputColors) { + let outputColor = getColor(color, [tableValuesR, tableValuesG, tableValuesB]); + ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`; + ctx.fillRect(0, 0, 10, 10); + _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2); + } + +- name: 2d.filter.canvasFilterObject.componentTransfer.discrete.tentative + desc: Test pixels on CanvasFilter() componentTransfer with discrete type + code: | + // From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement + function getTransformedValue(C, V) { + // Get the right interval + const n = V.length; + const k = C == 1 ? n - 1 : Math.floor(C * n); + return V[k]; + } + + function getColor(inputColor, tableValues) { + const result = [0, 0, 0]; + for (const i in inputColor) { + const C = inputColor[i]/255; + const Cprime = getTransformedValue(C, tableValues[i]); + result[i] = Math.max(0, Math.min(1, Cprime)) * 255; + } + return result; + } + + tableValuesR = [0, 0, 1, 1]; + tableValuesG = [2, 0, 0.5, 3]; + tableValuesB = [1, -1, 5, 0]; + ctx.filter = new CanvasFilter({name: 'componentTransfer', + funcR: {type: 'discrete', tableValues: tableValuesR}, + funcG: {type: 'discrete', tableValues: tableValuesG}, + funcB: {type: 'discrete', tableValues: tableValuesB}, + }); + + const inputColors = [ + [255, 255, 255], + [0, 0, 0], + [127, 0, 34], + [252, 186, 3], + [50, 68, 87], + ]; + + for (const color of inputColors) { + let outputColor = getColor(color, [tableValuesR, tableValuesG, tableValuesB]); + ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`; + ctx.fillRect(0, 0, 10, 10); + _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2); + } + +- name: 2d.filter.canvasFilterObject.gaussianBlur.tentative + desc: Test CanvasFilter() with gaussianBlur. + size: [100, 100] + code: | + ctx.fillStyle = 'teal'; + ctx.filter = new CanvasFilter({ + name: 'gaussianBlur', + stdDeviation: [{{ blur_x }}, {{blur_y}}], + }); + ctx.fillRect(25, 25, 50, 50); + html_reference: | + + + + + + + variants: + x-only: + blur_x: 4 + blur_y: 0 + mostly-x: + blur_x: 4 + blur_y: 1 + isotropic: + blur_x: 4 + blur_y: 4 + mostly-y: + blur_x: 1 + blur_y: 4 + y-only: + blur_x: 0 + blur_y: 4 + +- name: 2d.filter.canvasFilterObject.dropShadow.tentative + desc: Test CanvasFilter() dropShadow object. + size: [520, 420] + code: | + ctx.fillStyle = 'teal'; + ctx.fillRect(0, 0, {{ size[0] }}, 50); + ctx.fillRect(0, 100, {{ size[0] }}, 50); + ctx.fillRect(0, 200, {{ size[0] }}, 50); + ctx.fillRect(0, 300, {{ size[0] }}, 50); + + ctx.fillStyle = 'crimson'; + + // Parameter defaults. + ctx.filter = new CanvasFilter({name: 'dropShadow'}); + ctx.fillRect(10, 10, 80, 80); + + // All parameters specified. + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: 9, dy: 12, stdDeviation: 5, + floodColor: 'purple', floodOpacity: 0.7}); + ctx.fillRect(110, 10, 80, 80); + + // Named color. + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: 9, dy: 12, stdDeviation: 3, + floodColor: 'purple'}); + ctx.fillRect(10, 110, 80, 80); + + // System color. + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: 9, dy: 12, stdDeviation: 3, + floodColor: 'LinkText'}); + ctx.fillRect(110, 110, 80, 80); + + // Numerical color. + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: 9, dy: 12, stdDeviation: 3, + floodColor: 'rgba(20, 50, 130, 1)'}); + ctx.fillRect(210, 110, 80, 80); + + // Transparent floodColor. + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: 9, dy: 12, stdDeviation: 3, + floodColor: 'rgba(20, 50, 130, 0.7)'}); + ctx.fillRect(310, 110, 80, 80); + + // Transparent floodColor and floodOpacity. + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: 9, dy: 12, stdDeviation: 3, + floodColor: 'rgba(20, 50, 130, 0.7)', floodOpacity: 0.7}); + ctx.fillRect(410, 110, 80, 80); + + // No blur. + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: 9, dy: 12, stdDeviation: 0, + floodColor: 'purple'}); + ctx.fillRect(10, 210, 80, 80); + + // Single float blur. + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: 9, dy: 12, stdDeviation: 5, + floodColor: 'purple'}); + ctx.fillRect(110, 210, 80, 80); + + // Single negative float blur. + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: 9, dy: 12, stdDeviation: -5, + floodColor: 'purple'}); + ctx.fillRect(210, 210, 80, 80); + + // Two floats (X&Y) blur. + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: 9, dy: 12, stdDeviation: [3, 5], + floodColor: 'purple'}); + ctx.fillRect(310, 210, 80, 80); + + // Two negative floats (X&Y) blur. + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: 9, dy: 12, stdDeviation: [-3, -5], + floodColor: 'purple'}); + ctx.fillRect(410, 210, 80, 80); + + // Degenerate parameter values. + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: [-5], dy: [], stdDeviation: null, + floodColor: 'purple', floodOpacity: [2]}); + ctx.fillRect(10, 310, 80, 80); + + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: null, dy: '5', stdDeviation: [[-5], ['3']], + floodColor: 'purple', floodOpacity: '0.8'}); + ctx.fillRect(110, 310, 80, 80); + + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: true, dy: ['10'], stdDeviation: false, + floodColor: 'purple', floodOpacity: ['0.4']}); + ctx.fillRect(210, 310, 80, 80); + html_reference: | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +- name: 2d.filter.canvasFilterObject.dropShadow.exceptions.tentative + desc: Test exceptions on CanvasFilter() dropShadow object + code: | + @unroll @assert new CanvasFilter({\- + name: 'dropShadow', \- + : \- + <10 | -1 | 0.5 | null | true | false | [] | [20] | '30'>}); + @unroll @assert new CanvasFilter({\- + name: 'dropShadow', \- + : \- + <10 | -1 | 0.5 | null | true | false | [] | [20] | '30' | \- + [10, -1] | [0.5, null] | [true, false] | [[], [20]] | \- + ['30', ['40']]>}); + @unroll @assert new CanvasFilter({\- + name: 'dropShadow', \- + : \- + <'red' | 'canvas' | 'rgba(4, -3, 0.5, 1)' | '#aabbccdd' | '#abcd'>}); + + @unroll @assert throws TypeError new CanvasFilter({\- + name: 'dropShadow', \- + : \- + }); + @unroll @assert throws TypeError new CanvasFilter({\- + name: 'dropShadow', \- + : \- + }); + @unroll @assert throws TypeError new CanvasFilter({\- + name: 'dropShadow', \- + : \- + <'test' | 'rgba(NaN, 3, 2, 1)' | 10 | undefined | null | NaN>}); + +- name: 2d.filter.canvasFilterObject.turbulence.inputTypes.tentative + desc: Test exceptions on CanvasFilter() turbulence object + code: | + const errorTestCases = [ + {baseFrequency: {}}, + {baseFrequency: -1}, + {baseFrequency: [0, -1]}, + {baseFrequency: NaN}, + {baseFrequency: Infinity}, + {baseFrequency: undefined}, + {baseFrequency: -Infinity}, + {baseFrequency: 'test'}, + + {numOctaves: {}}, + {numOctaves: -1}, + {numOctaves: NaN}, + {numOctaves: Infinity}, + {numOctaves: undefined}, + {numOctaves: -Infinity}, + {numOctaves: [1, 1]}, + {numOctaves: 'test'}, + + {seed: {}}, + {seed: NaN}, + {seed: Infinity}, + {seed: undefined}, + {seed: -Infinity}, + {seed: [1, 1]}, + {seed: 'test'}, + + {stitchTiles: {}}, + {stitchTiles: NaN}, + {stitchTiles: Infinity}, + {stitchTiles: undefined}, + {stitchTiles: -Infinity}, + {stitchTiles: [1, 1]}, + {stitchTiles: 'test'}, + {stitchTiles: null}, + {stitchTiles: []}, + {stitchTiles: [10]}, + {stitchTiles: 30}, + {stitchTiles: false}, + {stitchTiles: true}, + {stitchTiles: '10'}, + {stitchTiles: -1}, + + {type: {}}, + {type: NaN}, + {type: Infinity}, + {type: undefined}, + {type: -Infinity}, + {type: [1, 1]}, + {type: 'test'}, + {type: null}, + {type: []}, + {type: [10]}, + {type: 30}, + {type: false}, + {type: true}, + {type: '10'}, + {type: -1}, + ] + + // null and [] = 0 when parsed as number + const workingTestCases = [ + {baseFrequency: null}, + {baseFrequency: []}, + {baseFrequency: [10]}, + {baseFrequency: [10, 3]}, + {baseFrequency: 30}, + {baseFrequency: false}, + {baseFrequency: true}, + {baseFrequency: '10'}, + + {numOctaves: null}, + {numOctaves: []}, + {numOctaves: [10]}, + {numOctaves: 30}, + {numOctaves: false}, + {numOctaves: true}, + {numOctaves: '10'}, + + {seed: null}, + {seed: []}, + {seed: [10]}, + {seed: 30}, + {seed: false}, + {seed: true}, + {seed: '10'}, + {seed: -1}, + + {stitchTiles: 'stitch'}, + {stitchTiles: 'noStitch'}, + + {type: 'fractalNoise'}, + {type: 'turbulence'}, + ] + + for (testCase of errorTestCases) { + const filterOptions = {...{name: 'turbulence'}, ...testCase}; + @assert throws TypeError new CanvasFilter(filterOptions); + } + + for (testCase of workingTestCases) { + const filterOptions = {...{name: 'turbulence'}, ...testCase}; + @assert new CanvasFilter(filterOptions) != null; + } diff --git a/testing/web-platform/tests/html/canvas/tools/yaml-new/layers.yaml b/testing/web-platform/tests/html/canvas/tools/yaml-new/layers.yaml new file mode 100644 index 0000000000..a44cb2ea2c --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/yaml-new/layers.yaml @@ -0,0 +1,1022 @@ +- name: 2d.layer.global-states + desc: Checks that layers correctly use global render states. + size: [200, 200] + code: | + ctx.fillStyle = 'rgba(0, 0, 255, 1)'; + + var circle = new Path2D(); + circle.arc(90, 90, 45, 0, 2 * Math.PI); + ctx.fill(circle); + + {{ render_states }} + + ctx.beginLayer(); + + // Enable compositing in the layer to validate that draw calls in the layer + // won't individually composite with the background. + ctx.globalCompositeOperation = 'screen'; + + ctx.fillStyle = 'rgba(225, 0, 0, 1)'; + ctx.fillRect(50, 50, 75, 50); + ctx.fillStyle = 'rgba(0, 255, 0, 1)'; + ctx.fillRect(70, 70, 75, 50); + + ctx.endLayer(); + reference: | + ctx.fillStyle = 'rgba(0, 0, 255, 1)'; + + var circle = new Path2D(); + circle.arc(90, 90, 45, 0, 2 * Math.PI); + ctx.fill(circle); + + {{ render_states }} + + canvas2 = document.createElement("canvas"); + ctx2 = canvas2.getContext("2d"); + + ctx2.globalCompositeOperation = 'screen'; + ctx2.fillStyle = 'rgba(225, 0, 0, 1)'; + ctx2.fillRect(50, 50, 75, 50); + ctx2.fillStyle = 'rgba(0, 255, 0, 1)'; + ctx2.fillRect(70, 70, 75, 50); + + ctx.drawImage(canvas2, 0, 0); + variants: &global-state-variants + no-global-states: + render_states: // No global states. + alpha: + render_states: ctx.globalAlpha = 0.6; + blending: + render_states: ctx.globalCompositeOperation = 'multiply'; + composite: + render_states: ctx.globalCompositeOperation = 'source-in'; + shadow: + render_states: |- + ctx.shadowOffsetX = -10; + ctx.shadowOffsetY = 10; + ctx.shadowColor = 'rgba(255, 165, 0, 0.5)'; + ctx.shadowBlur = 3; + alpha.blending: + render_states: |- + ctx.globalAlpha = 0.6; + ctx.globalCompositeOperation = 'multiply'; + alpha.composite: + render_states: |- + ctx.globalAlpha = 0.6; + ctx.globalCompositeOperation = 'source-in'; + alpha.shadow: + render_states: |- + ctx.globalAlpha = 0.5; + ctx.shadowOffsetX = -10; + ctx.shadowOffsetY = 10; + ctx.shadowColor = 'rgba(255, 165, 0, 0.5)'; + ctx.shadowBlur = 3; + alpha.blending.shadow: + render_states: |- + ctx.globalAlpha = 0.6; + ctx.globalCompositeOperation = 'multiply'; + ctx.shadowOffsetX = -10; + ctx.shadowOffsetY = 10; + ctx.shadowColor = 'rgba(255, 165, 0, 0.5)'; + ctx.shadowBlur = 3; + alpha.composite.shadow: + render_states: |- + ctx.globalAlpha = 0.6; + ctx.globalCompositeOperation = 'source-in'; + ctx.shadowOffsetX = -10; + ctx.shadowOffsetY = 10; + ctx.shadowColor = 'rgba(255, 165, 0, 0.5)'; + ctx.shadowBlur = 3; + blending.shadow: + render_states: |- + ctx.globalCompositeOperation = 'multiply'; + ctx.shadowOffsetX = -10; + ctx.shadowOffsetY = 10; + ctx.shadowColor = 'rgba(255, 165, 0, 0.5)'; + ctx.shadowBlur = 3; + composite.shadow: + render_states: |- + ctx.globalCompositeOperation = 'source-in'; + ctx.shadowOffsetX = -10; + ctx.shadowOffsetY = 10; + ctx.shadowColor = 'rgba(255, 165, 0, 0.5)'; + ctx.shadowBlur = 3; + +- name: 2d.layer.global-states.filter + desc: Checks that layers with filters correctly use global render states. + size: [200, 200] + code: | + ctx.fillStyle = 'rgba(0, 0, 255, 1)'; + + var circle = new Path2D(); + circle.arc(90, 90, 45, 0, 2 * Math.PI); + ctx.fill(circle); + + {{ render_states }} + + ctx.beginLayer({filter: [ + {name: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0, + 0.349, 0.686, 0.168, 0, 0, + 0.272, 0.534, 0.131, 0, 0, + 0, 0, 0, 1, 0]}, + {name: 'componentTransfer', + funcA: {type: "table", tableValues: [0, 0.7]}}, + {name: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]}); + + ctx.fillStyle = 'rgba(200, 0, 0, 1)'; + ctx.fillRect(50, 50, 75, 50); + ctx.fillStyle = 'rgba(0, 200, 0, 1)'; + ctx.fillRect(70, 70, 75, 50); + + ctx.endLayer(); + reference: | + const svg = ` + + + + + + + + + + + + + `; + + const img = new Image(); + img.width = {{ size[0] }}; + img.height = {{ size[1] }}; + img.onload = () => { + ctx.fillStyle = 'rgba(0, 0, 255, 1)'; + + var circle = new Path2D(); + circle.arc(90, 90, 45, 0, 2 * Math.PI); + ctx.fill(circle); + + {{ render_states }} + + ctx.drawImage(img, 0, 0); + }; + img.src = 'data:image/svg+xml;base64,' + btoa(svg); + variants: *global-state-variants + +- name: 2d.layer.global-filter + desc: Tests that layers ignore the global context filter. + size: [150, 100] + code: | + ctx.filter = 'blur(5px)' + + ctx.beginLayer(); + ctx.fillRect(10, 10, 30, 30); // `ctx.filter` applied to draw call. + ctx.endLayer(); + + ctx.beginLayer(); + ctx.filter = 'none'; + ctx.fillRect(60, 10, 30, 30); // Should not be filted by the layer. + ctx.endLayer(); + + ctx.fillRect(110, 10, 30, 30); // `ctx.filter` is still set. + reference: | + ctx.fillRect(60, 10, 30, 30); + ctx.filter = 'blur(5px)' + ctx.fillRect(10, 10, 30, 30); + ctx.fillRect(110, 10, 30, 30); + +- name: 2d.layer.nested + desc: Tests nested canvas layers. + size: [200, 200] + code: | + var circle = new Path2D(); + circle.arc(90, 90, 40, 0, 2 * Math.PI); + ctx.fill(circle); + + ctx.globalCompositeOperation = 'source-in'; + + ctx.beginLayer(); + + ctx.fillStyle = 'rgba(0, 0, 255, 1)'; + ctx.fillRect(60, 60, 75, 50); + + ctx.globalAlpha = 0.5; + + ctx.beginLayer(); + + ctx.fillStyle = 'rgba(225, 0, 0, 1)'; + ctx.fillRect(50, 50, 75, 50); + ctx.fillStyle = 'rgba(0, 255, 0, 1)'; + ctx.fillRect(70, 70, 75, 50); + + ctx.endLayer(); + ctx.endLayer(); + reference: | + var circle = new Path2D(); + circle.arc(90, 90, 40, 0, 2 * Math.PI); + ctx.fill(circle); + + ctx.globalCompositeOperation = 'source-in'; + + canvas2 = document.createElement("canvas"); + ctx2 = canvas2.getContext("2d"); + + ctx2.fillStyle = 'rgba(0, 0, 255, 1)'; + ctx2.fillRect(60, 60, 75, 50); + + ctx2.globalAlpha = 0.5; + + canvas3 = document.createElement("canvas"); + ctx3 = canvas3.getContext("2d"); + + ctx3.fillStyle = 'rgba(225, 0, 0, 1)'; + ctx3.fillRect(50, 50, 75, 50); + ctx3.fillStyle = 'rgba(0, 255, 0, 1)'; + ctx3.fillRect(70, 70, 75, 50); + + ctx2.drawImage(canvas3, 0, 0); + ctx.drawImage(canvas2, 0, 0); + + +- name: 2d.layer.restore-style + desc: Test that ensure layers restores style values upon endLayer. + size: [200, 200] + fuzzy: maxDifference=0-1; totalPixels=0-950 + code: | + ctx.fillStyle = 'rgba(0,0,255,1)'; + ctx.fillRect(50, 50, 75, 50); + ctx.globalAlpha = 0.5; + + ctx.beginLayer(); + ctx.fillStyle = 'rgba(225, 0, 0, 1)'; + ctx.fillRect(60, 60, 75, 50); + ctx.endLayer(); + + ctx.fillRect(70, 70, 75, 50); + reference: | + ctx.fillStyle = 'rgba(0, 0, 255, 1)'; + ctx.fillRect(50, 50, 75, 50); + ctx.globalAlpha = 0.5; + + canvas2 = document.createElement("canvas"); + ctx2 = canvas2.getContext("2d"); + ctx2.fillStyle = 'rgba(225, 0, 0, 1)'; + ctx2.fillRect(60, 60, 75, 50); + ctx.drawImage(canvas2, 0, 0); + + ctx.fillRect(70, 70, 75, 50); + +- name: 2d.layer.layer-rendering-state-reset-in-layer + desc: Tests that layers ignore the global context filter. + code: | + ctx.globalAlpha = 0.5; + ctx.globalCompositeOperation = 'xor'; + ctx.shadowColor = '#0000ff'; + ctx.shadowOffsetX = 10; + ctx.shadowOffsetY = 20; + ctx.shadowBlur = 30; + + @assert ctx.globalAlpha === 0.5; + @assert ctx.globalCompositeOperation === 'xor'; + @assert ctx.shadowColor === '#0000ff'; + @assert ctx.shadowOffsetX === 10; + @assert ctx.shadowOffsetY === 20; + @assert ctx.shadowBlur === 30; + + ctx.beginLayer(); + + @assert ctx.globalAlpha === 1.0; + @assert ctx.globalCompositeOperation === 'source-over'; + @assert ctx.shadowColor === 'rgba(0, 0, 0, 0)'; + @assert ctx.shadowOffsetX === 0; + @assert ctx.shadowOffsetY === 0; + @assert ctx.shadowBlur === 0; + + ctx.endLayer(); + + @assert ctx.globalAlpha === 0.5; + @assert ctx.globalCompositeOperation === 'xor'; + @assert ctx.shadowColor === '#0000ff'; + @assert ctx.shadowOffsetX === 10; + @assert ctx.shadowOffsetY === 20; + @assert ctx.shadowBlur === 30; + +- name: 2d.layer.clip-outside + desc: Check clipping set outside the layer + size: [100, 100] + code: | + ctx.beginPath(); + ctx.rect(15, 15, 70, 70); + ctx.clip(); + + ctx.beginLayer({filter: {name: "gaussianBlur", stdDeviation: 12}}); + ctx.fillStyle = 'blue'; + ctx.fillRect(10, 10, 80, 80); + ctx.endLayer(); + reference: | + const canvas2 = new OffscreenCanvas(200, 200); + const ctx2 = canvas2.getContext('2d'); + + ctx2.beginLayer({filter: {name: "gaussianBlur", stdDeviation: 12}}); + ctx2.fillStyle = 'blue'; + ctx2.fillRect(10, 10, 80, 80); + ctx2.endLayer(); + + ctx.beginPath(); + ctx.rect(15, 15, 70, 70); + ctx.clip(); + + ctx.drawImage(canvas2, 0, 0); + +- name: 2d.layer.clip-inside + desc: Check clipping set inside the layer + size: [100, 100] + code: | + ctx.beginLayer({filter: {name: "gaussianBlur", stdDeviation: 12}}); + + ctx.beginPath(); + ctx.rect(15, 15, 70, 70); + ctx.clip(); + + ctx.fillStyle = 'blue'; + ctx.fillRect(10, 10, 80, 80); + ctx.endLayer(); + reference: | + const canvas2 = new OffscreenCanvas(200, 200); + const ctx2 = canvas2.getContext('2d'); + + ctx2.beginPath(); + ctx2.rect(15, 15, 70, 70); + ctx2.clip(); + + ctx2.fillStyle = 'blue'; + ctx2.fillRect(10, 10, 80, 80); + + ctx.beginLayer({filter: {name: "gaussianBlur", stdDeviation: 12}}); + ctx.drawImage(canvas2, 0, 0); + ctx.endLayer(); + +- name: 2d.layer.clip-inside-and-outside + desc: Check clipping set inside and outside the layer + size: [100, 100] + code: | + ctx.beginPath(); + ctx.rect(15, 15, 70, 70); + ctx.clip(); + + ctx.beginLayer({filter: {name: "gaussianBlur", stdDeviation: 12}}); + + ctx.beginPath(); + ctx.rect(15, 15, 70, 70); + ctx.clip(); + + ctx.fillStyle = 'blue'; + ctx.fillRect(10, 10, 80, 80); + ctx.endLayer(); + reference: | + const canvas2 = new OffscreenCanvas(200, 200); + const ctx2 = canvas2.getContext('2d'); + + ctx2.beginPath(); + ctx2.rect(15, 15, 70, 70); + ctx2.clip(); + + ctx2.fillStyle = 'blue'; + ctx2.fillRect(10, 10, 80, 80); + + const canvas3 = new OffscreenCanvas(200, 200); + const ctx3 = canvas3.getContext('2d'); + + ctx3.beginLayer({filter: {name: "gaussianBlur", stdDeviation: 12}}); + ctx3.drawImage(canvas2, 0, 0); + ctx3.endLayer(); + + ctx.beginPath(); + ctx.rect(15, 15, 70, 70); + ctx.clip(); + ctx.drawImage(canvas3, 0, 0); + +- name: 2d.layer.flush-on-frame-presentation + desc: Check that layers state stack is flushed and rebuilt on frame renders. + size: [200, 200] + canvasType: ['HTMLCanvas'] + test_type: "promise" + code: | + ctx.fillStyle = 'purple'; + ctx.fillRect(60, 60, 75, 50); + ctx.globalAlpha = 0.5; + + ctx.beginLayer({filter: {name: 'dropShadow', dx: -2, dy: 2}}); + ctx.fillRect(40, 40, 75, 50); + ctx.fillStyle = 'grey'; + ctx.fillRect(50, 50, 75, 50); + + // Force a flush and restoration of the state stack: + await new Promise(resolve => requestAnimationFrame(resolve)); + + ctx.fillRect(70, 70, 75, 50); + ctx.fillStyle = 'orange'; + ctx.fillRect(80, 80, 75, 50); + ctx.endLayer(); + + ctx.fillRect(80, 40, 75, 50); + reference: | + ctx.fillStyle = 'purple'; + ctx.fillRect(60, 60, 75, 50); + ctx.globalAlpha = 0.5; + + ctx.beginLayer({filter: {name: 'dropShadow', dx: -2, dy: 2}}); + ctx.fillStyle = 'purple'; + ctx.fillRect(40, 40, 75, 50); + ctx.fillStyle = 'grey'; + ctx.fillRect(50, 50, 75, 50); + + ctx.fillStyle = 'grey'; + ctx.fillRect(70, 70, 75, 50); + ctx.fillStyle = 'orange'; + ctx.fillRect(80, 80, 75, 50); + ctx.endLayer(); + + ctx.fillRect(80, 40, 75, 50); + +- name: 2d.layer.malformed-operations + desc: >- + Check that exceptions are thrown for operations that are malformed while + layers are open. + size: [200, 200] + code: | + {{ setup }} + // Shouldn't throw on its own. + {{ operation }}; + // Make sure the exception isn't caused by calling the function twice. + {{ operation }}; + // Calling again inside a layer should throw. + ctx.beginLayer(); + assert_throws_dom("InvalidStateError", + () => {{ operation }}); + variants: + createPattern: + operation: ctx.createPattern(canvas, 'repeat') + drawImage: + setup: |- + const canvas2 = new OffscreenCanvas({{ size[0] }}, {{ size[1] }}); + const ctx2 = canvas2.getContext('2d'); + operation: |- + ctx2.drawImage(canvas, 0, 0) + getImageData: + operation: ctx.getImageData(0, 0, {{ size[0] }}, {{ size[1] }}) + putImageData: + setup: |- + const canvas2 = new OffscreenCanvas({{ size[0] }}, {{ size[1] }}); + const ctx2 = canvas2.getContext('2d') + const data = ctx2.getImageData(0, 0, 1, 1); + operation: |- + ctx.putImageData(data, 0, 0) + toDataURL: + canvasType: ['HTMLCanvas'] + operation: canvas.toDataURL() + transferToImageBitmap: + canvasType: ['OffscreenCanvas', 'Worker'] + operation: canvas.transferToImageBitmap() + +- name: 2d.layer.malformed-operations-with-promises + desc: >- + Check that exceptions are thrown for operations that are malformed while + layers are open. + size: [200, 200] + test_type: "promise" + code: | + // Shouldn't throw on its own. + await {{ operation }}; + // Make sure the exception isn't caused by calling the function twice. + await {{ operation }}; + // Calling again inside a layer should throw. + ctx.beginLayer(); + await promise_rejects_dom(t, 'InvalidStateError', {{ operation }}); + variants: + convertToBlob: + canvasType: ['OffscreenCanvas', 'Worker'] + operation: |- + canvas.convertToBlob() + createImageBitmap: + operation: createImageBitmap(canvas) + toBlob: + canvasType: ['HTMLCanvas'] + operation: |- + new Promise(resolve => canvas.toBlob(resolve)) + +- name: 2d.layer.several-complex + desc: >- + Test to ensure beginlayer works for filter, alpha and shadow, even with + consecutive layers. + size: [500, 500] + fuzzy: maxDifference=0-3; totalPixels=0-6318 + code: | + ctx.fillStyle = 'rgba(0, 0, 255, 1)'; + ctx.fillRect(50, 50, 95, 70); + + ctx.globalAlpha = 0.5; + ctx.shadowOffsetX = -10; + ctx.shadowOffsetY = 10; + ctx.shadowColor = 'orange'; + ctx.shadowBlur = 3 + + for (let i = 0; i < 5; i++) { + ctx.beginLayer(); + + ctx.fillStyle = 'rgba(225, 0, 0, 1)'; + ctx.fillRect(60 + i, 40 + i, 75, 50); + ctx.fillStyle = 'rgba(0, 255, 0, 1)'; + ctx.fillRect(80 + i, 60 + i, 75, 50); + + ctx.endLayer(); + } + reference: | + ctx.fillStyle = 'rgba(0, 0, 255, 1)'; + ctx.fillRect(50, 50, 95, 70); + + ctx.globalAlpha = 0.5; + ctx.shadowOffsetX = -10; + ctx.shadowOffsetY = 10; + ctx.shadowColor = 'orange'; + ctx.shadowBlur = 3; + + var canvas2 = [5]; + var ctx2 = [5]; + + for (let i = 0; i < 5; i++) { + canvas2[i] = document.createElement("canvas"); + ctx2[i] = canvas2[i].getContext("2d"); + ctx2[i].fillStyle = 'rgba(225, 0, 0, 1)'; + ctx2[i].fillRect(60, 40, 75, 50); + ctx2[i].fillStyle = 'rgba(0, 255, 0, 1)'; + ctx2[i].fillRect(80, 60, 75, 50); + + ctx.drawImage(canvas2[i], i, i); + } + +- name: 2d.layer.reset + desc: Checks that reset discards any pending layers. + code: | + // Global states: + ctx.globalAlpha = 0.3; + ctx.globalCompositeOperation = 'source-in'; + ctx.shadowOffsetX = -3; + ctx.shadowOffsetY = 3; + ctx.shadowColor = 'rgba(0, 30, 0, 0.3)'; + ctx.shadowBlur = 3; + + ctx.beginLayer({filter: {name: 'dropShadow', dx: -3, dy: 3}}); + + // Layer states: + ctx.globalAlpha = 0.6; + ctx.globalCompositeOperation = 'source-in'; + ctx.shadowOffsetX = -6; + ctx.shadowOffsetY = 6; + ctx.shadowColor = 'rgba(0, 60, 0, 0.6)'; + ctx.shadowBlur = 3; + + ctx.reset(); + + ctx.fillRect(10, 10, 75, 50); + reference: + ctx.fillRect(10, 10, 75, 50); + +- name: 2d.layer.clearRect.partial + desc: clearRect inside a layer can clear a portion of the layer content. + size: [100, 100] + code: | + ctx.fillStyle = 'blue'; + ctx.fillRect(10, 10, 80, 50); + + ctx.beginLayer(); + ctx.fillStyle = 'red'; + ctx.fillRect(20, 20, 80, 50); + ctx.clearRect(30, 30, 60, 30); + ctx.endLayer(); + reference: | + ctx.fillStyle = 'blue'; + ctx.fillRect(10, 10, 80, 50); + + ctx.fillStyle = 'red'; + ctx.fillRect(20, 20, 80, 10); + ctx.fillRect(20, 60, 80, 10); + ctx.fillRect(20, 20, 10, 50); + ctx.fillRect(90, 20, 10, 50); + +- name: 2d.layer.clearRect.full + desc: clearRect inside a layer can clear all of the layer content. + size: [100, 100] + code: | + ctx.fillStyle = 'blue'; + ctx.fillRect(10, 10, 80, 50); + + ctx.beginLayer(); + ctx.fillStyle = 'red'; + ctx.fillRect(20, 20, 80, 50); + ctx.fillStyle = 'green'; + ctx.clearRect(0, 0, {{ size[0] }}, {{ size[1] }}); + ctx.endLayer(); + reference: | + ctx.fillStyle = 'blue'; + ctx.fillRect(10, 10, 80, 50); + +- name: 2d.layer.valid-calls + desc: No exception raised on {{ variant_desc }}. + variants: + save: + variant_desc: lone save() calls + code: ctx.save(); + beginLayer: + variant_desc: lone beginLayer() calls + code: ctx.beginLayer(); + restore: + variant_desc: lone restore() calls + code: ctx.restore(); + save_restore: + variant_desc: save() + restore() + code: |- + ctx.save(); + ctx.restore(); + save_reset_restore: + variant_desc: save() + reset() + restore() + code: |- + ctx.save(); + ctx.reset(); + ctx.restore(); + beginLayer-endLayer: + variant_desc: beginLayer() + endLayer() + code: |- + ctx.beginLayer(); + ctx.save(); + save-beginLayer: + variant_desc: save() + beginLayer() + code: |- + ctx.save(); + ctx.beginLayer(); + beginLayer-save: + variant_desc: beginLayer() + save() + code: |- + ctx.beginLayer(); + ctx.save(); + +- name: 2d.layer.invalid-calls + desc: Raises exception on {{ variant_desc }}. + code: | + assert_throws_dom("INVALID_STATE_ERR", function() { + {{ call_sequence | indent(2) }} + }); + variants: + endLayer: + variant_desc: lone endLayer calls + call_sequence: ctx.endLayer(); + save-endLayer: + variant_desc: save() + endLayer() + call_sequence: |- + ctx.save(); + ctx.endLayer(); + beginLayer-restore: + variant_desc: beginLayer() + restore() + call_sequence: |- + ctx.beginLayer(); + ctx.restore(); + save-beginLayer-restore: + variant_desc: save() + beginLayer() + restore() + call_sequence: |- + ctx.save(); + ctx.beginLayer(); + ctx.restore(); + beginLayer-save-endLayer: + variant_desc: beginLayer() + save() + endLayer() + call_sequence: |- + ctx.beginLayer(); + ctx.save(); + ctx.endLayer(); + beginLayer-reset-endLayer: + variant_desc: beginLayer() + reset() + endLayer() + call_sequence: |- + ctx.beginLayer(); + ctx.reset(); + ctx.endLayer(); + +- name: 2d.layer.exceptions-are-no-op + desc: Checks that the context state is left unchanged if beginLayer throws. + code: | + // Get `beginLayer` to throw while parsing the filter. + assert_throws_js(TypeError, + () => ctx.beginLayer({filter: {name: 'colorMatrix', + values: 'foo'}})); + // `beginLayer` shouldn't have opened the layer, so `endLayer` should throw. + assert_throws_dom("InvalidStateError", () => ctx.endLayer()); + +- name: 2d.layer.cross-layer-paths + desc: Checks that path defined in a layer is usable outside. + code: | + ctx.beginLayer(); + ctx.translate(50, 0); + ctx.moveTo(0, 0); + ctx.endLayer(); + ctx.lineTo(50, 100); + ctx.stroke(); + reference: + ctx.moveTo(50, 0); + ctx.lineTo(50, 100); + ctx.stroke(); + +- name: 2d.layer.beginLayer-options + desc: Checks beginLayer works for different option parameter values + code: | + ctx.beginLayer(); ctx.endLayer(); + ctx.beginLayer(null); ctx.endLayer(); + ctx.beginLayer(undefined); ctx.endLayer(); + ctx.beginLayer([]); ctx.endLayer(); + ctx.beginLayer({}); ctx.endLayer(); + + @assert throws TypeError ctx.beginLayer(''); + @assert throws TypeError ctx.beginLayer(0); + @assert throws TypeError ctx.beginLayer(1); + @assert throws TypeError ctx.beginLayer(true); + @assert throws TypeError ctx.beginLayer(false); + + ctx.beginLayer({filter: null}); ctx.endLayer(); + ctx.beginLayer({filter: undefined}); ctx.endLayer(); + ctx.beginLayer({filter: []}); ctx.endLayer(); + ctx.beginLayer({filter: {}}); ctx.endLayer(); + ctx.beginLayer({filter: {name: "unknown"}}); ctx.endLayer(); + ctx.beginLayer({filter: ''}); ctx.endLayer(); + + // These cases don't throw TypeError since they can be casted to a + // DOMString. + ctx.beginLayer({filter: 0}); ctx.endLayer(); + ctx.beginLayer({filter: 1}); ctx.endLayer(); + ctx.beginLayer({filter: true}); ctx.endLayer(); + ctx.beginLayer({filter: false}); ctx.endLayer(); + +- name: 2d.layer.blur-from-outside-canvas + desc: Checks blur leaking inside from drawing outside the canvas + size: [200, 200] + code: | + {{ clipping }} + + ctx.beginLayer({filter: [ {name: 'gaussianBlur', stdDeviation: 30} ]}); + + ctx.fillStyle = 'turquoise'; + ctx.fillRect(201, 50, 100, 100); + ctx.fillStyle = 'indigo'; + ctx.fillRect(50, 201, 100, 100); + ctx.fillStyle = 'orange'; + ctx.fillRect(-1, 50, -100, 100); + ctx.fillStyle = 'brown'; + ctx.fillRect(50, -1, 100, -100); + + ctx.endLayer(); + reference: | + const svg = ` + + + + + + + + + + + `; + const img = new Image(); + img.width = {{ size[0] }}; + img.height = {{ size[1] }}; + img.onload = () => { + {{ clipping | indent(4) }} + + ctx.drawImage(img, 0, 0); + }; + img.src = 'data:image/svg+xml;base64,' + btoa(svg); + variants: + no-clipping: + clipping: // No clipping. + with-clipping: + clipping: |- + const clipRegion = new Path2D(); + clipRegion.rect(20, 20, 160, 160); + ctx.clip(clipRegion); + +- name: 2d.layer.shadow-from-outside-canvas + desc: Checks shadow produced by object drawn outside the canvas + size: [200, 200] + code: | + {{ distance }} + + {{ clipping }} + + ctx.beginLayer({filter: [ + {name: 'dropShadow', dx: -({{ size[0] }} + delta), + dy: -({{ size[1] }} + delta), stdDeviation: 0, + floodColor: 'green'}, + ]}); + + ctx.fillStyle = 'red'; + ctx.fillRect({{ size[0] }} + delta, {{ size[1] }} + delta, 100, 100); + + ctx.endLayer(); + reference: | + {{ distance }} + + {{ clipping }} + + ctx.fillStyle = 'green'; + ctx.fillRect(0, 0, 100, 100); + variants: + short-distance: + distance: |- + const delta = 1; + clipping: // No clipping. + short-distance-with-clipping: + distance: |- + const delta = 1; + clipping: |- + const clipRegion = new Path2D(); + clipRegion.rect(20, 20, 160, 160); + ctx.clip(clipRegion); + long-distance: + distance: |- + const delta = 10000; + clipping: // No clipping. + long-distance-with-clipping: + distance: |- + const delta = 10000; + clipping: |- + const clipRegion = new Path2D(); + clipRegion.rect(20, 20, 160, 160); + ctx.clip(clipRegion); + +- name: 2d.layer.opaque-canvas + desc: Checks that layer blending works inside opaque canvas + size: [300, 300] + code: | + {% if canvas_type == 'htmlcanvas' %} + const canvas2 = document.createElement('canvas'); + canvas2.width = 200; + canvas2.height = 200; + {% else %} + const canvas2 = new OffscreenCanvas(200, 200); + {% endif %} + const ctx2 = canvas2.getContext('2d', {alpha: false}); + + ctx2.fillStyle = 'purple'; + ctx2.fillRect(10, 10, 100, 100); + + ctx2.beginLayer({filter: {name: 'dropShadow', dx: -10, dy: 10, + stdDeviation: 0, + floodColor: 'rgba(200, 100, 50, 0.5)'}}); + ctx2.fillStyle = 'green'; + ctx2.fillRect(50, 50, 100, 100); + ctx2.globalAlpha = 0.8; + ctx2.fillStyle = 'yellow'; + ctx2.fillRect(75, 25, 100, 100); + ctx2.endLayer(); + + ctx.fillStyle = 'blue'; + ctx.fillRect(0, 0, 300, 300); + ctx.drawImage(canvas2, 0, 0); + reference: | + ctx.fillStyle = 'blue'; + ctx.fillRect(0, 0, 300, 300); + + ctx.fillStyle = 'black'; + ctx.fillRect(0, 0, 200, 200); + + ctx.fillStyle = 'purple'; + ctx.fillRect(10, 10, 100, 100); + + const canvas2 = new OffscreenCanvas(200, 200); + const ctx2 = canvas2.getContext('2d'); + ctx2.fillStyle = 'green'; + ctx2.fillRect(50, 50, 100, 100); + ctx2.globalAlpha = 0.8; + ctx2.fillStyle = 'yellow'; + ctx2.fillRect(75, 25, 100, 100); + + ctx.shadowColor = 'rgba(200, 100, 50, 0.5)'; + ctx.shadowOffsetX = -10; + ctx.shadowOffsetY = 10; + ctx.drawImage(canvas2, 0, 0); + +- name: 2d.layer.css-filters + desc: Checks that beginLayer works with a CSS filter string as input. + size: [200, 200] + code: &filter-test-code | + ctx.beginLayer({filter: {{ ctx_filter }}}); + + ctx.fillStyle = 'teal'; + ctx.fillRect(50, 50, 100, 100); + + ctx.endLayer(); + html_reference: &filter-test-reference | + + + {{ svg_filter | indent(4) }} + + + + + + variants: + blur: + ctx_filter: |- + 'blur(10px)' + svg_filter: |- + + shadow: + ctx_filter: |- + 'drop-shadow(-10px -10px 5px purple)' + svg_filter: |- + + blur-and-shadow: + ctx_filter: |- + 'blur(5px) drop-shadow(10px 10px 5px orange)' + svg_filter: |- + + + +- name: 2d.layer.anisotropic-blur + desc: Checks that layers allow gaussian blur with separate X and Y components. + size: [200, 200] + code: *filter-test-code + html_reference: *filter-test-reference + variants: + x-only: + ctx_filter: |- + { name: 'gaussianBlur', stdDeviation: [4, 0] } + svg_filter: |- + + mostly-x: + ctx_filter: |- + { name: 'gaussianBlur', stdDeviation: [4, 1] } + svg_filter: |- + + isotropic: + ctx_filter: |- + { name: 'gaussianBlur', stdDeviation: [4, 4] } + svg_filter: |- + + mostly-y: + ctx_filter: |- + { name: 'gaussianBlur', stdDeviation: [1, 4] } + svg_filter: |- + + y-only: + ctx_filter: |- + { name: 'gaussianBlur', stdDeviation: [0, 4] } + svg_filter: |- + + +- name: 2d.layer.nested-filters + desc: Checks that nested layers work properly when both apply filters. + size: [400, 200] + code: | + ctx.beginLayer({filter: {name: 'dropShadow', dx: -20, dy: -20, + stdDeviation: 0, floodColor: 'yellow'}}); + ctx.beginLayer({filter: 'drop-shadow(-10px -10px 0 blue)'}); + + ctx.fillStyle = 'red'; + ctx.fillRect(50, 50, 100, 100); + + ctx.endLayer(); + ctx.endLayer(); + + ctx.beginLayer({filter: 'drop-shadow(20px 20px 0 blue)'}); + ctx.beginLayer({filter: {name: 'dropShadow', dx: 10, dy: 10, + stdDeviation: 0, floodColor: 'yellow'}}); + + ctx.fillStyle = 'red'; + ctx.fillRect(250, 50, 100, 100); + + ctx.endLayer(); + ctx.endLayer(); + reference: | + ctx.fillStyle = 'yellow'; + ctx.fillRect(20, 20, 100, 100); + ctx.fillRect(30, 30, 100, 100); + ctx.fillStyle = 'blue'; + ctx.fillRect(40, 40, 100, 100); + ctx.fillStyle = 'red'; + ctx.fillRect(50, 50, 100, 100); + + ctx.fillStyle = 'blue'; + ctx.fillRect(280, 80, 100, 100); + ctx.fillRect(270, 70, 100, 100); + ctx.fillStyle = 'yellow'; + ctx.fillRect(260, 60, 100, 100); + ctx.fillStyle = 'red'; + ctx.fillRect(250, 50, 100, 100); diff --git a/testing/web-platform/tests/html/canvas/tools/yaml-new/line-styles.yaml b/testing/web-platform/tests/html/canvas/tools/yaml-new/line-styles.yaml new file mode 100644 index 0000000000..47bf3af97e --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/yaml-new/line-styles.yaml @@ -0,0 +1,954 @@ +- name: 2d.line.defaults + code: | + @assert ctx.lineWidth === 1; + @assert ctx.lineCap === 'butt'; + @assert ctx.lineJoin === 'miter'; + @assert ctx.miterLimit === 10; + +- name: 2d.line.width.basic + desc: lineWidth determines the width of line strokes + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineWidth = 20; + // Draw a green line over a red box, to check the line is not too small + ctx.fillStyle = '#f00'; + ctx.strokeStyle = '#0f0'; + ctx.fillRect(15, 15, 20, 20); + ctx.beginPath(); + ctx.moveTo(25, 15); + ctx.lineTo(25, 35); + ctx.stroke(); + + // Draw a green box over a red line, to check the line is not too large + ctx.fillStyle = '#0f0'; + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(75, 15); + ctx.lineTo(75, 35); + ctx.stroke(); + ctx.fillRect(65, 15, 20, 20); + + @assert pixel 14,25 == 0,255,0,255; + @assert pixel 15,25 == 0,255,0,255; + @assert pixel 16,25 == 0,255,0,255; + @assert pixel 25,25 == 0,255,0,255; + @assert pixel 34,25 == 0,255,0,255; + @assert pixel 35,25 == 0,255,0,255; + @assert pixel 36,25 == 0,255,0,255; + + @assert pixel 64,25 == 0,255,0,255; + @assert pixel 65,25 == 0,255,0,255; + @assert pixel 66,25 == 0,255,0,255; + @assert pixel 75,25 == 0,255,0,255; + @assert pixel 84,25 == 0,255,0,255; + @assert pixel 85,25 == 0,255,0,255; + @assert pixel 86,25 == 0,255,0,255; + expected: green + +- name: 2d.line.width.transformed + desc: Line stroke widths are affected by scale transformations + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineWidth = 4; + // Draw a green line over a red box, to check the line is not too small + ctx.fillStyle = '#f00'; + ctx.strokeStyle = '#0f0'; + ctx.fillRect(15, 15, 20, 20); + ctx.save(); + ctx.scale(5, 1); + ctx.beginPath(); + ctx.moveTo(5, 15); + ctx.lineTo(5, 35); + ctx.stroke(); + ctx.restore(); + + // Draw a green box over a red line, to check the line is not too large + ctx.fillStyle = '#0f0'; + ctx.strokeStyle = '#f00'; + ctx.save(); + ctx.scale(-5, 1); + ctx.beginPath(); + ctx.moveTo(-15, 15); + ctx.lineTo(-15, 35); + ctx.stroke(); + ctx.restore(); + ctx.fillRect(65, 15, 20, 20); + + @assert pixel 14,25 == 0,255,0,255; + @assert pixel 15,25 == 0,255,0,255; + @assert pixel 16,25 == 0,255,0,255; + @assert pixel 25,25 == 0,255,0,255; + @assert pixel 34,25 == 0,255,0,255; + @assert pixel 35,25 == 0,255,0,255; + @assert pixel 36,25 == 0,255,0,255; + + @assert pixel 64,25 == 0,255,0,255; + @assert pixel 65,25 == 0,255,0,255; + @assert pixel 66,25 == 0,255,0,255; + @assert pixel 75,25 == 0,255,0,255; + @assert pixel 84,25 == 0,255,0,255; + @assert pixel 85,25 == 0,255,0,255; + @assert pixel 86,25 == 0,255,0,255; + expected: green + +- name: 2d.line.width.scaledefault + desc: Default lineWidth strokes are affected by scale transformations + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.scale(50, 50); + ctx.strokeStyle = '#0f0'; + ctx.moveTo(0, 0.5); + ctx.lineTo(2, 0.5); + ctx.stroke(); + + @assert pixel 25,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 75,25 == 0,255,0,255; + @assert pixel 50,5 == 0,255,0,255; + @assert pixel 50,45 == 0,255,0,255; + expected: green + +- name: 2d.line.width.valid + desc: Setting lineWidth to valid values works + code: | + ctx.lineWidth = 1.5; + @assert ctx.lineWidth === 1.5; + + ctx.lineWidth = "1e1"; + @assert ctx.lineWidth === 10; + + ctx.lineWidth = 1/1024; + @assert ctx.lineWidth === 1/1024; + + ctx.lineWidth = 1000; + @assert ctx.lineWidth === 1000; + +- name: 2d.line.width.invalid + desc: Setting lineWidth to invalid values is ignored + code: | + ctx.lineWidth = 1.5; + @assert ctx.lineWidth === 1.5; + + ctx.lineWidth = 1.5; + ctx.lineWidth = 0; + @assert ctx.lineWidth === 1.5; + + ctx.lineWidth = 1.5; + ctx.lineWidth = -1; + @assert ctx.lineWidth === 1.5; + + ctx.lineWidth = 1.5; + ctx.lineWidth = Infinity; + @assert ctx.lineWidth === 1.5; + + ctx.lineWidth = 1.5; + ctx.lineWidth = -Infinity; + @assert ctx.lineWidth === 1.5; + + ctx.lineWidth = 1.5; + ctx.lineWidth = NaN; + @assert ctx.lineWidth === 1.5; + + ctx.lineWidth = 1.5; + ctx.lineWidth = 'string'; + @assert ctx.lineWidth === 1.5; + + ctx.lineWidth = 1.5; + ctx.lineWidth = true; + @assert ctx.lineWidth === 1; + + ctx.lineWidth = 1.5; + ctx.lineWidth = false; + @assert ctx.lineWidth === 1.5; + +- name: 2d.line.cap.butt + desc: lineCap 'butt' is rendered correctly + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineCap = 'butt'; + ctx.lineWidth = 20; + + ctx.fillStyle = '#f00'; + ctx.strokeStyle = '#0f0'; + ctx.fillRect(15, 15, 20, 20); + ctx.beginPath(); + ctx.moveTo(25, 15); + ctx.lineTo(25, 35); + ctx.stroke(); + + ctx.fillStyle = '#0f0'; + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(75, 15); + ctx.lineTo(75, 35); + ctx.stroke(); + ctx.fillRect(65, 15, 20, 20); + + @assert pixel 25,14 == 0,255,0,255; + @assert pixel 25,15 == 0,255,0,255; + @assert pixel 25,16 == 0,255,0,255; + @assert pixel 25,34 == 0,255,0,255; + @assert pixel 25,35 == 0,255,0,255; + @assert pixel 25,36 == 0,255,0,255; + + @assert pixel 75,14 == 0,255,0,255; + @assert pixel 75,15 == 0,255,0,255; + @assert pixel 75,16 == 0,255,0,255; + @assert pixel 75,34 == 0,255,0,255; + @assert pixel 75,35 == 0,255,0,255; + @assert pixel 75,36 == 0,255,0,255; + expected: green + +- name: 2d.line.cap.round + desc: lineCap 'round' is rendered correctly + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var tol = 1; // tolerance to avoid antialiasing artifacts + + ctx.lineCap = 'round'; + ctx.lineWidth = 20; + + + ctx.fillStyle = '#f00'; + ctx.strokeStyle = '#0f0'; + + ctx.beginPath(); + ctx.moveTo(35-tol, 15); + ctx.arc(25, 15, 10-tol, 0, Math.PI, true); + ctx.arc(25, 35, 10-tol, Math.PI, 0, true); + ctx.fill(); + + ctx.beginPath(); + ctx.moveTo(25, 15); + ctx.lineTo(25, 35); + ctx.stroke(); + + + ctx.fillStyle = '#0f0'; + ctx.strokeStyle = '#f00'; + + ctx.beginPath(); + ctx.moveTo(75, 15); + ctx.lineTo(75, 35); + ctx.stroke(); + + ctx.beginPath(); + ctx.moveTo(85+tol, 15); + ctx.arc(75, 15, 10+tol, 0, Math.PI, true); + ctx.arc(75, 35, 10+tol, Math.PI, 0, true); + ctx.fill(); + + @assert pixel 17,6 == 0,255,0,255; + @assert pixel 25,6 == 0,255,0,255; + @assert pixel 32,6 == 0,255,0,255; + @assert pixel 17,43 == 0,255,0,255; + @assert pixel 25,43 == 0,255,0,255; + @assert pixel 32,43 == 0,255,0,255; + + @assert pixel 67,6 == 0,255,0,255; + @assert pixel 75,6 == 0,255,0,255; + @assert pixel 82,6 == 0,255,0,255; + @assert pixel 67,43 == 0,255,0,255; + @assert pixel 75,43 == 0,255,0,255; + @assert pixel 82,43 == 0,255,0,255; + expected: green + +- name: 2d.line.cap.square + desc: lineCap 'square' is rendered correctly + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineCap = 'square'; + ctx.lineWidth = 20; + + ctx.fillStyle = '#f00'; + ctx.strokeStyle = '#0f0'; + ctx.fillRect(15, 5, 20, 40); + ctx.beginPath(); + ctx.moveTo(25, 15); + ctx.lineTo(25, 35); + ctx.stroke(); + + ctx.fillStyle = '#0f0'; + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(75, 15); + ctx.lineTo(75, 35); + ctx.stroke(); + ctx.fillRect(65, 5, 20, 40); + + @assert pixel 25,4 == 0,255,0,255; + @assert pixel 25,5 == 0,255,0,255; + @assert pixel 25,6 == 0,255,0,255; + @assert pixel 25,44 == 0,255,0,255; + @assert pixel 25,45 == 0,255,0,255; + @assert pixel 25,46 == 0,255,0,255; + + @assert pixel 75,4 == 0,255,0,255; + @assert pixel 75,5 == 0,255,0,255; + @assert pixel 75,6 == 0,255,0,255; + @assert pixel 75,44 == 0,255,0,255; + @assert pixel 75,45 == 0,255,0,255; + @assert pixel 75,46 == 0,255,0,255; + expected: green + +- name: 2d.line.cap.open + desc: Line caps are drawn at the corners of an unclosed rectangle + code: | + ctx.fillStyle = '#f00'; + ctx.strokeStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineJoin = 'bevel'; + ctx.lineCap = 'square'; + ctx.lineWidth = 400; + + ctx.beginPath(); + ctx.moveTo(200, 200); + ctx.lineTo(200, 1000); + ctx.lineTo(1000, 1000); + ctx.lineTo(1000, 200); + ctx.lineTo(200, 200); + ctx.stroke(); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 48,1 == 0,255,0,255; + @assert pixel 48,48 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + expected: green + +- name: 2d.line.cap.closed + desc: Line caps are not drawn at the corners of an unclosed rectangle + code: | + ctx.fillStyle = '#0f0'; + ctx.strokeStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineJoin = 'bevel'; + ctx.lineCap = 'square'; + ctx.lineWidth = 400; + + ctx.beginPath(); + ctx.moveTo(200, 200); + ctx.lineTo(200, 1000); + ctx.lineTo(1000, 1000); + ctx.lineTo(1000, 200); + ctx.closePath(); + ctx.stroke(); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 48,1 == 0,255,0,255; + @assert pixel 48,48 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + expected: green + +- name: 2d.line.cap.valid + desc: Setting lineCap to valid values works + code: | + ctx.lineCap = 'butt' + @assert ctx.lineCap === 'butt'; + + ctx.lineCap = 'round'; + @assert ctx.lineCap === 'round'; + + ctx.lineCap = 'square'; + @assert ctx.lineCap === 'square'; + +- name: 2d.line.cap.invalid + desc: Setting lineCap to invalid values is ignored + code: | + ctx.lineCap = 'butt' + @assert ctx.lineCap === 'butt'; + + ctx.lineCap = 'butt'; + ctx.lineCap = 'invalid'; + @assert ctx.lineCap === 'butt'; + + ctx.lineCap = 'butt'; + ctx.lineCap = 'ROUND'; + @assert ctx.lineCap === 'butt'; + + ctx.lineCap = 'butt'; + ctx.lineCap = 'round\0'; + @assert ctx.lineCap === 'butt'; + + ctx.lineCap = 'butt'; + ctx.lineCap = 'round '; + @assert ctx.lineCap === 'butt'; + + ctx.lineCap = 'butt'; + ctx.lineCap = ""; + @assert ctx.lineCap === 'butt'; + + ctx.lineCap = 'butt'; + ctx.lineCap = 'bevel'; + @assert ctx.lineCap === 'butt'; + +- name: 2d.line.fill.noop + desc: Filling a line draws nothing + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.lineWidth = 20; + ctx.beginPath(); + ctx.moveTo(10, 20); + ctx.lineTo(90, 30); + ctx.fill(); + @assert pixel 50,24 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 50,26 == 0,255,0,255; + +- name: 2d.line.join.bevel + desc: lineJoin 'bevel' is rendered correctly + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var tol = 1; // tolerance to avoid antialiasing artifacts + + ctx.lineJoin = 'bevel'; + ctx.lineWidth = 20; + + ctx.fillStyle = '#f00'; + ctx.strokeStyle = '#0f0'; + + ctx.fillRect(10, 10, 20, 20); + ctx.fillRect(20, 20, 20, 20); + ctx.beginPath(); + ctx.moveTo(30, 20); + ctx.lineTo(40-tol, 20); + ctx.lineTo(30, 10+tol); + ctx.fill(); + + ctx.beginPath(); + ctx.moveTo(10, 20); + ctx.lineTo(30, 20); + ctx.lineTo(30, 40); + ctx.stroke(); + + + ctx.fillStyle = '#0f0'; + ctx.strokeStyle = '#f00'; + + ctx.beginPath(); + ctx.moveTo(60, 20); + ctx.lineTo(80, 20); + ctx.lineTo(80, 40); + ctx.stroke(); + + ctx.fillRect(60, 10, 20, 20); + ctx.fillRect(70, 20, 20, 20); + ctx.beginPath(); + ctx.moveTo(80, 20); + ctx.lineTo(90+tol, 20); + ctx.lineTo(80, 10-tol); + ctx.fill(); + + @assert pixel 34,16 == 0,255,0,255; + @assert pixel 34,15 == 0,255,0,255; + @assert pixel 35,15 == 0,255,0,255; + @assert pixel 36,15 == 0,255,0,255; + @assert pixel 36,14 == 0,255,0,255; + + @assert pixel 84,16 == 0,255,0,255; + @assert pixel 84,15 == 0,255,0,255; + @assert pixel 85,15 == 0,255,0,255; + @assert pixel 86,15 == 0,255,0,255; + @assert pixel 86,14 == 0,255,0,255; + expected: green + +- name: 2d.line.join.round + desc: lineJoin 'round' is rendered correctly + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var tol = 1; // tolerance to avoid antialiasing artifacts + + ctx.lineJoin = 'round'; + ctx.lineWidth = 20; + + ctx.fillStyle = '#f00'; + ctx.strokeStyle = '#0f0'; + + ctx.fillRect(10, 10, 20, 20); + ctx.fillRect(20, 20, 20, 20); + ctx.beginPath(); + ctx.moveTo(30, 20); + ctx.arc(30, 20, 10-tol, 0, 2*Math.PI, true); + ctx.fill(); + + ctx.beginPath(); + ctx.moveTo(10, 20); + ctx.lineTo(30, 20); + ctx.lineTo(30, 40); + ctx.stroke(); + + + ctx.fillStyle = '#0f0'; + ctx.strokeStyle = '#f00'; + + ctx.beginPath(); + ctx.moveTo(60, 20); + ctx.lineTo(80, 20); + ctx.lineTo(80, 40); + ctx.stroke(); + + ctx.fillRect(60, 10, 20, 20); + ctx.fillRect(70, 20, 20, 20); + ctx.beginPath(); + ctx.moveTo(80, 20); + ctx.arc(80, 20, 10+tol, 0, 2*Math.PI, true); + ctx.fill(); + + @assert pixel 36,14 == 0,255,0,255; + @assert pixel 36,13 == 0,255,0,255; + @assert pixel 37,13 == 0,255,0,255; + @assert pixel 38,13 == 0,255,0,255; + @assert pixel 38,12 == 0,255,0,255; + + @assert pixel 86,14 == 0,255,0,255; + @assert pixel 86,13 == 0,255,0,255; + @assert pixel 87,13 == 0,255,0,255; + @assert pixel 88,13 == 0,255,0,255; + @assert pixel 88,12 == 0,255,0,255; + expected: green + +- name: 2d.line.join.miter + desc: lineJoin 'miter' is rendered correctly + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineJoin = 'miter'; + ctx.lineWidth = 20; + + ctx.fillStyle = '#f00'; + ctx.strokeStyle = '#0f0'; + + ctx.fillStyle = '#f00'; + ctx.strokeStyle = '#0f0'; + + ctx.fillRect(10, 10, 30, 20); + ctx.fillRect(20, 10, 20, 30); + + ctx.beginPath(); + ctx.moveTo(10, 20); + ctx.lineTo(30, 20); + ctx.lineTo(30, 40); + ctx.stroke(); + + + ctx.fillStyle = '#0f0'; + ctx.strokeStyle = '#f00'; + + ctx.beginPath(); + ctx.moveTo(60, 20); + ctx.lineTo(80, 20); + ctx.lineTo(80, 40); + ctx.stroke(); + + ctx.fillRect(60, 10, 30, 20); + ctx.fillRect(70, 10, 20, 30); + + @assert pixel 38,12 == 0,255,0,255; + @assert pixel 39,11 == 0,255,0,255; + @assert pixel 40,10 == 0,255,0,255; + @assert pixel 41,9 == 0,255,0,255; + @assert pixel 42,8 == 0,255,0,255; + + @assert pixel 88,12 == 0,255,0,255; + @assert pixel 89,11 == 0,255,0,255; + @assert pixel 90,10 == 0,255,0,255; + @assert pixel 91,9 == 0,255,0,255; + @assert pixel 92,8 == 0,255,0,255; + expected: green + +- name: 2d.line.join.open + desc: Line joins are not drawn at the corner of an unclosed rectangle + code: | + ctx.fillStyle = '#0f0'; + ctx.strokeStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineJoin = 'miter'; + ctx.lineWidth = 200; + + ctx.beginPath(); + ctx.moveTo(100, 50); + ctx.lineTo(100, 1000); + ctx.lineTo(1000, 1000); + ctx.lineTo(1000, 50); + ctx.lineTo(100, 50); + ctx.stroke(); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 48,1 == 0,255,0,255; + @assert pixel 48,48 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + expected: green + +- name: 2d.line.join.closed + desc: Line joins are drawn at the corner of a closed rectangle + code: | + ctx.fillStyle = '#f00'; + ctx.strokeStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineJoin = 'miter'; + ctx.lineWidth = 200; + + ctx.beginPath(); + ctx.moveTo(100, 50); + ctx.lineTo(100, 1000); + ctx.lineTo(1000, 1000); + ctx.lineTo(1000, 50); + ctx.closePath(); + ctx.stroke(); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 48,1 == 0,255,0,255; + @assert pixel 48,48 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + expected: green + +- name: 2d.line.join.parallel + desc: Line joins are drawn at 180-degree joins + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 300; + ctx.lineJoin = 'round'; + ctx.beginPath(); + ctx.moveTo(-100, 25); + ctx.lineTo(0, 25); + ctx.lineTo(-100, 25); + ctx.stroke(); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 48,1 == 0,255,0,255; + @assert pixel 48,48 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + expected: green + +- name: 2d.line.join.valid + desc: Setting lineJoin to valid values works + code: | + ctx.lineJoin = 'bevel' + @assert ctx.lineJoin === 'bevel'; + + ctx.lineJoin = 'round'; + @assert ctx.lineJoin === 'round'; + + ctx.lineJoin = 'miter'; + @assert ctx.lineJoin === 'miter'; + +- name: 2d.line.join.invalid + desc: Setting lineJoin to invalid values is ignored + code: | + ctx.lineJoin = 'bevel' + @assert ctx.lineJoin === 'bevel'; + + ctx.lineJoin = 'bevel'; + ctx.lineJoin = 'invalid'; + @assert ctx.lineJoin === 'bevel'; + + ctx.lineJoin = 'bevel'; + ctx.lineJoin = 'ROUND'; + @assert ctx.lineJoin === 'bevel'; + + ctx.lineJoin = 'bevel'; + ctx.lineJoin = 'round\0'; + @assert ctx.lineJoin === 'bevel'; + + ctx.lineJoin = 'bevel'; + ctx.lineJoin = 'round '; + @assert ctx.lineJoin === 'bevel'; + + ctx.lineJoin = 'bevel'; + ctx.lineJoin = ""; + @assert ctx.lineJoin === 'bevel'; + + ctx.lineJoin = 'bevel'; + ctx.lineJoin = 'butt'; + @assert ctx.lineJoin === 'bevel'; + +- name: 2d.line.miter.exceeded + desc: Miter joins are not drawn when the miter limit is exceeded + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineWidth = 400; + ctx.lineJoin = 'miter'; + + ctx.strokeStyle = '#f00'; + ctx.miterLimit = 1.414; + ctx.beginPath(); + ctx.moveTo(200, 1000); + ctx.lineTo(200, 200); + ctx.lineTo(1000, 201); // slightly non-right-angle to avoid being a special case + ctx.stroke(); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 48,1 == 0,255,0,255; + @assert pixel 48,48 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + expected: green + +- name: 2d.line.miter.acute + desc: Miter joins are drawn correctly with acute angles + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineWidth = 200; + ctx.lineJoin = 'miter'; + + ctx.strokeStyle = '#0f0'; + ctx.miterLimit = 2.614; + ctx.beginPath(); + ctx.moveTo(100, 1000); + ctx.lineTo(100, 100); + ctx.lineTo(1000, 1000); + ctx.stroke(); + + ctx.strokeStyle = '#f00'; + ctx.miterLimit = 2.613; + ctx.beginPath(); + ctx.moveTo(100, 1000); + ctx.lineTo(100, 100); + ctx.lineTo(1000, 1000); + ctx.stroke(); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 48,1 == 0,255,0,255; + @assert pixel 48,48 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + expected: green + +- name: 2d.line.miter.obtuse + desc: Miter joins are drawn correctly with obtuse angles + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineWidth = 1600; + ctx.lineJoin = 'miter'; + + ctx.strokeStyle = '#0f0'; + ctx.miterLimit = 1.083; + ctx.beginPath(); + ctx.moveTo(800, 10000); + ctx.lineTo(800, 300); + ctx.lineTo(10000, -8900); + ctx.stroke(); + + ctx.strokeStyle = '#f00'; + ctx.miterLimit = 1.082; + ctx.beginPath(); + ctx.moveTo(800, 10000); + ctx.lineTo(800, 300); + ctx.lineTo(10000, -8900); + ctx.stroke(); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 48,1 == 0,255,0,255; + @assert pixel 48,48 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + expected: green + +- name: 2d.line.miter.rightangle + desc: Miter joins are not drawn when the miter limit is exceeded, on exact right + angles + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineWidth = 400; + ctx.lineJoin = 'miter'; + + ctx.strokeStyle = '#f00'; + ctx.miterLimit = 1.414; + ctx.beginPath(); + ctx.moveTo(200, 1000); + ctx.lineTo(200, 200); + ctx.lineTo(1000, 200); + ctx.stroke(); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 48,1 == 0,255,0,255; + @assert pixel 48,48 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + expected: green + +- name: 2d.line.miter.lineedge + desc: Miter joins are not drawn when the miter limit is exceeded at the corners + of a zero-height rectangle + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineWidth = 200; + ctx.lineJoin = 'miter'; + + ctx.strokeStyle = '#f00'; + ctx.miterLimit = 1.414; + ctx.beginPath(); + ctx.strokeRect(100, 25, 200, 0); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 48,1 == 0,255,0,255; + @assert pixel 48,48 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + expected: green + +- name: 2d.line.miter.within + desc: Miter joins are drawn when the miter limit is not quite exceeded + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineWidth = 400; + ctx.lineJoin = 'miter'; + + ctx.strokeStyle = '#0f0'; + ctx.miterLimit = 1.416; + ctx.beginPath(); + ctx.moveTo(200, 1000); + ctx.lineTo(200, 200); + ctx.lineTo(1000, 201); + ctx.stroke(); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 48,1 == 0,255,0,255; + @assert pixel 48,48 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + expected: green + +- name: 2d.line.miter.valid + desc: Setting miterLimit to valid values works + code: | + ctx.miterLimit = 1.5; + @assert ctx.miterLimit === 1.5; + + ctx.miterLimit = "1e1"; + @assert ctx.miterLimit === 10; + + ctx.miterLimit = 1/1024; + @assert ctx.miterLimit === 1/1024; + + ctx.miterLimit = 1000; + @assert ctx.miterLimit === 1000; + +- name: 2d.line.miter.invalid + desc: Setting miterLimit to invalid values is ignored + code: | + ctx.miterLimit = 1.5; + @assert ctx.miterLimit === 1.5; + + ctx.miterLimit = 1.5; + ctx.miterLimit = 0; + @assert ctx.miterLimit === 1.5; + + ctx.miterLimit = 1.5; + ctx.miterLimit = -1; + @assert ctx.miterLimit === 1.5; + + ctx.miterLimit = 1.5; + ctx.miterLimit = Infinity; + @assert ctx.miterLimit === 1.5; + + ctx.miterLimit = 1.5; + ctx.miterLimit = -Infinity; + @assert ctx.miterLimit === 1.5; + + ctx.miterLimit = 1.5; + ctx.miterLimit = NaN; + @assert ctx.miterLimit === 1.5; + + ctx.miterLimit = 1.5; + ctx.miterLimit = 'string'; + @assert ctx.miterLimit === 1.5; + + ctx.miterLimit = 1.5; + ctx.miterLimit = true; + @assert ctx.miterLimit === 1; + + ctx.miterLimit = 1.5; + ctx.miterLimit = false; + @assert ctx.miterLimit === 1.5; + +- name: 2d.line.cross + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineWidth = 200; + ctx.lineJoin = 'bevel'; + + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(110, 50); + ctx.lineTo(110, 60); + ctx.lineTo(100, 60); + ctx.stroke(); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 48,1 == 0,255,0,255; + @assert pixel 48,48 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + expected: green + +- name: 2d.line.union + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineWidth = 100; + ctx.lineCap = 'round'; + + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(0, 24); + ctx.lineTo(100, 25); + ctx.lineTo(0, 26); + ctx.closePath(); + ctx.stroke(); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 25,1 == 0,255,0,255; + @assert pixel 48,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 25,1 == 0,255,0,255; + @assert pixel 48,48 == 0,255,0,255; + expected: green + +- name: 2d.line.invalid.strokestyle + desc: Verify correct behavior of canvas on an invalid strokeStyle() + code: | + ctx.strokeStyle = 'rgb(0, 255, 0)'; + ctx.strokeStyle = 'nonsense'; + ctx.lineWidth = 200; + ctx.moveTo(0,100); + ctx.lineTo(200,100); + ctx.stroke(); + var imageData = ctx.getImageData(0, 0, 200, 200); + var imgdata = imageData.data; + @assert imgdata[4] == 0; + @assert imgdata[5] == 255; + @assert imgdata[6] == 0; diff --git a/testing/web-platform/tests/html/canvas/tools/yaml-new/path-objects.yaml b/testing/web-platform/tests/html/canvas/tools/yaml-new/path-objects.yaml new file mode 100644 index 0000000000..b1754b9495 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/yaml-new/path-objects.yaml @@ -0,0 +1,3403 @@ +- name: 2d.path.initial + #mozilla: { bug: TODO } + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.closePath(); + ctx.fillStyle = '#f00'; + ctx.fill(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.beginPath + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.rect(0, 0, 100, 50); + ctx.beginPath(); + ctx.fillStyle = '#f00'; + ctx.fill(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.moveTo.basic + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.rect(0, 0, 10, 50); + ctx.moveTo(100, 0); + ctx.lineTo(10, 0); + ctx.lineTo(10, 50); + ctx.lineTo(100, 50); + ctx.fillStyle = '#0f0'; + ctx.fill(); + @assert pixel 90,25 == 0,255,0,255; + expected: green + +- name: 2d.path.moveTo.newsubpath + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.beginPath(); + ctx.moveTo(0, 0); + ctx.moveTo(100, 0); + ctx.moveTo(100, 50); + ctx.moveTo(0, 50); + ctx.fillStyle = '#f00'; + ctx.fill(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.moveTo.multiple + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.moveTo(0, 25); + ctx.moveTo(100, 25); + ctx.moveTo(0, 25); + ctx.lineTo(100, 25); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.moveTo.nonfinite + desc: moveTo() with Infinity/NaN is ignored + code: | + ctx.moveTo(0, 0); + ctx.lineTo(100, 0); + @nonfinite ctx.moveTo(<0 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>); + ctx.lineTo(100, 50); + ctx.lineTo(0, 50); + ctx.fillStyle = '#0f0'; + ctx.fill(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.closePath.empty + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.closePath(); + ctx.fillStyle = '#f00'; + ctx.fill(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.closePath.newline + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.moveTo(-100, 25); + ctx.lineTo(-100, -100); + ctx.lineTo(200, -100); + ctx.lineTo(200, 25); + ctx.closePath(); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.closePath.nextpoint + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.moveTo(-100, 25); + ctx.lineTo(-100, -1000); + ctx.closePath(); + ctx.lineTo(1000, 25); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.lineTo.ensuresubpath.1 + desc: If there is no subpath, the point is added and nothing is drawn + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 50; + ctx.beginPath(); + ctx.lineTo(100, 50); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.lineTo.ensuresubpath.2 + desc: If there is no subpath, the point is added and used for subsequent drawing + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.beginPath(); + ctx.lineTo(0, 25); + ctx.lineTo(100, 25); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.lineTo.basic + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.beginPath(); + ctx.moveTo(0, 25); + ctx.lineTo(100, 25); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.lineTo.nextpoint + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.beginPath(); + ctx.moveTo(-100, -100); + ctx.lineTo(0, 25); + ctx.lineTo(100, 25); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.lineTo.nonfinite + desc: lineTo() with Infinity/NaN is ignored + code: | + ctx.moveTo(0, 0); + ctx.lineTo(100, 0); + @nonfinite ctx.lineTo(<0 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>); + ctx.lineTo(100, 50); + ctx.lineTo(0, 50); + ctx.fillStyle = '#0f0'; + ctx.fill(); + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 90,45 == 0,255,0,255; + expected: green + +- name: 2d.path.lineTo.nonfinite.details + desc: lineTo() with Infinity/NaN for first arg still converts the second arg + code: | + for (var arg1 of [Infinity, -Infinity, NaN]) { + var converted = false; + ctx.lineTo(arg1, { valueOf: function() { converted = true; return 0; } }); + @assert converted; + } + expected: clear + +- name: 2d.path.quadraticCurveTo.ensuresubpath.1 + desc: If there is no subpath, the first control point is added (and nothing is drawn + up to it) + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 50; + ctx.beginPath(); + ctx.quadraticCurveTo(100, 50, 200, 50); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 95,45 == 0,255,0,255; @moz-todo + expected: green + +- name: 2d.path.quadraticCurveTo.ensuresubpath.2 + desc: If there is no subpath, the first control point is added + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.beginPath(); + ctx.quadraticCurveTo(0, 25, 100, 25); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 5,45 == 0,255,0,255; @moz-todo + expected: green + +- name: 2d.path.quadraticCurveTo.basic + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.beginPath(); + ctx.moveTo(0, 25); + ctx.quadraticCurveTo(100, 25, 100, 25); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.quadraticCurveTo.shape + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 55; + ctx.beginPath(); + ctx.moveTo(-1000, 1050); + ctx.quadraticCurveTo(0, -1000, 1200, 1050); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.path.quadraticCurveTo.scaled + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.scale(1000, 1000); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 0.055; + ctx.beginPath(); + ctx.moveTo(-1, 1.05); + ctx.quadraticCurveTo(0, -1, 1.2, 1.05); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.path.quadraticCurveTo.nonfinite + desc: quadraticCurveTo() with Infinity/NaN is ignored + code: | + ctx.moveTo(0, 0); + ctx.lineTo(100, 0); + @nonfinite ctx.quadraticCurveTo(<0 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>); + ctx.lineTo(100, 50); + ctx.lineTo(0, 50); + ctx.fillStyle = '#0f0'; + ctx.fill(); + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 90,45 == 0,255,0,255; + expected: green + +- name: 2d.path.bezierCurveTo.ensuresubpath.1 + desc: If there is no subpath, the first control point is added (and nothing is drawn + up to it) + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 50; + ctx.beginPath(); + ctx.bezierCurveTo(100, 50, 200, 50, 200, 50); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 95,45 == 0,255,0,255; + expected: green + +- name: 2d.path.bezierCurveTo.ensuresubpath.2 + desc: If there is no subpath, the first control point is added + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.beginPath(); + ctx.bezierCurveTo(0, 25, 100, 25, 100, 25); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 5,45 == 0,255,0,255; + expected: green + +- name: 2d.path.bezierCurveTo.basic + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.beginPath(); + ctx.moveTo(0, 25); + ctx.bezierCurveTo(100, 25, 100, 25, 100, 25); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.bezierCurveTo.shape + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 55; + ctx.beginPath(); + ctx.moveTo(-2000, 3100); + ctx.bezierCurveTo(-2000, -1000, 2100, -1000, 2100, 3100); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.path.bezierCurveTo.scaled + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.scale(1000, 1000); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 0.055; + ctx.beginPath(); + ctx.moveTo(-2, 3.1); + ctx.bezierCurveTo(-2, -1, 2.1, -1, 2.1, 3.1); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.path.bezierCurveTo.nonfinite + desc: bezierCurveTo() with Infinity/NaN is ignored + code: | + ctx.moveTo(0, 0); + ctx.lineTo(100, 0); + @nonfinite ctx.bezierCurveTo(<0 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>); + ctx.lineTo(100, 50); + ctx.lineTo(0, 50); + ctx.fillStyle = '#0f0'; + ctx.fill(); + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 90,45 == 0,255,0,255; + expected: green + +- name: 2d.path.arcTo.ensuresubpath.1 + desc: If there is no subpath, the first control point is added (and nothing is drawn + up to it) + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 50; + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.arcTo(100, 50, 200, 50, 0.1); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.arcTo.ensuresubpath.2 + desc: If there is no subpath, the first control point is added + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 50; + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.arcTo(0, 25, 50, 250, 0.1); // adds (x1,y1), draws nothing + ctx.lineTo(100, 25); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.arcTo.coincide.1 + desc: arcTo() has no effect if P0 = P1 + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 50; + + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(0, 25); + ctx.arcTo(0, 25, 50, 1000, 1); + ctx.lineTo(100, 25); + ctx.stroke(); + + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.arcTo(50, 25, 100, 25, 1); + ctx.stroke(); + + @assert pixel 50,1 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 50,48 == 0,255,0,255; + expected: green + +- name: 2d.path.arcTo.coincide.2 + desc: arcTo() draws a straight line to P1 if P1 = P2 + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 50; + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(0, 25); + ctx.arcTo(100, 25, 100, 25, 1); + ctx.stroke(); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.arcTo.collinear.1 + desc: arcTo() with all points on a line, and P1 between P0/P2, draws a straight + line to P1 + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 50; + + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(0, 25); + ctx.arcTo(100, 25, 200, 25, 1); + ctx.stroke(); + + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(-100, 25); + ctx.arcTo(0, 25, 100, 25, 1); + ctx.stroke(); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.arcTo.collinear.2 + desc: arcTo() with all points on a line, and P2 between P0/P1, draws a straight + line to P1 + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 50; + + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(0, 25); + ctx.arcTo(100, 25, 10, 25, 1); + ctx.stroke(); + + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(100, 25); + ctx.arcTo(200, 25, 110, 25, 1); + ctx.stroke(); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.arcTo.collinear.3 + desc: arcTo() with all points on a line, and P0 between P1/P2, draws a straight + line to P1 + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 50; + + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(0, 25); + ctx.arcTo(100, 25, -100, 25, 1); + ctx.stroke(); + + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(100, 25); + ctx.arcTo(200, 25, 0, 25, 1); + ctx.stroke(); + + ctx.beginPath(); + ctx.moveTo(-100, 25); + ctx.arcTo(0, 25, -200, 25, 1); + ctx.stroke(); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.arcTo.shape.curve1 + desc: arcTo() curves in the right kind of shape + code: | + var tol = 1.5; // tolerance to avoid antialiasing artifacts + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.beginPath(); + ctx.moveTo(10, 25); + ctx.arcTo(75, 25, 75, 60, 20); + ctx.stroke(); + + ctx.fillStyle = '#0f0'; + ctx.beginPath(); + ctx.rect(10, 20, 45, 10); + ctx.moveTo(80, 45); + ctx.arc(55, 45, 25+tol, 0, -Math.PI/2, true); + ctx.arc(55, 45, 15-tol, -Math.PI/2, 0, false); + ctx.fill(); + + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 55,19 == 0,255,0,255; + @assert pixel 55,20 == 0,255,0,255; + @assert pixel 55,21 == 0,255,0,255; + @assert pixel 64,22 == 0,255,0,255; + @assert pixel 65,21 == 0,255,0,255; + @assert pixel 72,28 == 0,255,0,255; + @assert pixel 73,27 == 0,255,0,255; + @assert pixel 78,36 == 0,255,0,255; + @assert pixel 79,35 == 0,255,0,255; + @assert pixel 80,44 == 0,255,0,255; + @assert pixel 80,45 == 0,255,0,255; + @assert pixel 80,46 == 0,255,0,255; + @assert pixel 65,45 == 0,255,0,255; + expected: green + +- name: 2d.path.arcTo.shape.curve2 + desc: arcTo() curves in the right kind of shape + code: | + var tol = 1.5; // tolerance to avoid antialiasing artifacts + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#f00'; + ctx.beginPath(); + ctx.rect(10, 20, 45, 10); + ctx.moveTo(80, 45); + ctx.arc(55, 45, 25-tol, 0, -Math.PI/2, true); + ctx.arc(55, 45, 15+tol, -Math.PI/2, 0, false); + ctx.fill(); + + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 10; + ctx.beginPath(); + ctx.moveTo(10, 25); + ctx.arcTo(75, 25, 75, 60, 20); + ctx.stroke(); + + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 55,19 == 0,255,0,255; + @assert pixel 55,20 == 0,255,0,255; + @assert pixel 55,21 == 0,255,0,255; + @assert pixel 64,22 == 0,255,0,255; + @assert pixel 65,21 == 0,255,0,255; + @assert pixel 72,28 == 0,255,0,255; + @assert pixel 73,27 == 0,255,0,255; + @assert pixel 78,36 == 0,255,0,255; + @assert pixel 79,35 == 0,255,0,255; + @assert pixel 80,44 == 0,255,0,255; + @assert pixel 80,45 == 0,255,0,255; + @assert pixel 80,46 == 0,255,0,255; + expected: green + +- name: 2d.path.arcTo.shape.start + desc: arcTo() draws a straight line from P0 to P1 + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.beginPath(); + ctx.moveTo(0, 25); + ctx.arcTo(200, 25, 200, 50, 10); + ctx.stroke(); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.path.arcTo.shape.end + desc: arcTo() does not draw anything from P1 to P2 + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 50; + ctx.beginPath(); + ctx.moveTo(-100, -100); + ctx.arcTo(-100, 25, 200, 25, 10); + ctx.stroke(); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.path.arcTo.negative + desc: arcTo() with negative radius throws an exception + code: | + @assert throws INDEX_SIZE_ERR ctx.arcTo(0, 0, 0, 0, -1); + var path = new Path2D(); + @assert throws INDEX_SIZE_ERR path.arcTo(10, 10, 20, 20, -5); + +- name: 2d.path.arcTo.zero.1 + desc: arcTo() with zero radius draws a straight line from P0 to P1 + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 50; + + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(0, 25); + ctx.arcTo(100, 25, 100, 100, 0); + ctx.stroke(); + + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(0, -25); + ctx.arcTo(50, -25, 50, 50, 0); + ctx.stroke(); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.arcTo.zero.2 + desc: arcTo() with zero radius draws a straight line from P0 to P1, even when all + points are collinear + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 50; + + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(0, 25); + ctx.arcTo(100, 25, -100, 25, 0); + ctx.stroke(); + + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(100, 25); + ctx.arcTo(200, 25, 50, 25, 0); + ctx.stroke(); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.arcTo.transformation + desc: arcTo joins up to the last subpath point correctly + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(0, 50); + ctx.translate(100, 0); + ctx.arcTo(50, 50, 50, 0, 50); + ctx.lineTo(-100, 0); + ctx.fill(); + + @assert pixel 0,0 == 0,255,0,255; + @assert pixel 50,0 == 0,255,0,255; + @assert pixel 99,0 == 0,255,0,255; + @assert pixel 0,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 99,25 == 0,255,0,255; + @assert pixel 0,49 == 0,255,0,255; + @assert pixel 50,49 == 0,255,0,255; + @assert pixel 99,49 == 0,255,0,255; + expected: green + +- name: 2d.path.arcTo.scale + desc: arcTo scales the curve, not just the control points + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(0, 50); + ctx.translate(100, 0); + ctx.scale(0.1, 1); + ctx.arcTo(50, 50, 50, 0, 50); + ctx.lineTo(-1000, 0); + ctx.fill(); + + @assert pixel 0,0 == 0,255,0,255; + @assert pixel 50,0 == 0,255,0,255; + @assert pixel 99,0 == 0,255,0,255; + @assert pixel 0,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 99,25 == 0,255,0,255; + @assert pixel 0,49 == 0,255,0,255; + @assert pixel 50,49 == 0,255,0,255; + @assert pixel 99,49 == 0,255,0,255; + expected: green + +- name: 2d.path.arcTo.nonfinite + desc: arcTo() with Infinity/NaN is ignored + code: | + ctx.moveTo(0, 0); + ctx.lineTo(100, 0); + @nonfinite ctx.arcTo(<0 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>); + ctx.lineTo(100, 50); + ctx.lineTo(0, 50); + ctx.fillStyle = '#0f0'; + ctx.fill(); + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 90,45 == 0,255,0,255; + expected: green + + +- name: 2d.path.arc.empty + desc: arc() with an empty path does not draw a straight line to the start point + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 50; + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.arc(200, 25, 5, 0, 2*Math.PI, true); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.arc.nonempty + desc: arc() with a non-empty path does draw a straight line to the start point + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 50; + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(0, 25); + ctx.arc(200, 25, 5, 0, 2*Math.PI, true); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.arc.end + desc: arc() adds the end point of the arc to the subpath + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 50; + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(-100, 0); + ctx.arc(-100, 0, 25, -Math.PI/2, Math.PI/2, true); + ctx.lineTo(100, 25); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.arc.default + desc: arc() with missing last argument defaults to clockwise + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(100, 0); + ctx.arc(100, 0, 150, -Math.PI, Math.PI/2); + ctx.fill(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.arc.angle.1 + desc: arc() draws pi/2 .. -pi anticlockwise correctly + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(100, 0); + ctx.arc(100, 0, 150, Math.PI/2, -Math.PI, true); + ctx.fill(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.arc.angle.2 + desc: arc() draws -3pi/2 .. -pi anticlockwise correctly + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(100, 0); + ctx.arc(100, 0, 150, -3*Math.PI/2, -Math.PI, true); + ctx.fill(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.arc.angle.3 + desc: arc() wraps angles mod 2pi when anticlockwise and end > start+2pi + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(100, 0); + ctx.arc(100, 0, 150, (512+1/2)*Math.PI, (1024-1)*Math.PI, true); + ctx.fill(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.arc.angle.4 + desc: arc() draws a full circle when clockwise and end > start+2pi + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.arc(50, 25, 60, (512+1/2)*Math.PI, (1024-1)*Math.PI, false); + ctx.fill(); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.path.arc.angle.5 + desc: arc() wraps angles mod 2pi when clockwise and start > end+2pi + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(100, 0); + ctx.arc(100, 0, 150, (1024-1)*Math.PI, (512+1/2)*Math.PI, false); + ctx.fill(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.arc.angle.6 + desc: arc() draws a full circle when anticlockwise and start > end+2pi + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.arc(50, 25, 60, (1024-1)*Math.PI, (512+1/2)*Math.PI, true); + ctx.fill(); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.path.arc.zero.1 + desc: arc() draws nothing when startAngle = endAngle and anticlockwise + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 100; + ctx.beginPath(); + ctx.arc(50, 25, 50, 0, 0, true); + ctx.stroke(); + @assert pixel 50,20 == 0,255,0,255; + expected: green + +- name: 2d.path.arc.zero.2 + desc: arc() draws nothing when startAngle = endAngle and clockwise + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 100; + ctx.beginPath(); + ctx.arc(50, 25, 50, 0, 0, false); + ctx.stroke(); + @assert pixel 50,20 == 0,255,0,255; + expected: green + +- name: 2d.path.arc.twopie.1 + desc: arc() draws nothing when end = start + 2pi-e and anticlockwise + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 100; + ctx.beginPath(); + ctx.arc(50, 25, 50, 0, 2*Math.PI - 1e-4, true); + ctx.stroke(); + @assert pixel 50,20 == 0,255,0,255; + expected: green + +- name: 2d.path.arc.twopie.2 + desc: arc() draws a full circle when end = start + 2pi-e and clockwise + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 100; + ctx.beginPath(); + ctx.arc(50, 25, 50, 0, 2*Math.PI - 1e-4, false); + ctx.stroke(); + @assert pixel 50,20 == 0,255,0,255; + expected: green + +- name: 2d.path.arc.twopie.3 + desc: arc() draws a full circle when end = start + 2pi+e and anticlockwise + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 100; + ctx.beginPath(); + ctx.arc(50, 25, 50, 0, 2*Math.PI + 1e-4, true); + ctx.stroke(); + @assert pixel 50,20 == 0,255,0,255; + expected: green + +- name: 2d.path.arc.twopie.4 + desc: arc() draws nothing when end = start + 2pi+e and clockwise + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 100; + ctx.beginPath(); + ctx.arc(50, 25, 50, 0, 2*Math.PI + 1e-4, false); + ctx.stroke(); + @assert pixel 50,20 == 0,255,0,255; + expected: green + +- name: 2d.path.arc.twopie.5 + desc: arc() draws correctly when start = 2 and end = start + 2pi+e and clockwise + code: | + ctx.fillStyle = '#fff'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#000'; + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.arc(50, 25, 50, 2, 2 + 2*Math.PI, false); + ctx.closePath(); + ctx.fill(); + @assert pixel 95,25 == 0,0,0,255; + +- name: 2d.path.arc.twopie.6 + desc: arc() draws correctly when start = 5 and end = start + 2pi+e and clockwise + code: | + ctx.fillStyle = '#fff'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#000'; + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.arc(50, 25, 50, 5, 5 + 2*Math.PI, false); + ctx.closePath(); + ctx.fill(); + @assert pixel 5,25 == 0,0,0,255; + +- name: 2d.path.arc.shape.1 + desc: arc() from 0 to pi does not draw anything in the wrong half + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 50; + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.arc(50, 50, 50, 0, Math.PI, false); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 20,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.path.arc.shape.2 + desc: arc() from 0 to pi draws stuff in the right half + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 100; + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.arc(50, 50, 50, 0, Math.PI, true); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 20,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.path.arc.shape.3 + desc: arc() from 0 to -pi/2 does not draw anything in the wrong quadrant + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 100; + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.arc(0, 50, 50, 0, -Math.PI/2, false); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; @moz-todo + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.path.arc.shape.4 + desc: arc() from 0 to -pi/2 draws stuff in the right quadrant + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 150; + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.arc(-50, 50, 100, 0, -Math.PI/2, true); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.path.arc.shape.5 + desc: arc() from 0 to 5pi does not draw crazy things + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 200; + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.arc(300, 0, 100, 0, 5*Math.PI, false); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.path.arc.selfintersect.1 + desc: arc() with lineWidth > 2*radius is drawn sensibly + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 200; + ctx.strokeStyle = '#f00'; + ctx.beginPath(); + ctx.arc(100, 50, 25, 0, -Math.PI/2, true); + ctx.stroke(); + ctx.beginPath(); + ctx.arc(0, 0, 25, 0, -Math.PI/2, true); + ctx.stroke(); + @assert pixel 1,1 == 0,255,0,255; @moz-todo + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.arc.selfintersect.2 + desc: arc() with lineWidth > 2*radius is drawn sensibly + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 180; + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.arc(-50, 50, 25, 0, -Math.PI/2, true); + ctx.stroke(); + ctx.beginPath(); + ctx.arc(100, 0, 25, 0, -Math.PI/2, true); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 90,10 == 0,255,0,255; + @assert pixel 97,1 == 0,255,0,255; + @assert pixel 97,2 == 0,255,0,255; + @assert pixel 97,3 == 0,255,0,255; + @assert pixel 2,48 == 0,255,0,255; + expected: green + +- name: 2d.path.arc.negative + desc: arc() with negative radius throws INDEX_SIZE_ERR + code: | + @assert throws INDEX_SIZE_ERR ctx.arc(0, 0, -1, 0, 0, true); + var path = new Path2D(); + @assert throws INDEX_SIZE_ERR path.arc(10, 10, -5, 0, 1, false); + +- name: 2d.path.arc.zeroradius + desc: arc() with zero radius draws a line to the start point + code: | + ctx.fillStyle = '#f00' + ctx.fillRect(0, 0, 100, 50); + ctx.lineWidth = 50; + ctx.strokeStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(0, 25); + ctx.arc(200, 25, 0, 0, Math.PI, true); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.arc.scale.1 + desc: Non-uniformly scaled arcs are the right shape + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.scale(2, 0.5); + ctx.fillStyle = '#0f0'; + ctx.beginPath(); + ctx.arc(25, 50, 56, 0, 2*Math.PI, false); + ctx.fill(); + ctx.fillStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(-25, 50); + ctx.arc(-25, 50, 24, 0, 2*Math.PI, false); + ctx.moveTo(75, 50); + ctx.arc(75, 50, 24, 0, 2*Math.PI, false); + ctx.moveTo(25, -25); + ctx.arc(25, -25, 24, 0, 2*Math.PI, false); + ctx.moveTo(25, 125); + ctx.arc(25, 125, 24, 0, 2*Math.PI, false); + ctx.fill(); + + @assert pixel 0,0 == 0,255,0,255; + @assert pixel 50,0 == 0,255,0,255; + @assert pixel 99,0 == 0,255,0,255; + @assert pixel 0,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 99,25 == 0,255,0,255; + @assert pixel 0,49 == 0,255,0,255; + @assert pixel 50,49 == 0,255,0,255; + @assert pixel 99,49 == 0,255,0,255; + expected: green + +- name: 2d.path.arc.scale.2 + desc: Highly scaled arcs are the right shape + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.scale(100, 100); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 1.2; + ctx.beginPath(); + ctx.arc(0, 0, 0.6, 0, Math.PI/2, false); + ctx.stroke(); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 50,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 98,25 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 50,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.path.arc.nonfinite + desc: arc() with Infinity/NaN is ignored + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.moveTo(0, 0); + ctx.lineTo(100, 0); + @nonfinite ctx.arc(<0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <2*Math.PI Infinity -Infinity NaN>, ); + ctx.lineTo(100, 50); + ctx.lineTo(0, 50); + ctx.fillStyle = '#0f0'; + ctx.fill(); + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 90,45 == 0,255,0,255; + expected: green + + +- name: 2d.path.rect.basic + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.rect(0, 0, 100, 50); + ctx.fill(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.rect.newsubpath + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.beginPath(); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 50; + ctx.moveTo(-100, 25); + ctx.lineTo(-50, 25); + ctx.rect(200, 25, 1, 1); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.rect.closed + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 200; + ctx.lineJoin = 'miter'; + ctx.rect(100, 50, 100, 100); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.rect.end.1 + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 100; + ctx.rect(200, 100, 400, 1000); + ctx.lineTo(-2000, -1000); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.rect.end.2 + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 450; + ctx.lineCap = 'round'; + ctx.lineJoin = 'bevel'; + ctx.rect(150, 150, 2000, 2000); + ctx.lineTo(160, 160); + ctx.stroke(); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.path.rect.zero.1 + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 100; + ctx.beginPath(); + ctx.rect(0, 50, 100, 0); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.rect.zero.2 + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 100; + ctx.beginPath(); + ctx.rect(50, -100, 0, 250); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.rect.zero.3 + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 100; + ctx.beginPath(); + ctx.rect(50, 25, 0, 0); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.rect.zero.4 + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.rect(100, 25, 0, 0); + ctx.lineTo(0, 25); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.rect.zero.5 + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 50; + ctx.moveTo(0, 0); + ctx.rect(100, 25, 0, 0); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.rect.zero.6 + #mozilla: { bug: TODO } + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineJoin = 'miter'; + ctx.miterLimit = 1.5; + ctx.lineWidth = 200; + ctx.beginPath(); + ctx.rect(100, 25, 1000, 0); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; @moz-todo + expected: green + +- name: 2d.path.rect.negative + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.beginPath(); + ctx.fillStyle = '#0f0'; + ctx.rect(0, 0, 50, 25); + ctx.rect(100, 0, -50, 25); + ctx.rect(0, 50, 50, -25); + ctx.rect(100, 50, -50, -25); + ctx.fill(); + @assert pixel 25,12 == 0,255,0,255; + @assert pixel 75,12 == 0,255,0,255; + @assert pixel 25,37 == 0,255,0,255; + @assert pixel 75,37 == 0,255,0,255; + +- name: 2d.path.rect.winding + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.beginPath(); + ctx.fillStyle = '#f00'; + ctx.rect(0, 0, 50, 50); + ctx.rect(100, 50, -50, -50); + ctx.rect(0, 25, 100, -25); + ctx.rect(100, 25, -100, 25); + ctx.fill(); + @assert pixel 25,12 == 0,255,0,255; + @assert pixel 75,12 == 0,255,0,255; + @assert pixel 25,37 == 0,255,0,255; + @assert pixel 75,37 == 0,255,0,255; + +- name: 2d.path.rect.selfintersect + #mozilla: { bug: TODO } + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 90; + ctx.beginPath(); + ctx.rect(45, 20, 10, 10); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; @moz-todo + expected: green + +- name: 2d.path.rect.nonfinite + desc: rect() with Infinity/NaN is ignored + code: | + ctx.moveTo(0, 0); + ctx.lineTo(100, 0); + @nonfinite ctx.rect(<0 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>, <1 Infinity -Infinity NaN>, <1 Infinity -Infinity NaN>); + ctx.lineTo(100, 50); + ctx.lineTo(0, 50); + ctx.fillStyle = '#0f0'; + ctx.fill(); + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 90,45 == 0,255,0,255; + expected: green + +- name: 2d.path.roundrect.newsubpath + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.beginPath(); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 50; + ctx.moveTo(-100, 25); + ctx.lineTo(-50, 25); + ctx.roundRect(200, 25, 1, 1, [0]); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.roundrect.closed + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 200; + ctx.lineJoin = 'miter'; + ctx.roundRect(100, 50, 100, 100, [0]); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.roundrect.end.1 + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 100; + ctx.roundRect(200, 100, 400, 1000, [0]); + ctx.lineTo(-2000, -1000); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.roundrect.end.2 + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 450; + ctx.lineCap = 'round'; + ctx.lineJoin = 'bevel'; + ctx.roundRect(150, 150, 2000, 2000, [0]); + ctx.lineTo(160, 160); + ctx.stroke(); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.path.roundrect.end.3 + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 100; + ctx.roundRect(101, 51, 2000, 2000, [500, 500, 500, 500]); + ctx.lineTo(-1, -1); + ctx.stroke(); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.path.roundrect.end.4 + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.roundRect(-1, -1, 2000, 2000, [1000, 1000, 1000, 1000]); + ctx.lineTo(-150, -150); + ctx.stroke(); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.path.roundrect.zero.1 + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 100; + ctx.beginPath(); + ctx.roundRect(0, 50, 100, 0, [0]); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.roundrect.zero.2 + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 100; + ctx.beginPath(); + ctx.roundRect(50, -100, 0, 250, [0]); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.roundrect.zero.3 + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 100; + ctx.beginPath(); + ctx.roundRect(50, 25, 0, 0, [0]); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.roundrect.zero.4 + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 50; + ctx.roundRect(100, 25, 0, 0, [0]); + ctx.lineTo(0, 25); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.roundrect.zero.5 + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 50; + ctx.moveTo(0, 0); + ctx.roundRect(100, 25, 0, 0, [0]); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.roundrect.zero.6 + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.lineJoin = 'miter'; + ctx.miterLimit = 1.5; + ctx.lineWidth = 200; + ctx.beginPath(); + ctx.roundRect(100, 25, 1000, 0, [0]); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.roundrect.negative + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.beginPath(); + ctx.fillStyle = '#0f0'; + ctx.roundRect(0, 0, 50, 25, [10, 0, 0, 0]); + ctx.roundRect(100, 0, -50, 25, [10, 0, 0, 0]); + ctx.roundRect(0, 50, 50, -25, [10, 0, 0, 0]); + ctx.roundRect(100, 50, -50, -25, [10, 0, 0, 0]); + ctx.fill(); + // All rects drawn + @assert pixel 25,12 == 0,255,0,255; + @assert pixel 75,12 == 0,255,0,255; + @assert pixel 25,37 == 0,255,0,255; + @assert pixel 75,37 == 0,255,0,255; + // Correct corners are rounded. + @assert pixel 1,1 == 255,0,0,255; + @assert pixel 98,1 == 255,0,0,255; + @assert pixel 1,48 == 255,0,0,255; + @assert pixel 98,48 == 255,0,0,255; + +- name: 2d.path.roundrect.winding + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.beginPath(); + ctx.fillStyle = '#f00'; + ctx.roundRect(0, 0, 50, 50, [0]); + ctx.roundRect(100, 50, -50, -50, [0]); + ctx.roundRect(0, 25, 100, -25, [0]); + ctx.roundRect(100, 25, -100, 25, [0]); + ctx.fill(); + @assert pixel 25,12 == 0,255,0,255; + @assert pixel 75,12 == 0,255,0,255; + @assert pixel 25,37 == 0,255,0,255; + @assert pixel 75,37 == 0,255,0,255; + +- name: 2d.path.roundrect.selfintersect + code: | + ctx.fillStyle = '#f00'; + ctx.roundRect(0, 0, 100, 50, [0]); + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 90; + ctx.beginPath(); + ctx.roundRect(45, 20, 10, 10, [0]); + ctx.stroke(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.roundrect.nonfinite + desc: roundRect() with Infinity/NaN is ignored + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50) + ctx.moveTo(0, 0); + ctx.lineTo(100, 0); + @nonfinite ctx.roundRect(<0 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>, <1 Infinity -Infinity NaN>, <1 Infinity -Infinity NaN>, <[0] [Infinity] [-Infinity] [NaN] [Infinity,0] [-Infinity,0] [NaN,0] [0,Infinity] [0,-Infinity] [0,NaN] [Infinity,0,0] [-Infinity,0,0] [NaN,0,0] [0,Infinity,0] [0,-Infinity,0] [0,NaN,0] [0,0,Infinity] [0,0,-Infinity] [0,0,NaN] [Infinity,0,0,0] [-Infinity,0,0,0] [NaN,0,0,0] [0,Infinity,0,0] [0,-Infinity,0,0] [0,NaN,0,0] [0,0,Infinity,0] [0,0,-Infinity,0] [0,0,NaN,0] [0,0,0,Infinity] [0,0,0,-Infinity] [0,0,0,NaN]>); + ctx.roundRect(0, 0, 100, 100, [new DOMPoint(10, Infinity)]); + ctx.roundRect(0, 0, 100, 100, [new DOMPoint(10, -Infinity)]); + ctx.roundRect(0, 0, 100, 100, [new DOMPoint(10, NaN)]); + ctx.roundRect(0, 0, 100, 100, [new DOMPoint(Infinity, 10)]); + ctx.roundRect(0, 0, 100, 100, [new DOMPoint(-Infinity, 10)]); + ctx.roundRect(0, 0, 100, 100, [new DOMPoint(NaN, 10)]); + ctx.roundRect(0, 0, 100, 100, [{x: 10, y: Infinity}]); + ctx.roundRect(0, 0, 100, 100, [{x: 10, y: -Infinity}]); + ctx.roundRect(0, 0, 100, 100, [{x: 10, y: NaN}]); + ctx.roundRect(0, 0, 100, 100, [{x: Infinity, y: 10}]); + ctx.roundRect(0, 0, 100, 100, [{x: -Infinity, y: 10}]); + ctx.roundRect(0, 0, 100, 100, [{x: NaN, y: 10}]); + ctx.lineTo(100, 50); + ctx.lineTo(0, 50); + ctx.fillStyle = '#0f0'; + ctx.fill(); + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 90,45 == 0,255,0,255; + expected: green + +- name: 2d.path.roundrect.4.radii.1.double + desc: Verify that when four radii are given to roundRect(), the first radius, specified as a double, applies to the top-left corner. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [20, 0, 0, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + @assert pixel 1,1 == 255,0,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + +- name: 2d.path.roundrect.4.radii.1.dompoint + desc: Verify that when four radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left corner. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20), 0, 0, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-left corner + @assert pixel 20,1 == 255,0,0,255; + @assert pixel 41,1 == 0,255,0,255; + @assert pixel 1,10 == 255,0,0,255; + @assert pixel 1,21 == 0,255,0,255; + + // other corners + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + +- name: 2d.path.roundrect.4.radii.1.dompointinit + desc: Verify that when four radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left corner. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0, 0, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-left corner + @assert pixel 20,1 == 255,0,0,255; + @assert pixel 41,1 == 0,255,0,255; + @assert pixel 1,10 == 255,0,0,255; + @assert pixel 1,21 == 0,255,0,255; + + // other corners + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + +- name: 2d.path.roundrect.4.radii.2.double + desc: Verify that when four radii are given to roundRect(), the second radius, specified as a double, applies to the top-right corner. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, 20, 0, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 255,0,0,255; + @assert pixel 98,48 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + +- name: 2d.path.roundrect.4.radii.2.dompoint + desc: Verify that when four radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right corner. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, new DOMPoint(40, 20), 0, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-right corner + @assert pixel 79,1 == 255,0,0,255; + @assert pixel 58,1 == 0,255,0,255; + @assert pixel 98,10 == 255,0,0,255; + @assert pixel 98,21 == 0,255,0,255; + + // other corners + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + +- name: 2d.path.roundrect.4.radii.2.dompointinit + desc: Verify that when four radii are given to roundRect(), the second radius, specified as a DOMPointInit, applies to the top-right corner. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}, 0, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-right corner + @assert pixel 79,1 == 255,0,0,255; + @assert pixel 58,1 == 0,255,0,255; + @assert pixel 98,10 == 255,0,0,255; + @assert pixel 98,21 == 0,255,0,255; + + // other corners + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + +- name: 2d.path.roundrect.4.radii.3.double + desc: Verify that when four radii are given to roundRect(), the third radius, specified as a double, applies to the bottom-right corner. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, 0, 20, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 98,48 == 255,0,0,255; + @assert pixel 1,48 == 0,255,0,255; + +- name: 2d.path.roundrect.4.radii.3.dompoint + desc: Verify that when four radii are given to roundRect(), the third radius, specified as a DOMPoint, applies to the bottom-right corner. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, 0, new DOMPoint(40, 20), 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // bottom-right corner + @assert pixel 79,48 == 255,0,0,255; + @assert pixel 58,48 == 0,255,0,255; + @assert pixel 98,39 == 255,0,0,255; + @assert pixel 98,28 == 0,255,0,255; + + // other corners + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + +- name: 2d.path.roundrect.4.radii.3.dompointinit + desc: Verify that when four radii are given to roundRect(), the third radius, specified as a DOMPointInit, applies to the bottom-right corner. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, 0, {x: 40, y: 20}, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // bottom-right corner + @assert pixel 79,48 == 255,0,0,255; + @assert pixel 58,48 == 0,255,0,255; + @assert pixel 98,39 == 255,0,0,255; + @assert pixel 98,28 == 0,255,0,255; + + // other corners + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + +- name: 2d.path.roundrect.4.radii.4.double + desc: Verify that when four radii are given to roundRect(), the fourth radius, specified as a double, applies to the bottom-left corner. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, 0, 0, 20]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + @assert pixel 1,48 == 255,0,0,255; + +- name: 2d.path.roundrect.4.radii.4.dompoint + desc: Verify that when four radii are given to roundRect(), the fourth radius, specified as a DOMPoint, applies to the bottom-left corner. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, 0, 0, new DOMPoint(40, 20)]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // bottom-left corner + @assert pixel 20,48 == 255,0,0,255; + @assert pixel 41,48 == 0,255,0,255; + @assert pixel 1,39 == 255,0,0,255; + @assert pixel 1,28 == 0,255,0,255; + + // other corners + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + +- name: 2d.path.roundrect.4.radii.4.dompointinit + desc: Verify that when four radii are given to roundRect(), the fourth radius, specified as a DOMPointInit, applies to the bottom-left corner. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, 0, 0, {x: 40, y: 20}]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // bottom-left corner + @assert pixel 20,48 == 255,0,0,255; + @assert pixel 41,48 == 0,255,0,255; + @assert pixel 1,39 == 255,0,0,255; + @assert pixel 1,28 == 0,255,0,255; + + // other corners + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + +- name: 2d.path.roundrect.3.radii.1.double + desc: Verify that when three radii are given to roundRect(), the first radius, specified as a double, applies to the top-left corner. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [20, 0, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + @assert pixel 1,1 == 255,0,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + +- name: 2d.path.roundrect.3.radii.1.dompoint + desc: Verify that when three radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left corner. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20), 0, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-left corner + @assert pixel 20,1 == 255,0,0,255; + @assert pixel 41,1 == 0,255,0,255; + @assert pixel 1,10 == 255,0,0,255; + @assert pixel 1,21 == 0,255,0,255; + + // other corners + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + +- name: 2d.path.roundrect.3.radii.1.dompointinit + desc: Verify that when three radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left corner. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-left corner + @assert pixel 20,1 == 255,0,0,255; + @assert pixel 41,1 == 0,255,0,255; + @assert pixel 1,10 == 255,0,0,255; + @assert pixel 1,21 == 0,255,0,255; + + // other corners + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + +- name: 2d.path.roundrect.3.radii.2.double + desc: Verify that when three radii are given to roundRect(), the second radius, specified as a double, applies to the top-right and bottom-left corners. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, 20, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 255,0,0,255; + @assert pixel 98,48 == 0,255,0,255; + @assert pixel 1,48 == 255,0,0,255; + +- name: 2d.path.roundrect.3.radii.2.dompoint + desc: Verify that when three radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottom-left corners. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, new DOMPoint(40, 20), 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-right corner + @assert pixel 79,1 == 255,0,0,255; + @assert pixel 58,1 == 0,255,0,255; + @assert pixel 98,10 == 255,0,0,255; + @assert pixel 98,21 == 0,255,0,255; + + // bottom-left corner + @assert pixel 20,48 == 255,0,0,255; + @assert pixel 41,48 == 0,255,0,255; + @assert pixel 1,39 == 255,0,0,255; + @assert pixel 1,28 == 0,255,0,255; + + // other corners + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + +- name: 2d.path.roundrect.3.radii.2.dompointinit + desc: Verify that when three radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottom-left corners. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-right corner + @assert pixel 79,1 == 255,0,0,255; + @assert pixel 58,1 == 0,255,0,255; + @assert pixel 98,10 == 255,0,0,255; + @assert pixel 98,21 == 0,255,0,255; + + // bottom-left corner + @assert pixel 20,48 == 255,0,0,255; + @assert pixel 41,48 == 0,255,0,255; + @assert pixel 1,39 == 255,0,0,255; + @assert pixel 1,28 == 0,255,0,255; + + // other corners + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + +- name: 2d.path.roundrect.3.radii.3.double + desc: Verify that when three radii are given to roundRect(), the third radius, specified as a double, applies to the bottom-right corner. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, 0, 20]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 98,48 == 255,0,0,255; + @assert pixel 1,48 == 0,255,0,255; + +- name: 2d.path.roundrect.3.radii.3.dompoint + desc: Verify that when three radii are given to roundRect(), the third radius, specified as a DOMPoint, applies to the bottom-right corner. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, 0, new DOMPoint(40, 20)]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // bottom-right corner + @assert pixel 79,48 == 255,0,0,255; + @assert pixel 58,48 == 0,255,0,255; + @assert pixel 98,39 == 255,0,0,255; + @assert pixel 98,28 == 0,255,0,255; + + // other corners + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + +- name: 2d.path.roundrect.3.radii.3.dompointinit + desc: Verify that when three radii are given to roundRect(), the third radius, specified as a DOMPointInit, applies to the bottom-right corner. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, 0, {x: 40, y: 20}]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // bottom-right corner + @assert pixel 79,48 == 255,0,0,255; + @assert pixel 58,48 == 0,255,0,255; + @assert pixel 98,39 == 255,0,0,255; + @assert pixel 98,28 == 0,255,0,255; + + // other corners + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + +- name: 2d.path.roundrect.2.radii.1.double + desc: Verify that when two radii are given to roundRect(), the first radius, specified as a double, applies to the top-left and bottom-right corners. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [20, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + @assert pixel 1,1 == 255,0,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 98,48 == 255,0,0,255; + @assert pixel 1,48 == 0,255,0,255; + +- name: 2d.path.roundrect.2.radii.1.dompoint + desc: Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left and bottom-right corners. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20), 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-left corner + @assert pixel 20,1 == 255,0,0,255; + @assert pixel 41,1 == 0,255,0,255; + @assert pixel 1,10 == 255,0,0,255; + @assert pixel 1,21 == 0,255,0,255; + + // bottom-right corner + @assert pixel 79,48 == 255,0,0,255; + @assert pixel 58,48 == 0,255,0,255; + @assert pixel 98,39 == 255,0,0,255; + @assert pixel 98,28 == 0,255,0,255; + + // other corners + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + +- name: 2d.path.roundrect.2.radii.1.dompointinit + desc: Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left and bottom-right corners. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-left corner + @assert pixel 20,1 == 255,0,0,255; + @assert pixel 41,1 == 0,255,0,255; + @assert pixel 1,10 == 255,0,0,255; + @assert pixel 1,21 == 0,255,0,255; + + // bottom-right corner + @assert pixel 79,48 == 255,0,0,255; + @assert pixel 58,48 == 0,255,0,255; + @assert pixel 98,39 == 255,0,0,255; + @assert pixel 98,28 == 0,255,0,255; + + // other corners + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + +- name: 2d.path.roundrect.2.radii.2.double + desc: Verify that when two radii are given to roundRect(), the second radius, specified as a double, applies to the top-right and bottom-left corners. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, 20]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 255,0,0,255; + @assert pixel 98,48 == 0,255,0,255; + @assert pixel 1,48 == 255,0,0,255; + +- name: 2d.path.roundrect.2.radii.2.dompoint + desc: Verify that when two radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottom-left corners. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, new DOMPoint(40, 20)]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-right corner + @assert pixel 79,1 == 255,0,0,255; + @assert pixel 58,1 == 0,255,0,255; + @assert pixel 98,10 == 255,0,0,255; + @assert pixel 98,21 == 0,255,0,255; + + // bottom-left corner + @assert pixel 20,48 == 255,0,0,255; + @assert pixel 41,48 == 0,255,0,255; + @assert pixel 1,39 == 255,0,0,255; + @assert pixel 1,28 == 0,255,0,255; + + // other corners + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + +- name: 2d.path.roundrect.2.radii.2.dompointinit + desc: Verify that when two radii are given to roundRect(), the second radius, specified as a DOMPointInit, applies to the top-right and bottom-left corners. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-right corner + @assert pixel 79,1 == 255,0,0,255; + @assert pixel 58,1 == 0,255,0,255; + @assert pixel 98,10 == 255,0,0,255; + @assert pixel 98,21 == 0,255,0,255; + + // bottom-left corner + @assert pixel 20,48 == 255,0,0,255; + @assert pixel 41,48 == 0,255,0,255; + @assert pixel 1,39 == 255,0,0,255; + @assert pixel 1,28 == 0,255,0,255; + + // other corners + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + +- name: 2d.path.roundrect.1.radius.double + desc: Verify that when one radius is given to roundRect(), specified as a double, it applies to all corners. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [20]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + @assert pixel 1,1 == 255,0,0,255; + @assert pixel 98,1 == 255,0,0,255; + @assert pixel 98,48 == 255,0,0,255; + @assert pixel 1,48 == 255,0,0,255; + +- name: 2d.path.roundrect.1.radius.double.single.argument + desc: Verify that when one radius is given to roundRect() as a non-array argument, specified as a double, it applies to all corners. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, 20); + ctx.fillStyle = '#0f0'; + ctx.fill(); + @assert pixel 1,1 == 255,0,0,255; + @assert pixel 98,1 == 255,0,0,255; + @assert pixel 98,48 == 255,0,0,255; + @assert pixel 1,48 == 255,0,0,255; + +- name: 2d.path.roundrect.1.radius.dompoint + desc: Verify that when one radius is given to roundRect(), specified as a DOMPoint, it applies to all corners. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20)]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-left corner + @assert pixel 20,1 == 255,0,0,255; + @assert pixel 41,1 == 0,255,0,255; + @assert pixel 1,10 == 255,0,0,255; + @assert pixel 1,21 == 0,255,0,255; + + // top-right corner + @assert pixel 79,1 == 255,0,0,255; + @assert pixel 58,1 == 0,255,0,255; + @assert pixel 98,10 == 255,0,0,255; + @assert pixel 98,21 == 0,255,0,255; + + // bottom-right corner + @assert pixel 79,48 == 255,0,0,255; + @assert pixel 58,48 == 0,255,0,255; + @assert pixel 98,39 == 255,0,0,255; + @assert pixel 98,28 == 0,255,0,255; + + // bottom-left corner + @assert pixel 20,48 == 255,0,0,255; + @assert pixel 41,48 == 0,255,0,255; + @assert pixel 1,39 == 255,0,0,255; + @assert pixel 1,28 == 0,255,0,255; + +- name: 2d.path.roundrect.1.radius.dompoint.single argument + desc: Verify that when one radius is given to roundRect() as a non-array argument, specified as a DOMPoint, it applies to all corners. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, new DOMPoint(40, 20)); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-left corner + @assert pixel 20,1 == 255,0,0,255; + @assert pixel 41,1 == 0,255,0,255; + @assert pixel 1,10 == 255,0,0,255; + @assert pixel 1,21 == 0,255,0,255; + + // top-right corner + @assert pixel 79,1 == 255,0,0,255; + @assert pixel 58,1 == 0,255,0,255; + @assert pixel 98,10 == 255,0,0,255; + @assert pixel 98,21 == 0,255,0,255; + + // bottom-right corner + @assert pixel 79,48 == 255,0,0,255; + @assert pixel 58,48 == 0,255,0,255; + @assert pixel 98,39 == 255,0,0,255; + @assert pixel 98,28 == 0,255,0,255; + + // bottom-left corner + @assert pixel 20,48 == 255,0,0,255; + @assert pixel 41,48 == 0,255,0,255; + @assert pixel 1,39 == 255,0,0,255; + @assert pixel 1,28 == 0,255,0,255; + +- name: 2d.path.roundrect.1.radius.dompointinit + desc: Verify that when one radius is given to roundRect(), specified as a DOMPointInit, applies to all corners. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-left corner + @assert pixel 20,1 == 255,0,0,255; + @assert pixel 41,1 == 0,255,0,255; + @assert pixel 1,10 == 255,0,0,255; + @assert pixel 1,21 == 0,255,0,255; + + // top-right corner + @assert pixel 79,1 == 255,0,0,255; + @assert pixel 58,1 == 0,255,0,255; + @assert pixel 98,10 == 255,0,0,255; + @assert pixel 98,21 == 0,255,0,255; + + // bottom-right corner + @assert pixel 79,48 == 255,0,0,255; + @assert pixel 58,48 == 0,255,0,255; + @assert pixel 98,39 == 255,0,0,255; + @assert pixel 98,28 == 0,255,0,255; + + // bottom-left corner + @assert pixel 20,48 == 255,0,0,255; + @assert pixel 41,48 == 0,255,0,255; + @assert pixel 1,39 == 255,0,0,255; + @assert pixel 1,28 == 0,255,0,255; + +- name: 2d.path.roundrect.1.radius.dompointinit.single.argument + desc: Verify that when one radius is given to roundRect() as a non-array argument, specified as a DOMPointInit, applies to all corners. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, {x: 40, y: 20}); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + // top-left corner + @assert pixel 20,1 == 255,0,0,255; + @assert pixel 41,1 == 0,255,0,255; + @assert pixel 1,10 == 255,0,0,255; + @assert pixel 1,21 == 0,255,0,255; + + // top-right corner + @assert pixel 79,1 == 255,0,0,255; + @assert pixel 58,1 == 0,255,0,255; + @assert pixel 98,10 == 255,0,0,255; + @assert pixel 98,21 == 0,255,0,255; + + // bottom-right corner + @assert pixel 79,48 == 255,0,0,255; + @assert pixel 58,48 == 0,255,0,255; + @assert pixel 98,39 == 255,0,0,255; + @assert pixel 98,28 == 0,255,0,255; + + // bottom-left corner + @assert pixel 20,48 == 255,0,0,255; + @assert pixel 41,48 == 0,255,0,255; + @assert pixel 1,39 == 255,0,0,255; + @assert pixel 1,28 == 0,255,0,255; + +- name: 2d.path.roundrect.radius.intersecting.1 + desc: Check that roundRects with intersecting corner arcs are rendered correctly. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [40, 40, 40, 40]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + @assert pixel 2,25 == 0,255,0,255; + @assert pixel 50,1 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 50,48 == 0,255,0,255; + @assert pixel 97,25 == 0,255,0,255; + @assert pixel 1,1 == 255,0,0,255; + @assert pixel 98,1 == 255,0,0,255; + @assert pixel 1,48 == 255,0,0,255; + @assert pixel 98,48 == 255,0,0,255; + +- name: 2d.path.roundrect.radius.intersecting.2 + desc: Check that roundRects with intersecting corner arcs are rendered correctly. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(0, 0, 100, 50, [1000, 1000, 1000, 1000]); + ctx.fillStyle = '#0f0'; + ctx.fill(); + @assert pixel 2,25 == 0,255,0,255; + @assert pixel 50,1 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 50,48 == 0,255,0,255; + @assert pixel 97,25 == 0,255,0,255; + @assert pixel 1,1 == 255,0,0,255; + @assert pixel 98,1 == 255,0,0,255; + @assert pixel 1,48 == 255,0,0,255; + @assert pixel 98,48 == 255,0,0,255; + +- name: 2d.path.roundrect.radius.none + desc: Check that roundRect throws an RangeError if radii is an empty array. + code: | + assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 100, 50, [])}); + +- name: 2d.path.roundrect.radius.noargument + desc: Check that roundRect draws a rectangle when no radii are provided. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.roundRect(10, 10, 80, 30); + ctx.fillStyle = '#0f0'; + ctx.fill(); + // upper left corner (10, 10) + @assert pixel 10,9 == 255,0,0,255; + @assert pixel 9,10 == 255,0,0,255; + @assert pixel 10,10 == 0,255,0,255; + + // upper right corner (89, 10) + @assert pixel 90,10 == 255,0,0,255; + @assert pixel 89,9 == 255,0,0,255; + @assert pixel 89,10 == 0,255,0,255; + + // lower right corner (89, 39) + @assert pixel 89,40 == 255,0,0,255; + @assert pixel 90,39 == 255,0,0,255; + @assert pixel 89,39 == 0,255,0,255; + + // lower left corner (10, 30) + @assert pixel 9,39 == 255,0,0,255; + @assert pixel 10,40 == 255,0,0,255; + @assert pixel 10,39 == 0,255,0,255; + +- name: 2d.path.roundrect.radius.toomany + desc: Check that roundRect throws an IndeSizeError if radii has more than four items. + code: | + assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 100, 50, [0, 0, 0, 0, 0])}); + +- name: 2d.path.roundrect.radius.negative + desc: roundRect() with negative radius throws an exception + code: | + assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [-1])}); + assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [1, -1])}); + assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [new DOMPoint(-1, 1), 1])}); + assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [new DOMPoint(1, -1)])}); + assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [{x: -1, y: 1}, 1])}); + assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [{x: 1, y: -1}])}); + +- name: 2d.path.roundrect.badinput + desc: roundRect() throws or does not throw errors given the strange inputs. + code: | + ctx.roundRect(0, 0, 100, 100, { foo: "bar" }); //=> DOMPointInit + ctx.roundRect(0, 0, 100, 100, undefined); //=> "missing" -> 0 + ctx.roundRect(0, 0, 100, 100, [[]]); //=> « DOMPointInit » + ctx.roundRect(0, 0, 100, 100, [[25]]); //=> « DOMPointInit » + ctx.roundRect(0, 0, 100, 100, [undefined]); //=> « DOMPointInit » + @assert throws TypeError ctx.roundRect(0, 0, 100, 100, 0n); + @assert throws TypeError ctx.roundRect(0, 0, 100, 100, { x: 0n }); + @assert throws TypeError ctx.roundRect(0, 0, 100, 100, [{ x: 0n }]); + +- name: 2d.path.ellipse.basics + desc: Verify canvas throws error when drawing ellipse with negative radii. + code: | + ctx.ellipse(10, 10, 10, 5, 0, 0, 1, false); + ctx.ellipse(10, 10, 10, 0, 0, 0, 1, false); + ctx.ellipse(10, 10, -0, 5, 0, 0, 1, false); + @assert throws INDEX_SIZE_ERR ctx.ellipse(10, 10, -2, 5, 0, 0, 1, false); + @assert throws INDEX_SIZE_ERR ctx.ellipse(10, 10, 0, -1.5, 0, 0, 1, false); + @assert throws INDEX_SIZE_ERR ctx.ellipse(10, 10, -2, -5, 0, 0, 1, false); + ctx.ellipse(80, 0, 10, 4294967277, Math.PI / -84, -Math.PI / 2147483436, false); + +- name: 2d.path.fill.overlap + code: | + ctx.fillStyle = '#000'; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.rect(0, 0, 100, 50); + ctx.closePath(); + ctx.rect(10, 10, 80, 30); + ctx.fill(); + + @assert pixel 50,25 ==~ 0,127,0,255 +/- 1; + expected: | + size 100 50 + cr.set_source_rgb(0, 0.5, 0) + cr.rectangle(0, 0, 100, 50) + cr.fill() + +- name: 2d.path.fill.winding.add + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.moveTo(-10, -10); + ctx.lineTo(110, -10); + ctx.lineTo(110, 60); + ctx.lineTo(-10, 60); + ctx.lineTo(-10, -10); + ctx.lineTo(0, 0); + ctx.lineTo(100, 0); + ctx.lineTo(100, 50); + ctx.lineTo(0, 50); + ctx.fill(); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.fill.winding.subtract.1 + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#f00'; + ctx.moveTo(-10, -10); + ctx.lineTo(110, -10); + ctx.lineTo(110, 60); + ctx.lineTo(-10, 60); + ctx.lineTo(-10, -10); + ctx.lineTo(0, 0); + ctx.lineTo(0, 50); + ctx.lineTo(100, 50); + ctx.lineTo(100, 0); + ctx.fill(); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.fill.winding.subtract.2 + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#f00'; + ctx.moveTo(-10, -10); + ctx.lineTo(110, -10); + ctx.lineTo(110, 60); + ctx.lineTo(-10, 60); + ctx.moveTo(0, 0); + ctx.lineTo(0, 50); + ctx.lineTo(100, 50); + ctx.lineTo(100, 0); + ctx.fill(); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.fill.winding.subtract.3 + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.moveTo(-10, -10); + ctx.lineTo(110, -10); + ctx.lineTo(110, 60); + ctx.lineTo(-10, 60); + ctx.lineTo(-10, -10); + ctx.lineTo(-20, -20); + ctx.lineTo(120, -20); + ctx.lineTo(120, 70); + ctx.lineTo(-20, 70); + ctx.lineTo(-20, -20); + ctx.lineTo(0, 0); + ctx.lineTo(0, 50); + ctx.lineTo(100, 50); + ctx.lineTo(100, 0); + ctx.fill(); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.fill.closed.basic + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.moveTo(0, 0); + ctx.lineTo(100, 0); + ctx.lineTo(100, 50); + ctx.lineTo(0, 50); + ctx.fill(); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.fill.closed.unaffected + code: | + ctx.fillStyle = '#00f'; + ctx.fillRect(0, 0, 100, 50); + + ctx.moveTo(0, 0); + ctx.lineTo(100, 0); + ctx.lineTo(100, 50); + ctx.fillStyle = '#f00'; + ctx.fill(); + ctx.lineTo(0, 50); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + @assert pixel 90,10 == 0,255,0,255; + @assert pixel 10,40 == 0,255,0,255; + expected: green + +- name: 2d.path.stroke.overlap + desc: Stroked subpaths are combined before being drawn + code: | + ctx.fillStyle = '#000'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.lineWidth = 50; + ctx.moveTo(0, 20); + ctx.lineTo(100, 20); + ctx.moveTo(0, 30); + ctx.lineTo(100, 30); + ctx.stroke(); + + @assert pixel 50,25 ==~ 0,127,0,255 +/- 1; + expected: | + size 100 50 + cr.set_source_rgb(0, 0.5, 0) + cr.rectangle(0, 0, 100, 50) + cr.fill() + +- name: 2d.path.stroke.union + desc: Strokes in opposite directions are unioned, not subtracted + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 40; + ctx.moveTo(0, 10); + ctx.lineTo(100, 10); + ctx.moveTo(100, 40); + ctx.lineTo(0, 40); + ctx.stroke(); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.stroke.unaffected + desc: Stroking does not start a new path or subpath + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.lineWidth = 50; + ctx.moveTo(-100, 25); + ctx.lineTo(-100, -100); + ctx.lineTo(200, -100); + ctx.lineTo(200, 25); + ctx.strokeStyle = '#f00'; + ctx.stroke(); + + ctx.closePath(); + ctx.strokeStyle = '#0f0'; + ctx.stroke(); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.stroke.scale1 + desc: Stroke line widths are scaled by the current transformation matrix + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.beginPath(); + ctx.rect(25, 12.5, 50, 25); + ctx.save(); + ctx.scale(50, 25); + ctx.strokeStyle = '#0f0'; + ctx.stroke(); + ctx.restore(); + + ctx.beginPath(); + ctx.rect(-25, -12.5, 150, 75); + ctx.save(); + ctx.scale(50, 25); + ctx.strokeStyle = '#f00'; + ctx.stroke(); + ctx.restore(); + + @assert pixel 0,0 == 0,255,0,255; + @assert pixel 50,0 == 0,255,0,255; + @assert pixel 99,0 == 0,255,0,255; + @assert pixel 0,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 99,25 == 0,255,0,255; + @assert pixel 0,49 == 0,255,0,255; + @assert pixel 50,49 == 0,255,0,255; + @assert pixel 99,49 == 0,255,0,255; + expected: green + +- name: 2d.path.stroke.scale2 + desc: Stroke line widths are scaled by the current transformation matrix + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.beginPath(); + ctx.rect(25, 12.5, 50, 25); + ctx.save(); + ctx.rotate(Math.PI/2); + ctx.scale(25, 50); + ctx.strokeStyle = '#0f0'; + ctx.stroke(); + ctx.restore(); + + ctx.beginPath(); + ctx.rect(-25, -12.5, 150, 75); + ctx.save(); + ctx.rotate(Math.PI/2); + ctx.scale(25, 50); + ctx.strokeStyle = '#f00'; + ctx.stroke(); + ctx.restore(); + + @assert pixel 0,0 == 0,255,0,255; + @assert pixel 50,0 == 0,255,0,255; + @assert pixel 99,0 == 0,255,0,255; + @assert pixel 0,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 99,25 == 0,255,0,255; + @assert pixel 0,49 == 0,255,0,255; + @assert pixel 50,49 == 0,255,0,255; + @assert pixel 99,49 == 0,255,0,255; + expected: green + +- name: 2d.path.stroke.skew + desc: Strokes lines are skewed by the current transformation matrix + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.save(); + ctx.beginPath(); + ctx.moveTo(49, -50); + ctx.lineTo(201, -50); + ctx.rotate(Math.PI/4); + ctx.scale(1, 283); + ctx.strokeStyle = '#0f0'; + ctx.stroke(); + ctx.restore(); + + ctx.save(); + ctx.beginPath(); + ctx.translate(-150, 0); + ctx.moveTo(49, -50); + ctx.lineTo(199, -50); + ctx.rotate(Math.PI/4); + ctx.scale(1, 142); + ctx.strokeStyle = '#f00'; + ctx.stroke(); + ctx.restore(); + + ctx.save(); + ctx.beginPath(); + ctx.translate(-150, 0); + ctx.moveTo(49, -50); + ctx.lineTo(199, -50); + ctx.rotate(Math.PI/4); + ctx.scale(1, 142); + ctx.strokeStyle = '#f00'; + ctx.stroke(); + ctx.restore(); + + @assert pixel 0,0 == 0,255,0,255; + @assert pixel 50,0 == 0,255,0,255; + @assert pixel 99,0 == 0,255,0,255; + @assert pixel 0,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 99,25 == 0,255,0,255; + @assert pixel 0,49 == 0,255,0,255; + @assert pixel 50,49 == 0,255,0,255; + @assert pixel 99,49 == 0,255,0,255; + expected: green + +- name: 2d.path.stroke.empty + desc: Empty subpaths are not stroked + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 100; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(40, 25); + ctx.moveTo(60, 25); + ctx.stroke(); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.stroke.prune.line + desc: Zero-length line segments from lineTo are removed before stroking + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 100; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.lineTo(50, 25); + ctx.stroke(); + + @assert pixel 50,25 == 0,255,0,255; @moz-todo + expected: green + +- name: 2d.path.stroke.prune.closed + desc: Zero-length line segments from closed paths are removed before stroking + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 100; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.lineTo(50, 25); + ctx.closePath(); + ctx.stroke(); + + @assert pixel 50,25 == 0,255,0,255; @moz-todo + expected: green + +- name: 2d.path.stroke.prune.curve + desc: Zero-length line segments from quadraticCurveTo and bezierCurveTo are removed + before stroking + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 100; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.quadraticCurveTo(50, 25, 50, 25); + ctx.stroke(); + + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.bezierCurveTo(50, 25, 50, 25, 50, 25); + ctx.stroke(); + + @assert pixel 50,25 == 0,255,0,255; @moz-todo + expected: green + +- name: 2d.path.stroke.prune.arc + desc: Zero-length line segments from arcTo and arc are removed before stroking + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 100; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.arcTo(50, 25, 150, 25, 10); + ctx.stroke(); + + ctx.beginPath(); + ctx.moveTo(60, 25); + ctx.arc(50, 25, 10, 0, 0, false); + ctx.stroke(); + + @assert pixel 50,25 == 0,255,0,255; @moz-todo + expected: green + +- name: 2d.path.stroke.prune.rect + desc: Zero-length line segments from rect and strokeRect are removed before stroking + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 100; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.rect(50, 25, 0, 0); + ctx.stroke(); + + ctx.strokeRect(50, 25, 0, 0); + + @assert pixel 50,25 == 0,255,0,255; @moz-todo + expected: green + +- name: 2d.path.stroke.prune.corner + desc: Zero-length line segments are removed before stroking with miters + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 400; + ctx.lineJoin = 'miter'; + ctx.miterLimit = 1.4; + + ctx.beginPath(); + ctx.moveTo(-1000, 200); + ctx.lineTo(-100, 200); + ctx.lineTo(-100, 200); + ctx.lineTo(-100, 200); + ctx.lineTo(-100, 1000); + ctx.stroke(); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.transformation.basic + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.translate(-100, 0); + ctx.rect(100, 0, 100, 50); + ctx.translate(0, -100); + ctx.fillStyle = '#0f0'; + ctx.fill(); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.transformation.multiple + # TODO: change this name + desc: Transformations are applied while building paths, not when drawing + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#f00'; + ctx.translate(-100, 0); + ctx.rect(0, 0, 100, 50); + ctx.fill(); + ctx.translate(100, 0); + ctx.fill(); + + ctx.beginPath(); + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 50; + ctx.translate(0, -50); + ctx.moveTo(0, 25); + ctx.lineTo(100, 25); + ctx.stroke(); + ctx.translate(0, 50); + ctx.stroke(); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.transformation.changing + desc: Transformations are applied while building paths, not when drawing + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.moveTo(0, 0); + ctx.translate(100, 0); + ctx.lineTo(0, 0); + ctx.translate(0, 50); + ctx.lineTo(0, 0); + ctx.translate(-100, 0); + ctx.lineTo(0, 0); + ctx.translate(1000, 1000); + ctx.rotate(Math.PI/2); + ctx.scale(0.1, 0.1); + ctx.fill(); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + + +- name: 2d.path.clip.empty + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.beginPath(); + ctx.clip(); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.clip.basic.1 + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.beginPath(); + ctx.rect(0, 0, 100, 50); + ctx.clip(); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.clip.basic.2 + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.beginPath(); + ctx.rect(-100, 0, 100, 50); + ctx.clip(); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.clip.intersect + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.beginPath(); + ctx.rect(0, 0, 50, 50); + ctx.clip(); + ctx.beginPath(); + ctx.rect(50, 0, 50, 50) + ctx.clip(); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.clip.winding.1 + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.beginPath(); + ctx.moveTo(-10, -10); + ctx.lineTo(110, -10); + ctx.lineTo(110, 60); + ctx.lineTo(-10, 60); + ctx.lineTo(-10, -10); + ctx.lineTo(0, 0); + ctx.lineTo(0, 50); + ctx.lineTo(100, 50); + ctx.lineTo(100, 0); + ctx.clip(); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.clip.winding.2 + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.beginPath(); + ctx.moveTo(-10, -10); + ctx.lineTo(110, -10); + ctx.lineTo(110, 60); + ctx.lineTo(-10, 60); + ctx.lineTo(-10, -10); + ctx.clip(); + + ctx.beginPath(); + ctx.moveTo(0, 0); + ctx.lineTo(0, 50); + ctx.lineTo(100, 50); + ctx.lineTo(100, 0); + ctx.lineTo(0, 0); + ctx.clip(); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.path.clip.unaffected + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + + ctx.beginPath(); + ctx.moveTo(0, 0); + ctx.lineTo(0, 50); + ctx.lineTo(100, 50); + ctx.lineTo(100, 0); + ctx.clip(); + + ctx.lineTo(0, 0); + ctx.fill(); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + + + +- name: 2d.path.isPointInPath.basic.1 + desc: isPointInPath() detects whether the point is inside the path + code: | + ctx.rect(0, 0, 20, 20); + @assert ctx.isPointInPath(10, 10) === true; + @assert ctx.isPointInPath(30, 10) === false; + +- name: 2d.path.isPointInPath.basic.2 + desc: isPointInPath() detects whether the point is inside the path + code: | + ctx.rect(20, 0, 20, 20); + @assert ctx.isPointInPath(10, 10) === false; + @assert ctx.isPointInPath(30, 10) === true; + +- name: 2d.path.isPointInPath.edge + desc: isPointInPath() counts points on the path as being inside + code: | + ctx.rect(0, 0, 20, 20); + @assert ctx.isPointInPath(0, 0) === true; + @assert ctx.isPointInPath(10, 0) === true; + @assert ctx.isPointInPath(20, 0) === true; + @assert ctx.isPointInPath(20, 10) === true; + @assert ctx.isPointInPath(20, 20) === true; + @assert ctx.isPointInPath(10, 20) === true; + @assert ctx.isPointInPath(0, 20) === true; + @assert ctx.isPointInPath(0, 10) === true; + @assert ctx.isPointInPath(10, -0.01) === false; + @assert ctx.isPointInPath(10, 20.01) === false; + @assert ctx.isPointInPath(-0.01, 10) === false; + @assert ctx.isPointInPath(20.01, 10) === false; + +- name: 2d.path.isPointInPath.empty + desc: isPointInPath() works when there is no path + code: | + @assert ctx.isPointInPath(0, 0) === false; + +- name: 2d.path.isPointInPath.subpath + desc: isPointInPath() uses the current path, not just the subpath + code: | + ctx.rect(0, 0, 20, 20); + ctx.beginPath(); + ctx.rect(20, 0, 20, 20); + ctx.closePath(); + ctx.rect(40, 0, 20, 20); + @assert ctx.isPointInPath(10, 10) === false; + @assert ctx.isPointInPath(30, 10) === true; + @assert ctx.isPointInPath(50, 10) === true; + +- name: 2d.path.isPointInPath.outside + desc: isPointInPath() works on paths outside the canvas + code: | + ctx.rect(0, -100, 20, 20); + ctx.rect(20, -10, 20, 20); + @assert ctx.isPointInPath(10, -110) === false; + @assert ctx.isPointInPath(10, -90) === true; + @assert ctx.isPointInPath(10, -70) === false; + @assert ctx.isPointInPath(30, -20) === false; + @assert ctx.isPointInPath(30, 0) === true; + @assert ctx.isPointInPath(30, 20) === false; + +- name: 2d.path.isPointInPath.unclosed + desc: isPointInPath() works on unclosed subpaths + code: | + ctx.moveTo(0, 0); + ctx.lineTo(20, 0); + ctx.lineTo(20, 20); + ctx.lineTo(0, 20); + @assert ctx.isPointInPath(10, 10) === true; + @assert ctx.isPointInPath(30, 10) === false; + +- name: 2d.path.isPointInPath.arc + desc: isPointInPath() works on arcs + code: | + ctx.arc(50, 25, 10, 0, Math.PI, false); + @assert ctx.isPointInPath(50, 10) === false; + @assert ctx.isPointInPath(50, 20) === false; + @assert ctx.isPointInPath(50, 30) === true; + @assert ctx.isPointInPath(50, 40) === false; + @assert ctx.isPointInPath(30, 20) === false; + @assert ctx.isPointInPath(70, 20) === false; + @assert ctx.isPointInPath(30, 30) === false; + @assert ctx.isPointInPath(70, 30) === false; + +- name: 2d.path.isPointInPath.bigarc + desc: isPointInPath() works on unclosed arcs larger than 2pi + opera: {bug: 320937} + code: | + ctx.arc(50, 25, 10, 0, 7, false); + @assert ctx.isPointInPath(50, 10) === false; + @assert ctx.isPointInPath(50, 20) === true; + @assert ctx.isPointInPath(50, 30) === true; + @assert ctx.isPointInPath(50, 40) === false; + @assert ctx.isPointInPath(30, 20) === false; + @assert ctx.isPointInPath(70, 20) === false; + @assert ctx.isPointInPath(30, 30) === false; + @assert ctx.isPointInPath(70, 30) === false; + +- name: 2d.path.isPointInPath.bezier + desc: isPointInPath() works on Bezier curves + code: | + ctx.moveTo(25, 25); + ctx.bezierCurveTo(50, -50, 50, 100, 75, 25); + @assert ctx.isPointInPath(25, 20) === false; + @assert ctx.isPointInPath(25, 30) === false; + @assert ctx.isPointInPath(30, 20) === true; + @assert ctx.isPointInPath(30, 30) === false; + @assert ctx.isPointInPath(40, 2) === false; + @assert ctx.isPointInPath(40, 20) === true; + @assert ctx.isPointInPath(40, 30) === false; + @assert ctx.isPointInPath(40, 47) === false; + @assert ctx.isPointInPath(45, 20) === true; + @assert ctx.isPointInPath(45, 30) === false; + @assert ctx.isPointInPath(55, 20) === false; + @assert ctx.isPointInPath(55, 30) === true; + @assert ctx.isPointInPath(60, 2) === false; + @assert ctx.isPointInPath(60, 20) === false; + @assert ctx.isPointInPath(60, 30) === true; + @assert ctx.isPointInPath(60, 47) === false; + @assert ctx.isPointInPath(70, 20) === false; + @assert ctx.isPointInPath(70, 30) === true; + @assert ctx.isPointInPath(75, 20) === false; + @assert ctx.isPointInPath(75, 30) === false; + +- name: 2d.path.isPointInPath.winding + desc: isPointInPath() uses the non-zero winding number rule + code: | + // Create a square ring, using opposite windings to make a hole in the centre + ctx.moveTo(0, 0); + ctx.lineTo(50, 0); + ctx.lineTo(50, 50); + ctx.lineTo(0, 50); + ctx.lineTo(0, 0); + ctx.lineTo(10, 10); + ctx.lineTo(10, 40); + ctx.lineTo(40, 40); + ctx.lineTo(40, 10); + ctx.lineTo(10, 10); + + @assert ctx.isPointInPath(5, 5) === true; + @assert ctx.isPointInPath(25, 5) === true; + @assert ctx.isPointInPath(45, 5) === true; + @assert ctx.isPointInPath(5, 25) === true; + @assert ctx.isPointInPath(25, 25) === false; + @assert ctx.isPointInPath(45, 25) === true; + @assert ctx.isPointInPath(5, 45) === true; + @assert ctx.isPointInPath(25, 45) === true; + @assert ctx.isPointInPath(45, 45) === true; + +- name: 2d.path.isPointInPath.transform.1 + desc: isPointInPath() handles transformations correctly + code: | + ctx.translate(50, 0); + ctx.rect(0, 0, 20, 20); + @assert ctx.isPointInPath(-40, 10) === false; + @assert ctx.isPointInPath(10, 10) === false; + @assert ctx.isPointInPath(49, 10) === false; + @assert ctx.isPointInPath(51, 10) === true; + @assert ctx.isPointInPath(69, 10) === true; + @assert ctx.isPointInPath(71, 10) === false; + +- name: 2d.path.isPointInPath.transform.2 + desc: isPointInPath() handles transformations correctly + code: | + ctx.rect(50, 0, 20, 20); + ctx.translate(50, 0); + @assert ctx.isPointInPath(-40, 10) === false; + @assert ctx.isPointInPath(10, 10) === false; + @assert ctx.isPointInPath(49, 10) === false; + @assert ctx.isPointInPath(51, 10) === true; + @assert ctx.isPointInPath(69, 10) === true; + @assert ctx.isPointInPath(71, 10) === false; + +- name: 2d.path.isPointInPath.transform.3 + desc: isPointInPath() handles transformations correctly + code: | + ctx.scale(-1, 1); + ctx.rect(-70, 0, 20, 20); + @assert ctx.isPointInPath(-40, 10) === false; + @assert ctx.isPointInPath(10, 10) === false; + @assert ctx.isPointInPath(49, 10) === false; + @assert ctx.isPointInPath(51, 10) === true; + @assert ctx.isPointInPath(69, 10) === true; + @assert ctx.isPointInPath(71, 10) === false; + +- name: 2d.path.isPointInPath.transform.4 + desc: isPointInPath() handles transformations correctly + code: | + ctx.translate(50, 0); + ctx.rect(50, 0, 20, 20); + ctx.translate(0, 50); + @assert ctx.isPointInPath(60, 10) === false; + @assert ctx.isPointInPath(110, 10) === true; + @assert ctx.isPointInPath(110, 60) === false; + +- name: 2d.path.isPointInPath.nonfinite + desc: isPointInPath() returns false for non-finite arguments + code: | + ctx.rect(-100, -50, 200, 100); + @assert ctx.isPointInPath(Infinity, 0) === false; + @assert ctx.isPointInPath(-Infinity, 0) === false; + @assert ctx.isPointInPath(NaN, 0) === false; + @assert ctx.isPointInPath(0, Infinity) === false; + @assert ctx.isPointInPath(0, -Infinity) === false; + @assert ctx.isPointInPath(0, NaN) === false; + @assert ctx.isPointInPath(NaN, NaN) === false; + + +- name: 2d.path.isPointInStroke.scaleddashes + desc: isPointInStroke() should return correct results on dashed paths at high scale + factors + code: | + var scale = 20; + ctx.setLineDash([10, 21.4159]); // dash from t=0 to t=10 along the circle + ctx.scale(scale, scale); + ctx.ellipse(6, 10, 5, 5, 0, 2*Math.PI, false); + ctx.stroke(); + + // hit-test the beginning of the dash (t=0) + @assert ctx.isPointInStroke(11*scale, 10*scale) === true; + // hit-test the middle of the dash (t=5) + @assert ctx.isPointInStroke(8.70*scale, 14.21*scale) === true; + // hit-test the end of the dash (t=9.8) + @assert ctx.isPointInStroke(4.10*scale, 14.63*scale) === true; + // hit-test past the end of the dash (t=10.2) + @assert ctx.isPointInStroke(3.74*scale, 14.46*scale) === false; + +- name: 2d.path.isPointInPath.basic + desc: Verify the winding rule in isPointInPath works for for rect path. + code: | + canvas.width = 200; + canvas.height = 200; + + // Testing default isPointInPath + ctx.beginPath(); + ctx.rect(0, 0, 100, 100); + ctx.rect(25, 25, 50, 50); + @assert ctx.isPointInPath(50, 50) === true; + @assert ctx.isPointInPath(NaN, 50) === false; + @assert ctx.isPointInPath(50, NaN) === false; + + // Testing nonzero isPointInPath + ctx.beginPath(); + ctx.rect(0, 0, 100, 100); + ctx.rect(25, 25, 50, 50); + @assert ctx.isPointInPath(50, 50, 'nonzero') === true; + + // Testing evenodd isPointInPath + ctx.beginPath(); + ctx.rect(0, 0, 100, 100); + ctx.rect(25, 25, 50, 50); + @assert ctx.isPointInPath(50, 50, 'evenodd') === false; + + // Testing extremely large scale + ctx.save(); + ctx.scale(Number.MAX_VALUE, Number.MAX_VALUE); + ctx.beginPath(); + ctx.rect(-10, -10, 20, 20); + @assert ctx.isPointInPath(0, 0, 'nonzero') === true; + @assert ctx.isPointInPath(0, 0, 'evenodd') === true; + ctx.restore(); + + // Check with non-invertible ctm. + ctx.save(); + ctx.scale(0, 0); + ctx.beginPath(); + ctx.rect(-10, -10, 20, 20); + @assert ctx.isPointInPath(0, 0, 'nonzero') === false; + @assert ctx.isPointInPath(0, 0, 'evenodd') === false; + ctx.restore(); + +- name: 2d.path.isPointInpath.multi.path + desc: Verify the winding rule in isPointInPath works for path object. + code: | + canvas.width = 200; + canvas.height = 200; + + // Testing default isPointInPath with Path object'); + path = new Path2D(); + path.rect(0, 0, 100, 100); + path.rect(25, 25, 50, 50); + @assert ctx.isPointInPath(path, 50, 50) === true; + @assert ctx.isPointInPath(path, 50, 50, undefined) === true; + @assert ctx.isPointInPath(path, NaN, 50) === false; + @assert ctx.isPointInPath(path, 50, NaN) === false; + + // Testing nonzero isPointInPath with Path object'); + path = new Path2D(); + path.rect(0, 0, 100, 100); + path.rect(25, 25, 50, 50); + @assert ctx.isPointInPath(path, 50, 50, 'nonzero') === true; + + // Testing evenodd isPointInPath with Path object'); + path = new Path2D(); + path.rect(0, 0, 100, 100); + path.rect(25, 25, 50, 50); + assert_false(ctx.isPointInPath(path, 50, 50, 'evenodd')); + +- name: 2d.path.isPointInpath.invalid + desc: Verify isPointInPath throws exceptions with invalid inputs. + code: | + canvas.width = 200; + canvas.height = 200; + path = new Path2D(); + path.rect(0, 0, 100, 100); + path.rect(25, 25, 50, 50); + // Testing invalid enumeration isPointInPath (w/ and w/o Path object'); + @assert throws TypeError ctx.isPointInPath(path, 50, 50, 'gazonk'); + @assert throws TypeError ctx.isPointInPath(50, 50, 'gazonk'); + + // Testing invalid type isPointInPath with Path object'); + @assert throws TypeError ctx.isPointInPath(null, 50, 50); + @assert throws TypeError ctx.isPointInPath(null, 50, 50, 'nonzero'); + @assert throws TypeError ctx.isPointInPath(null, 50, 50, 'evenodd'); + @assert throws TypeError ctx.isPointInPath(null, 50, 50, null); + @assert throws TypeError ctx.isPointInPath(path, 50, 50, null); + @assert throws TypeError ctx.isPointInPath(undefined, 50, 50); + @assert throws TypeError ctx.isPointInPath(undefined, 50, 50, 'nonzero'); + @assert throws TypeError ctx.isPointInPath(undefined, 50, 50, 'evenodd'); + @assert throws TypeError ctx.isPointInPath(undefined, 50, 50, undefined); + @assert throws TypeError ctx.isPointInPath([], 50, 50); + @assert throws TypeError ctx.isPointInPath([], 50, 50, 'nonzero'); + @assert throws TypeError ctx.isPointInPath([], 50, 50, 'evenodd'); + @assert throws TypeError ctx.isPointInPath({}, 50, 50); + @assert throws TypeError ctx.isPointInPath({}, 50, 50, 'nonzero'); + @assert throws TypeError ctx.isPointInPath({}, 50, 50, 'evenodd'); diff --git a/testing/web-platform/tests/html/canvas/tools/yaml-new/pixel-manipulation.yaml b/testing/web-platform/tests/html/canvas/tools/yaml-new/pixel-manipulation.yaml new file mode 100644 index 0000000000..0643b047b1 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/yaml-new/pixel-manipulation.yaml @@ -0,0 +1,1042 @@ +- name: 2d.imageData.create2.basic + desc: createImageData(sw, sh) exists and returns something + code: | + @assert ctx.createImageData(1, 1) !== null; + +- name: 2d.imageData.create1.basic + desc: createImageData(imgdata) exists and returns something + code: | + @assert ctx.createImageData(ctx.createImageData(1, 1)) !== null; + +- name: 2d.imageData.create2.type + desc: createImageData(sw, sh) returns an ImageData object containing a Uint8ClampedArray + object + canvasType: ['HTMLCanvas'] + code: | + @assert window.ImageData !== undefined; + @assert window.Uint8ClampedArray !== undefined; + window.ImageData.prototype.thisImplementsImageData = true; + window.Uint8ClampedArray.prototype.thisImplementsUint8ClampedArray = true; + var imgdata = ctx.createImageData(1, 1); + @assert imgdata.thisImplementsImageData; + @assert imgdata.data.thisImplementsUint8ClampedArray; + +- name: 2d.imageData.create1.type + desc: createImageData(imgdata) returns an ImageData object containing a Uint8ClampedArray + object + canvasType: ['HTMLCanvas'] + code: | + @assert window.ImageData !== undefined; + @assert window.Uint8ClampedArray !== undefined; + window.ImageData.prototype.thisImplementsImageData = true; + window.Uint8ClampedArray.prototype.thisImplementsUint8ClampedArray = true; + var imgdata = ctx.createImageData(ctx.createImageData(1, 1)); + @assert imgdata.thisImplementsImageData; + @assert imgdata.data.thisImplementsUint8ClampedArray; + +- name: 2d.imageData.create2.this + desc: createImageData(sw, sh) should throw when called with the wrong |this| + canvasType: ['HTMLCanvas'] + notes: &bindings Defined in "Web IDL" (draft) + code: | + @assert throws TypeError CanvasRenderingContext2D.prototype.createImageData.call(null, 1, 1); @moz-todo + @assert throws TypeError CanvasRenderingContext2D.prototype.createImageData.call(undefined, 1, 1); @moz-todo + @assert throws TypeError CanvasRenderingContext2D.prototype.createImageData.call({}, 1, 1); @moz-todo + +- name: 2d.imageData.create1.this + desc: createImageData(imgdata) should throw when called with the wrong |this| + canvasType: ['HTMLCanvas'] + notes: *bindings + code: | + var imgdata = ctx.createImageData(1, 1); + @assert throws TypeError CanvasRenderingContext2D.prototype.createImageData.call(null, imgdata); @moz-todo + @assert throws TypeError CanvasRenderingContext2D.prototype.createImageData.call(undefined, imgdata); @moz-todo + @assert throws TypeError CanvasRenderingContext2D.prototype.createImageData.call({}, imgdata); @moz-todo + +- name: 2d.imageData.create2.initial + desc: createImageData(sw, sh) returns transparent black data of the right size + code: | + var imgdata = ctx.createImageData(10, 20); + @assert imgdata.data.length === imgdata.width*imgdata.height*4; + @assert imgdata.width < imgdata.height; + @assert imgdata.width > 0; + var isTransparentBlack = true; + for (var i = 0; i < imgdata.data.length; ++i) + if (imgdata.data[i] !== 0) + isTransparentBlack = false; + @assert isTransparentBlack; + +- name: 2d.imageData.create1.initial + desc: createImageData(imgdata) returns transparent black data of the right size + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var imgdata1 = ctx.getImageData(0, 0, 10, 20); + var imgdata2 = ctx.createImageData(imgdata1); + @assert imgdata2.data.length === imgdata1.data.length; + @assert imgdata2.width === imgdata1.width; + @assert imgdata2.height === imgdata1.height; + var isTransparentBlack = true; + for (var i = 0; i < imgdata2.data.length; ++i) + if (imgdata2.data[i] !== 0) + isTransparentBlack = false; + @assert isTransparentBlack; + +- name: 2d.imageData.create2.large + desc: createImageData(sw, sh) works for sizes much larger than the canvas + code: | + var imgdata = ctx.createImageData(1000, 2000); + @assert imgdata.data.length === imgdata.width*imgdata.height*4; + @assert imgdata.width < imgdata.height; + @assert imgdata.width > 0; + var isTransparentBlack = true; + for (var i = 0; i < imgdata.data.length; i += 7813) // check ~1024 points (assuming normal scaling) + if (imgdata.data[i] !== 0) + isTransparentBlack = false; + @assert isTransparentBlack; + +- name: 2d.imageData.create2.negative + desc: createImageData(sw, sh) takes the absolute magnitude of the size arguments + code: | + var imgdata1 = ctx.createImageData(10, 20); + var imgdata2 = ctx.createImageData(-10, 20); + var imgdata3 = ctx.createImageData(10, -20); + var imgdata4 = ctx.createImageData(-10, -20); + @assert imgdata1.data.length === imgdata2.data.length; + @assert imgdata2.data.length === imgdata3.data.length; + @assert imgdata3.data.length === imgdata4.data.length; + +- name: 2d.imageData.create2.zero + desc: createImageData(sw, sh) throws INDEX_SIZE_ERR if size is zero + code: | + @assert throws INDEX_SIZE_ERR ctx.createImageData(10, 0); + @assert throws INDEX_SIZE_ERR ctx.createImageData(0, 10); + @assert throws INDEX_SIZE_ERR ctx.createImageData(0, 0); + @assert throws INDEX_SIZE_ERR ctx.createImageData(0.99, 10); + @assert throws INDEX_SIZE_ERR ctx.createImageData(10, 0.1); + +- name: 2d.imageData.create2.nonfinite + desc: createImageData() throws TypeError if arguments are not finite + notes: *bindings + code: | + @nonfinite @assert throws TypeError ctx.createImageData(<10 Infinity -Infinity NaN>, <10 Infinity -Infinity NaN>); + var posinfobj = { valueOf: function() { return Infinity; } }, + neginfobj = { valueOf: function() { return -Infinity; } }, + nanobj = { valueOf: function() { return -Infinity; } }; + @nonfinite @assert throws TypeError ctx.createImageData(<10 posinfobj neginfobj nanobj>, <10 posinfobj neginfobj nanobj>); + +- name: 2d.imageData.create1.zero + desc: createImageData(null) throws TypeError + code: | + @assert throws TypeError ctx.createImageData(null); + +- name: 2d.imageData.create2.double + desc: createImageData(w, h) double is converted to long + code: | + var imgdata1 = ctx.createImageData(10.01, 10.99); + var imgdata2 = ctx.createImageData(-10.01, -10.99); + @assert imgdata1.width === 10; + @assert imgdata1.height === 10; + @assert imgdata2.width === 10; + @assert imgdata2.height === 10; + +- name: 2d.imageData.get.double + desc: createImageData(w, h) double is converted to long + code: | + var imgdata1 = ctx.getImageData(0, 0, 10.01, 10.99); + var imgdata2 = ctx.getImageData(0, 0, -10.01, -10.99); + @assert imgdata1.width === 10; + @assert imgdata1.height === 10; + @assert imgdata2.width === 10; + @assert imgdata2.height === 10; + +- name: 2d.imageData.create2.round + desc: createImageData(w, h) is rounded the same as getImageData(0, 0, w, h) + code: | + var imgdata1 = ctx.createImageData(10.01, 10.99); + var imgdata2 = ctx.getImageData(0, 0, 10.01, 10.99); + @assert imgdata1.width === imgdata2.width; + @assert imgdata1.height === imgdata2.height; + +- name: 2d.imageData.create.and.resize + desc: Verify no crash when resizing an image bitmap to zero. + canvasType: ['HTMLCanvas'] + images: + - red.png + code: | + var image = new Image(); + image.onload = t.step_func(function() { + var options = { resizeHeight: 0 }; + var p1 = createImageBitmap(image, options); + p1.catch(function(error){}); + t.done(); + }); + image.src = 'red.png'; + +- name: 2d.imageData.get.basic + desc: getImageData() exists and returns something + code: | + @assert ctx.getImageData(0, 0, 100, 50) !== null; + +- name: 2d.imageData.get.type + canvasType: ['HTMLCanvas'] + desc: getImageData() returns an ImageData object containing a Uint8ClampedArray + object + code: | + @assert window.ImageData !== undefined; + @assert window.Uint8ClampedArray !== undefined; + window.ImageData.prototype.thisImplementsImageData = true; + window.Uint8ClampedArray.prototype.thisImplementsUint8ClampedArray = true; + var imgdata = ctx.getImageData(0, 0, 1, 1); + @assert imgdata.thisImplementsImageData; + @assert imgdata.data.thisImplementsUint8ClampedArray; + +- name: 2d.imageData.get.zero + desc: getImageData() throws INDEX_SIZE_ERR if size is zero + code: | + @assert throws INDEX_SIZE_ERR ctx.getImageData(1, 1, 10, 0); + @assert throws INDEX_SIZE_ERR ctx.getImageData(1, 1, 0, 10); + @assert throws INDEX_SIZE_ERR ctx.getImageData(1, 1, 0, 0); + @assert throws INDEX_SIZE_ERR ctx.getImageData(1, 1, 0.1, 10); + @assert throws INDEX_SIZE_ERR ctx.getImageData(1, 1, 10, 0.99); + @assert throws INDEX_SIZE_ERR ctx.getImageData(1, 1, -0.1, 10); + @assert throws INDEX_SIZE_ERR ctx.getImageData(1, 1, 10, -0.99); + +- name: 2d.imageData.get.nonfinite + desc: getImageData() throws TypeError if arguments are not finite + notes: *bindings + code: | + @nonfinite @assert throws TypeError ctx.getImageData(<10 Infinity -Infinity NaN>, <10 Infinity -Infinity NaN>, <10 Infinity -Infinity NaN>, <10 Infinity -Infinity NaN>); + var posinfobj = { valueOf: function() { return Infinity; } }, + neginfobj = { valueOf: function() { return -Infinity; } }, + nanobj = { valueOf: function() { return -Infinity; } }; + @nonfinite @assert throws TypeError ctx.getImageData(<10 posinfobj neginfobj nanobj>, <10 posinfobj neginfobj nanobj>, <10 posinfobj neginfobj nanobj>, <10 posinfobj neginfobj nanobj>); + +- name: 2d.imageData.get.source.outside + desc: getImageData() returns transparent black outside the canvas + code: | + ctx.fillStyle = '#08f'; + ctx.fillRect(0, 0, 100, 50); + + var imgdata1 = ctx.getImageData(-10, 5, 1, 1); + @assert imgdata1.data[0] === 0; + @assert imgdata1.data[1] === 0; + @assert imgdata1.data[2] === 0; + @assert imgdata1.data[3] === 0; + + var imgdata2 = ctx.getImageData(10, -5, 1, 1); + @assert imgdata2.data[0] === 0; + @assert imgdata2.data[1] === 0; + @assert imgdata2.data[2] === 0; + @assert imgdata2.data[3] === 0; + + var imgdata3 = ctx.getImageData(200, 5, 1, 1); + @assert imgdata3.data[0] === 0; + @assert imgdata3.data[1] === 0; + @assert imgdata3.data[2] === 0; + @assert imgdata3.data[3] === 0; + + var imgdata4 = ctx.getImageData(10, 60, 1, 1); + @assert imgdata4.data[0] === 0; + @assert imgdata4.data[1] === 0; + @assert imgdata4.data[2] === 0; + @assert imgdata4.data[3] === 0; + + var imgdata5 = ctx.getImageData(100, 10, 1, 1); + @assert imgdata5.data[0] === 0; + @assert imgdata5.data[1] === 0; + @assert imgdata5.data[2] === 0; + @assert imgdata5.data[3] === 0; + + var imgdata6 = ctx.getImageData(0, 10, 1, 1); + @assert imgdata6.data[0] === 0; + @assert imgdata6.data[1] === 136; + @assert imgdata6.data[2] === 255; + @assert imgdata6.data[3] === 255; + + var imgdata7 = ctx.getImageData(-10, 10, 20, 20); + @assert imgdata7.data[ 0*4+0] === 0; + @assert imgdata7.data[ 0*4+1] === 0; + @assert imgdata7.data[ 0*4+2] === 0; + @assert imgdata7.data[ 0*4+3] === 0; + @assert imgdata7.data[ 9*4+0] === 0; + @assert imgdata7.data[ 9*4+1] === 0; + @assert imgdata7.data[ 9*4+2] === 0; + @assert imgdata7.data[ 9*4+3] === 0; + @assert imgdata7.data[10*4+0] === 0; + @assert imgdata7.data[10*4+1] === 136; + @assert imgdata7.data[10*4+2] === 255; + @assert imgdata7.data[10*4+3] === 255; + @assert imgdata7.data[19*4+0] === 0; + @assert imgdata7.data[19*4+1] === 136; + @assert imgdata7.data[19*4+2] === 255; + @assert imgdata7.data[19*4+3] === 255; + @assert imgdata7.data[20*4+0] === 0; + @assert imgdata7.data[20*4+1] === 0; + @assert imgdata7.data[20*4+2] === 0; + @assert imgdata7.data[20*4+3] === 0; + +- name: 2d.imageData.get.source.negative + desc: getImageData() works with negative width and height, and returns top-to-bottom + left-to-right + code: | + ctx.fillStyle = '#000'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#fff'; + ctx.fillRect(20, 10, 60, 10); + + var imgdata1 = ctx.getImageData(85, 25, -10, -10); + @assert imgdata1.data[0] === 255; + @assert imgdata1.data[1] === 255; + @assert imgdata1.data[2] === 255; + @assert imgdata1.data[3] === 255; + @assert imgdata1.data[imgdata1.data.length-4+0] === 0; + @assert imgdata1.data[imgdata1.data.length-4+1] === 0; + @assert imgdata1.data[imgdata1.data.length-4+2] === 0; + @assert imgdata1.data[imgdata1.data.length-4+3] === 255; + + var imgdata2 = ctx.getImageData(0, 0, -1, -1); + @assert imgdata2.data[0] === 0; + @assert imgdata2.data[1] === 0; + @assert imgdata2.data[2] === 0; + @assert imgdata2.data[3] === 0; + +- name: 2d.imageData.get.source.size + desc: getImageData() returns bigger ImageData for bigger source rectangle + code: | + var imgdata1 = ctx.getImageData(0, 0, 10, 10); + var imgdata2 = ctx.getImageData(0, 0, 20, 20); + @assert imgdata2.width > imgdata1.width; + @assert imgdata2.height > imgdata1.height; + +- name: 2d.imageData.get.nonpremul + desc: getImageData() returns non-premultiplied colors + code: | + ctx.fillStyle = 'rgba(255, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + var imgdata = ctx.getImageData(10, 10, 10, 10); + @assert imgdata.data[0] > 200; + @assert imgdata.data[1] > 200; + @assert imgdata.data[2] > 200; + @assert imgdata.data[3] > 100; + @assert imgdata.data[3] < 200; + +- name: 2d.imageData.get.range + desc: getImageData() returns values in the range [0, 255] + code: | + ctx.fillStyle = '#000'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#fff'; + ctx.fillRect(20, 10, 60, 10); + var imgdata1 = ctx.getImageData(10, 5, 1, 1); + @assert imgdata1.data[0] === 0; + var imgdata2 = ctx.getImageData(30, 15, 1, 1); + @assert imgdata2.data[0] === 255; + +- name: 2d.imageData.get.clamp + desc: getImageData() clamps colors to the range [0, 255] + code: | + ctx.fillStyle = 'rgb(-100, -200, -300)'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = 'rgb(256, 300, 400)'; + ctx.fillRect(20, 10, 60, 10); + var imgdata1 = ctx.getImageData(10, 5, 1, 1); + @assert imgdata1.data[0] === 0; + @assert imgdata1.data[1] === 0; + @assert imgdata1.data[2] === 0; + var imgdata2 = ctx.getImageData(30, 15, 1, 1); + @assert imgdata2.data[0] === 255; + @assert imgdata2.data[1] === 255; + @assert imgdata2.data[2] === 255; + +- name: 2d.imageData.get.length + desc: getImageData() returns a correctly-sized Uint8ClampedArray + code: | + var imgdata = ctx.getImageData(0, 0, 10, 10); + @assert imgdata.data.length === imgdata.width*imgdata.height*4; + +- name: 2d.imageData.get.order.cols + desc: getImageData() returns leftmost columns first + code: | + ctx.fillStyle = '#fff'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#000'; + ctx.fillRect(0, 0, 2, 50); + var imgdata = ctx.getImageData(0, 0, 10, 10); + @assert imgdata.data[0] === 0; + @assert imgdata.data[Math.round(imgdata.width/2*4)] === 255; + @assert imgdata.data[Math.round((imgdata.height/2)*imgdata.width*4)] === 0; + +- name: 2d.imageData.get.order.rows + desc: getImageData() returns topmost rows first + code: | + ctx.fillStyle = '#fff'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#000'; + ctx.fillRect(0, 0, 100, 2); + var imgdata = ctx.getImageData(0, 0, 10, 10); + @assert imgdata.data[0] === 0; + @assert imgdata.data[Math.floor(imgdata.width/2*4)] === 0; + @assert imgdata.data[(imgdata.height/2)*imgdata.width*4] === 255; + +- name: 2d.imageData.get.order.rgb + desc: getImageData() returns R then G then B + code: | + ctx.fillStyle = '#48c'; + ctx.fillRect(0, 0, 100, 50); + var imgdata = ctx.getImageData(0, 0, 10, 10); + @assert imgdata.data[0] === 0x44; + @assert imgdata.data[1] === 0x88; + @assert imgdata.data[2] === 0xCC; + @assert imgdata.data[3] === 255; + @assert imgdata.data[4] === 0x44; + @assert imgdata.data[5] === 0x88; + @assert imgdata.data[6] === 0xCC; + @assert imgdata.data[7] === 255; + +- name: 2d.imageData.get.order.alpha + desc: getImageData() returns A in the fourth component + code: | + ctx.fillStyle = 'rgba(0, 0, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + var imgdata = ctx.getImageData(0, 0, 10, 10); + @assert imgdata.data[3] < 200; + @assert imgdata.data[3] > 100; + +- name: 2d.imageData.get.unaffected + desc: getImageData() is not affected by context state + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50) + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50) + ctx.save(); + ctx.translate(50, 0); + ctx.globalAlpha = 0.1; + ctx.globalCompositeOperation = 'destination-atop'; + ctx.shadowColor = '#f00'; + ctx.rect(0, 0, 5, 5); + ctx.clip(); + var imgdata = ctx.getImageData(0, 0, 50, 50); + ctx.restore(); + ctx.putImageData(imgdata, 50, 0); + @assert pixel 25,25 ==~ 0,255,0,255; + @assert pixel 75,25 ==~ 0,255,0,255; + expected: green + +- name: 2d.imageData.get.large.crash + desc: Test that canvas crash when image data cannot be allocated. + code: | + @assert throws TypeError ctx.getImageData(10, 0xffffffff, 2147483647, 10); + +- name: 2d.imageData.get.rounding + desc: Test the handling of non-integer source coordinates in getImageData(). + code: | + function testDimensions(sx, sy, sw, sh, width, height) + { + imageData = ctx.getImageData(sx, sy, sw, sh); + @assert imageData.width == width; + @assert imageData.height == height; + } + + testDimensions(0, 0, 20, 10, 20, 10); + + testDimensions(.1, .2, 20, 10, 20, 10); + testDimensions(.9, .8, 20, 10, 20, 10); + + testDimensions(0, 0, 20.9, 10.9, 20, 10); + testDimensions(0, 0, 20.1, 10.1, 20, 10); + + testDimensions(-1, -1, 20, 10, 20, 10); + + testDimensions(-1.1, 0, 20, 10, 20, 10); + testDimensions(-1.9, 0, 20, 10, 20, 10); + +- name: 2d.imageData.get.invalid + desc: Verify getImageData() behavior in invalid cases. + code: | + imageData = ctx.getImageData(0,0,2,2); + var testValues = [NaN, true, false, "\"garbage\"", "-1", + "0", "1", "2", Infinity, -Infinity, + -5, -0.5, 0, 0.5, 5, + 5.4, 255, 256, null, undefined]; + var testResults = [0, 1, 0, 0, 0, + 0, 1, 2, 255, 0, + 0, 0, 0, 0, 5, + 5, 255, 255, 0, 0]; + for (var i = 0; i < testValues.length; i++) { + imageData.data[0] = testValues[i]; + @assert imageData.data[0] == testResults[i]; + } + imageData.data['foo']='garbage'; + @assert imageData.data['foo'] == 'garbage'; + imageData.data[-1]='garbage'; + @assert imageData.data[-1] == undefined; + imageData.data[17]='garbage'; + @assert imageData.data[17] == undefined; + +- name: 2d.imageData.object.properties + desc: ImageData objects have the right properties + code: | + var imgdata = ctx.getImageData(0, 0, 10, 10); + @assert typeof(imgdata.width) === 'number'; + @assert typeof(imgdata.height) === 'number'; + @assert typeof(imgdata.data) === 'object'; + +- name: 2d.imageData.object.readonly + desc: ImageData objects properties are read-only + code: | + var imgdata = ctx.getImageData(0, 0, 10, 10); + var w = imgdata.width; + var h = imgdata.height; + var d = imgdata.data; + imgdata.width = 123; + imgdata.height = 123; + imgdata.data = [100,100,100,100]; + @assert imgdata.width === w; + @assert imgdata.height === h; + @assert imgdata.data === d; + @assert imgdata.data[0] === 0; + @assert imgdata.data[1] === 0; + @assert imgdata.data[2] === 0; + @assert imgdata.data[3] === 0; + +- name: 2d.imageData.object.ctor.size + canvasType: ['HTMLCanvas'] + desc: ImageData has a usable constructor + code: | + @assert window.ImageData !== undefined; + + var imgdata = new window.ImageData(2, 3); + @assert imgdata.width === 2; + @assert imgdata.height === 3; + @assert imgdata.data.length === 2 * 3 * 4; + for (var i = 0; i < imgdata.data.length; ++i) { + @assert imgdata.data[i] === 0; + } + +- name: 2d.imageData.object.ctor.basics + canvasType: ['HTMLCanvas'] + desc: Testing different type of ImageData constructor + code: | + function setRGBA(imageData, i, rgba) + { + var s = i * 4; + imageData[s] = rgba[0]; + imageData[s + 1] = rgba[1]; + imageData[s + 2] = rgba[2]; + imageData[s + 3] = rgba[3]; + } + + function getRGBA(imageData, i) + { + var result = []; + var s = i * 4; + for (var j = 0; j < 4; j++) { + result[j] = imageData[s + j]; + } + return result; + } + + function assertArrayEquals(actual, expected) + { + @assert typeof actual === "object"; + @assert actual !== null; + @assert "length" in actual === true; + @assert actual.length === expected.length; + for (var i = 0; i < actual.length; i++) { + @assert actual.hasOwnProperty(i) === expected.hasOwnProperty(i); + @assert actual[i] === expected[i]; + } + } + + @assert ImageData !== undefined; + imageData = new ImageData(100, 50); + + @assert imageData !== null; + @assert imageData.data !== null; + @assert imageData.width === 100; + @assert imageData.height === 50; + assertArrayEquals(getRGBA(imageData.data, 4), [0, 0, 0, 0]); + + var testColor = [0, 255, 255, 128]; + setRGBA(imageData.data, 4, testColor); + assertArrayEquals(getRGBA(imageData.data, 4), testColor); + + @assert throws TypeError ImageData(1, 1); + @assert throws TypeError new ImageData(10); + @assert throws INDEX_SIZE_ERR new ImageData(0, 10); + @assert throws INDEX_SIZE_ERR new ImageData(10, 0); + @assert throws INDEX_SIZE_ERR new ImageData('width', 'height'); + @assert throws INDEX_SIZE_ERR new ImageData(1 << 31, 1 << 31); + @assert throws TypeError new ImageData(new Uint8ClampedArray(0)); + @assert throws INDEX_SIZE_ERR new ImageData(new Uint8Array(100), 25); + @assert throws INVALID_STATE_ERR new ImageData(new Uint8ClampedArray(27), 2); + @assert throws INDEX_SIZE_ERR new ImageData(new Uint8ClampedArray(28), 7, 0); + @assert throws INDEX_SIZE_ERR new ImageData(new Uint8ClampedArray(104), 14); + @assert throws INDEX_SIZE_ERR new ImageData(new Uint8ClampedArray([12, 34, 168, 65328]), 1, 151); + @assert throws TypeError new ImageData(self, 4, 4); + @assert throws TypeError new ImageData(null, 4, 4); + @assert throws INDEX_SIZE_ERR new ImageData(imageData.data, 0); + @assert throws INDEX_SIZE_ERR new ImageData(imageData.data, 13); + @assert throws INDEX_SIZE_ERR new ImageData(imageData.data, 1 << 31); + @assert throws INDEX_SIZE_ERR new ImageData(imageData.data, 'biggish'); + @assert throws INDEX_SIZE_ERR new ImageData(imageData.data, 1 << 24, 1 << 31); + @assert new ImageData(new Uint8ClampedArray(28), 7).height === 1; + + imageDataFromData = new ImageData(imageData.data, 100); + @assert imageDataFromData.width === 100; + @assert imageDataFromData.height === 50; + @assert imageDataFromData.data === imageData.data; + assertArrayEquals(getRGBA(imageDataFromData.data, 10), getRGBA(imageData.data, 10)); + setRGBA(imageData.data, 10, testColor); + assertArrayEquals(getRGBA(imageDataFromData.data, 10), getRGBA(imageData.data, 10)); + + var data = new Uint8ClampedArray(400); + data[22] = 129; + imageDataFromData = new ImageData(data, 20, 5); + @assert imageDataFromData.width === 20; + @assert imageDataFromData.height === 5; + @assert imageDataFromData.data === data; + assertArrayEquals(getRGBA(imageDataFromData.data, 2), getRGBA(data, 2)); + setRGBA(imageDataFromData.data, 2, testColor); + assertArrayEquals(getRGBA(imageDataFromData.data, 2), getRGBA(data, 2)); + + if (window.SharedArrayBuffer) { + @assert throws TypeError new ImageData(new Uint16Array(new SharedArrayBuffer(32)), 4, 2); + } + +- name: 2d.imageData.object.ctor.array + desc: ImageData has a usable constructor + canvasType: ['HTMLCanvas'] + code: | + @assert window.ImageData !== undefined; + + var array = new Uint8ClampedArray(8); + var imgdata = new window.ImageData(array, 1, 2); + @assert imgdata.width === 1; + @assert imgdata.height === 2; + @assert imgdata.data === array; + +- name: 2d.imageData.object.ctor.array.bounds + desc: ImageData has a usable constructor + canvasType: ['HTMLCanvas'] + code: | + @assert window.ImageData !== undefined; + + @assert throws INVALID_STATE_ERR new ImageData(new Uint8ClampedArray(0), 1); + @assert throws INVALID_STATE_ERR new ImageData(new Uint8ClampedArray(3), 1); + @assert throws INDEX_SIZE_ERR new ImageData(new Uint8ClampedArray(4), 0); + @assert throws INDEX_SIZE_ERR new ImageData(new Uint8ClampedArray(4), 1, 2); + @assert throws TypeError new ImageData(new Uint8Array(8), 1, 2); + @assert throws TypeError new ImageData(new Int8Array(8), 1, 2); + +- name: 2d.imageData.object.set + desc: ImageData.data can be modified + code: | + var imgdata = ctx.getImageData(0, 0, 10, 10); + imgdata.data[0] = 100; + @assert imgdata.data[0] === 100; + imgdata.data[0] = 200; + @assert imgdata.data[0] === 200; + +- name: 2d.imageData.object.undefined + desc: ImageData.data converts undefined to 0 + webidl: + - es-octet + code: | + var imgdata = ctx.getImageData(0, 0, 10, 10); + imgdata.data[0] = 100; + imgdata.data[0] = undefined; + @assert imgdata.data[0] === 0; + +- name: 2d.imageData.object.nan + desc: ImageData.data converts NaN to 0 + webidl: + - es-octet + code: | + var imgdata = ctx.getImageData(0, 0, 10, 10); + imgdata.data[0] = 100; + imgdata.data[0] = NaN; + @assert imgdata.data[0] === 0; + imgdata.data[0] = 100; + imgdata.data[0] = "cheese"; + @assert imgdata.data[0] === 0; + +- name: 2d.imageData.object.string + desc: ImageData.data converts strings to numbers with ToNumber + webidl: + - es-octet + code: | + var imgdata = ctx.getImageData(0, 0, 10, 10); + imgdata.data[0] = 100; + imgdata.data[0] = "110"; + @assert imgdata.data[0] === 110; + imgdata.data[0] = 100; + imgdata.data[0] = "0x78"; + @assert imgdata.data[0] === 120; + imgdata.data[0] = 100; + imgdata.data[0] = " +130e0 "; + @assert imgdata.data[0] === 130; + +- name: 2d.imageData.object.clamp + desc: ImageData.data clamps numbers to [0, 255] + webidl: + - es-octet + code: | + var imgdata = ctx.getImageData(0, 0, 10, 10); + + imgdata.data[0] = 100; + imgdata.data[0] = 300; + @assert imgdata.data[0] === 255; + imgdata.data[0] = 100; + imgdata.data[0] = -100; + @assert imgdata.data[0] === 0; + + imgdata.data[0] = 100; + imgdata.data[0] = 200+Math.pow(2, 32); + @assert imgdata.data[0] === 255; + imgdata.data[0] = 100; + imgdata.data[0] = -200-Math.pow(2, 32); + @assert imgdata.data[0] === 0; + + imgdata.data[0] = 100; + imgdata.data[0] = Math.pow(10, 39); + @assert imgdata.data[0] === 255; + imgdata.data[0] = 100; + imgdata.data[0] = -Math.pow(10, 39); + @assert imgdata.data[0] === 0; + + imgdata.data[0] = 100; + imgdata.data[0] = -Infinity; + @assert imgdata.data[0] === 0; + imgdata.data[0] = 100; + imgdata.data[0] = Infinity; + @assert imgdata.data[0] === 255; + +- name: 2d.imageData.object.round + desc: ImageData.data rounds numbers with round-to-zero + webidl: + - es-octet + code: | + var imgdata = ctx.getImageData(0, 0, 10, 10); + imgdata.data[0] = 0.499; + @assert imgdata.data[0] === 0; + imgdata.data[0] = 0.5; + @assert imgdata.data[0] === 0; + imgdata.data[0] = 0.501; + @assert imgdata.data[0] === 1; + imgdata.data[0] = 1.499; + @assert imgdata.data[0] === 1; + imgdata.data[0] = 1.5; + @assert imgdata.data[0] === 2; + imgdata.data[0] = 1.501; + @assert imgdata.data[0] === 2; + imgdata.data[0] = 2.5; + @assert imgdata.data[0] === 2; + imgdata.data[0] = 3.5; + @assert imgdata.data[0] === 4; + imgdata.data[0] = 252.5; + @assert imgdata.data[0] === 252; + imgdata.data[0] = 253.5; + @assert imgdata.data[0] === 254; + imgdata.data[0] = 254.5; + @assert imgdata.data[0] === 254; + imgdata.data[0] = 256.5; + @assert imgdata.data[0] === 255; + imgdata.data[0] = -0.5; + @assert imgdata.data[0] === 0; + imgdata.data[0] = -1.5; + @assert imgdata.data[0] === 0; + + + +- name: 2d.imageData.put.null + desc: putImageData() with null imagedata throws TypeError + code: | + @assert throws TypeError ctx.putImageData(null, 0, 0); + +- name: 2d.imageData.put.nonfinite + desc: putImageData() throws TypeError if arguments are not finite + notes: *bindings + code: | + var imgdata = ctx.getImageData(0, 0, 10, 10); + @nonfinite @assert throws TypeError ctx.putImageData(, <10 Infinity -Infinity NaN>, <10 Infinity -Infinity NaN>); + @nonfinite @assert throws TypeError ctx.putImageData(, <10 Infinity -Infinity NaN>, <10 Infinity -Infinity NaN>, <10 Infinity -Infinity NaN>, <10 Infinity -Infinity NaN>, <10 Infinity -Infinity NaN>, <10 Infinity -Infinity NaN>); + +- name: 2d.imageData.put.basic + desc: putImageData() puts image data from getImageData() onto the canvas + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50) + var imgdata = ctx.getImageData(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50) + ctx.putImageData(imgdata, 0, 0); + @assert pixel 50,25 ==~ 0,255,0,255; + expected: green + +- name: 2d.imageData.put.created + desc: putImageData() puts image data from createImageData() onto the canvas + code: | + var imgdata = ctx.createImageData(100, 50); + for (var i = 0; i < imgdata.data.length; i += 4) { + imgdata.data[i] = 0; + imgdata.data[i+1] = 255; + imgdata.data[i+2] = 0; + imgdata.data[i+3] = 255; + } + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50) + ctx.putImageData(imgdata, 0, 0); + @assert pixel 50,25 ==~ 0,255,0,255; + expected: green + +- name: 2d.imageData.put.wrongtype + desc: putImageData() does not accept non-ImageData objects + code: | + var imgdata = { width: 1, height: 1, data: [255, 0, 0, 255] }; + @assert throws TypeError ctx.putImageData(imgdata, 0, 0); + @assert throws TypeError ctx.putImageData("cheese", 0, 0); + @assert throws TypeError ctx.putImageData(42, 0, 0); + expected: green + +- name: 2d.imageData.put.cross + desc: putImageData() accepts image data got from a different canvas + canvasType: ['HTMLCanvas'] + code: | + var canvas2 = document.createElement('canvas'); + var ctx2 = canvas2.getContext('2d'); + ctx2.fillStyle = '#0f0'; + ctx2.fillRect(0, 0, 100, 50) + var imgdata = ctx2.getImageData(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50) + ctx.putImageData(imgdata, 0, 0); + @assert pixel 50,25 ==~ 0,255,0,255; + expected: green + +- name: 2d.imageData.put.cross + desc: putImageData() accepts image data got from a different canvas + canvasType: ['OffscreenCanvas', 'Worker'] + code: | + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var ctx2 = offscreenCanvas2.getContext('2d'); + ctx2.fillStyle = '#0f0'; + ctx2.fillRect(0, 0, 100, 50) + var imgdata = ctx2.getImageData(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50) + ctx.putImageData(imgdata, 0, 0); + @assert pixel 50,25 ==~ 0,255,0,255; + expected: green + +- name: 2d.imageData.put.alpha + desc: putImageData() puts non-solid image data correctly + code: | + ctx.fillStyle = 'rgba(0, 255, 0, 0.25)'; + ctx.fillRect(0, 0, 100, 50) + var imgdata = ctx.getImageData(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50) + ctx.putImageData(imgdata, 0, 0); + @assert pixel 50,25 ==~ 0,255,0,64; + expected: | + size 100 50 + cr.set_source_rgba(0, 1, 0, 0.25) + cr.rectangle(0, 0, 100, 50) + cr.fill() + +- name: 2d.imageData.put.modified + desc: putImageData() puts modified image data correctly + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50) + ctx.fillStyle = '#f00'; + ctx.fillRect(45, 20, 10, 10) + var imgdata = ctx.getImageData(45, 20, 10, 10); + for (var i = 0, len = imgdata.width*imgdata.height*4; i < len; i += 4) + { + imgdata.data[i] = 0; + imgdata.data[i+1] = 255; + } + ctx.putImageData(imgdata, 45, 20); + @assert pixel 50,25 ==~ 0,255,0,255; + expected: green + +- name: 2d.imageData.put.dirty.zero + desc: putImageData() with zero-sized dirty rectangle puts nothing + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50) + var imgdata = ctx.getImageData(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50) + ctx.putImageData(imgdata, 0, 0, 0, 0, 0, 0); + @assert pixel 50,25 ==~ 0,255,0,255; + expected: green + +- name: 2d.imageData.put.dirty.rect1 + desc: putImageData() only modifies areas inside the dirty rectangle, using width + and height + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50) + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 20, 20) + + var imgdata = ctx.getImageData(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50) + ctx.fillStyle = '#f00'; + ctx.fillRect(40, 20, 20, 20) + ctx.putImageData(imgdata, 40, 20, 0, 0, 20, 20); + + @assert pixel 50,25 ==~ 0,255,0,255; + @assert pixel 35,25 ==~ 0,255,0,255; + @assert pixel 65,25 ==~ 0,255,0,255; + @assert pixel 50,15 ==~ 0,255,0,255; + @assert pixel 50,45 ==~ 0,255,0,255; + expected: green + +- name: 2d.imageData.put.dirty.rect2 + desc: putImageData() only modifies areas inside the dirty rectangle, using x and + y + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50) + ctx.fillStyle = '#0f0'; + ctx.fillRect(60, 30, 20, 20) + + var imgdata = ctx.getImageData(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50) + ctx.fillStyle = '#f00'; + ctx.fillRect(40, 20, 20, 20) + ctx.putImageData(imgdata, -20, -10, 60, 30, 20, 20); + + @assert pixel 50,25 ==~ 0,255,0,255; + @assert pixel 35,25 ==~ 0,255,0,255; + @assert pixel 65,25 ==~ 0,255,0,255; + @assert pixel 50,15 ==~ 0,255,0,255; + @assert pixel 50,45 ==~ 0,255,0,255; + expected: green + +- name: 2d.imageData.put.dirty.negative + desc: putImageData() handles negative-sized dirty rectangles correctly + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50) + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 20, 20) + + var imgdata = ctx.getImageData(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50) + ctx.fillStyle = '#f00'; + ctx.fillRect(40, 20, 20, 20) + ctx.putImageData(imgdata, 40, 20, 20, 20, -20, -20); + + @assert pixel 50,25 ==~ 0,255,0,255; + @assert pixel 35,25 ==~ 0,255,0,255; + @assert pixel 65,25 ==~ 0,255,0,255; + @assert pixel 50,15 ==~ 0,255,0,255; + @assert pixel 50,45 ==~ 0,255,0,255; + expected: green + +- name: 2d.imageData.put.dirty.outside + desc: putImageData() handles dirty rectangles outside the canvas correctly + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50) + + var imgdata = ctx.getImageData(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50) + + ctx.putImageData(imgdata, 100, 20, 20, 20, -20, -20); + ctx.putImageData(imgdata, 200, 200, 0, 0, 100, 50); + ctx.putImageData(imgdata, 40, 20, -30, -20, 30, 20); + ctx.putImageData(imgdata, -30, 20, 0, 0, 30, 20); + + @assert pixel 50,25 ==~ 0,255,0,255; + @assert pixel 98,15 ==~ 0,255,0,255; + @assert pixel 98,25 ==~ 0,255,0,255; + @assert pixel 98,45 ==~ 0,255,0,255; + @assert pixel 1,5 ==~ 0,255,0,255; + @assert pixel 1,25 ==~ 0,255,0,255; + @assert pixel 1,45 ==~ 0,255,0,255; + expected: green + +- name: 2d.imageData.put.unchanged + desc: putImageData(getImageData(...), ...) has no effect + code: | + var i = 0; + for (var y = 0; y < 16; ++y) { + for (var x = 0; x < 16; ++x, ++i) { + ctx.fillStyle = 'rgba(' + i + ',' + (Math.floor(i*1.5) % 256) + ',' + (Math.floor(i*23.3) % 256) + ',' + (i/256) + ')'; + ctx.fillRect(x, y, 1, 1); + } + } + var imgdata1 = ctx.getImageData(0.1, 0.2, 15.8, 15.9); + var olddata = []; + for (var i = 0; i < imgdata1.data.length; ++i) + olddata[i] = imgdata1.data[i]; + + ctx.putImageData(imgdata1, 0.1, 0.2); + + var imgdata2 = ctx.getImageData(0.1, 0.2, 15.8, 15.9); + for (var i = 0; i < imgdata2.data.length; ++i) { + @assert olddata[i] === imgdata2.data[i]; + } + +- name: 2d.imageData.put.unaffected + desc: putImageData() is not affected by context state + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50) + var imgdata = ctx.getImageData(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50) + ctx.globalAlpha = 0.1; + ctx.globalCompositeOperation = 'destination-atop'; + ctx.shadowColor = '#f00'; + ctx.shadowBlur = 1; + ctx.translate(100, 50); + ctx.scale(0.1, 0.1); + ctx.putImageData(imgdata, 0, 0); + @assert pixel 50,25 ==~ 0,255,0,255; + expected: green + +- name: 2d.imageData.put.clip + desc: putImageData() is not affected by clipping regions + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50) + var imgdata = ctx.getImageData(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50) + ctx.beginPath(); + ctx.rect(0, 0, 50, 50); + ctx.clip(); + ctx.putImageData(imgdata, 0, 0); + @assert pixel 25,25 ==~ 0,255,0,255; + @assert pixel 75,25 ==~ 0,255,0,255; + expected: green + +- name: 2d.imageData.put.path + desc: putImageData() does not affect the current path + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50) + ctx.rect(0, 0, 100, 50); + var imgdata = ctx.getImageData(0, 0, 100, 50); + ctx.putImageData(imgdata, 0, 0); + ctx.fillStyle = '#0f0'; + ctx.fill(); + @assert pixel 50,25 ==~ 0,255,0,255; + expected: green diff --git a/testing/web-platform/tests/html/canvas/tools/yaml-new/reset.yaml b/testing/web-platform/tests/html/canvas/tools/yaml-new/reset.yaml new file mode 100644 index 0000000000..086fb04e04 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/yaml-new/reset.yaml @@ -0,0 +1,286 @@ +- name: 2d.reset.basic + desc: reset clears to transparent black + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height); + ctx.reset(); + @assert pixel 0,0 == 0,0,0,0; + @assert pixel 50,25 == 0,0,0,0; + @assert pixel 25,50 == 0,0,0,0; + @assert pixel 100,50 == 0,0,0,0; + @assert pixel 0,50 == 0,0,0,0; + @assert pixel 100,0 == 0,0,0,0; + t.done(); + +- name: 2d.reset.state + desc: check that the state is reset + code: | + const default_value = ctx.{{ state_name }}; + + ctx.{{ state_name }} = {{ new_value }}; + @assert ctx.{{ state_name }} == {{ new_value }}; + + ctx.reset(); + @assert ctx.{{ state_name }} == default_value; + + variants: + letter_spacing: + state_name: letterSpacing + new_value: "'12px'" + + word_spacing: + state_name: wordSpacing + new_value: "'12px'" + + fill_style: + state_name: fillStyle + new_value: "'#ffffff'" + + stroke_style: + state_name: strokeStyle + new_value: "'#ffffff'" + + filter: + state_name: filter + new_value: "'blur(10px)'" + + font: + state_name: font + new_value: "'25px sans-serif'" + + global_alpha: + state_name: globalAlpha + new_value: 0.5 + + global_composite_operation: + state_name: globalCompositeOperation + new_value: "'destination-over'" + + line_width: + state_name: lineWidth + new_value: 1 + + line_cap: + state_name: lineCap + new_value: "'square'" + + line_join: + state_name: lineJoin + new_value: "'bevel'" + + miter_limit: + state_name: miterLimit + new_value: 1.0 + + line_dash_offset: + state_name: lineDashOffset + new_value: 1.0 + + shadow_offset_x: + state_name: shadowOffsetX + new_value: 10.0 + + shadow_offset_y: + state_name: shadowOffsetY + new_value: 10.0 + + shadow_blur: + state_name: shadowBlur + new_value: 10.0 + + shadow_color: + state_name: shadowColor + new_value: "'#ff0000'" + + font: + state_name: font + new_value: "'16px sans-serif'" + + text_align: + state_name: textAlign + new_value: "'end'" + + text_baseline: + state_name: textBaseline + new_value: "'middle'" + + direction: + state_name: direction + new_value: "'rtl'" + + font_kerning: + state_name: fontKerning + new_value: "'normal'" + + font_stretch: + state_name: fontStretch + new_value: "'ultra-condensed'" + + font_variant_caps: + state_name: fontVariantCaps + new_value: "'unicase'" + + text_rendering: + state_name: textRendering + new_value: "'geometricPrecision'" + + image_smoothing_enabled: + state_name: imageSmoothingEnabled + new_value: "false" + + image_smoothing_quality: + state_name: imageSmoothingQuality + new_value: "'high'" + +- name: 2d.reset.state.transformation_matrix + desc: check that the state is reset + code: | + ctx.scale(2, 2); + + ctx.reset(); + @assert ctx.getTransform().isIdentity; + +- name: 2d.reset.state.clip + desc: check that the clip is reset + size: [200, 200] + code: | + ctx.beginPath(); + ctx.rect(0, 0, 100, 100); + ctx.clip(); + + ctx.fillRect(0, 0, 200, 200); + + ctx.reset(); + + ctx.fillRect(0, 0, 200, 200); + reference: | + ctx.fillRect(0, 0, 200, 200); + +- name: 2d.reset.state.line_dash + desc: check that the line dash is reset + code: | + ctx.setLineDash([1, 2]); + + ctx.reset(); + @assert ctx.getLineDash().length == 0; + +- name: 2d.reset.render.drop_shadow + desc: check that drop shadows are correctly rendered after reset + size: [500, 500] + code: | + ctx.shadowOffsetX = 10; + ctx.shadowOffsetY = 10; + ctx.shadowColor = "red"; + ctx.shadowBlur = 10; + + ctx.reset(); + + ctx.fillRect(100, 100, 100, 100); + reference: | + ctx.fillRect(100, 100, 100, 100); + +- name: 2d.reset.render.text + desc: check that text is correctly rendered after reset + size: [400, 400] + code: | + ctx.font = "24px serif"; + ctx.textAlign = "center"; + ctx.textBaseline = "hanging"; + ctx.direction = "rtl"; + ctx.letterSpacing = "10px"; + ctx.fontKerning = "none"; + ctx.fontStretch = "semi-condensed"; + ctx.fontVariantCaps = "tilting-caps"; + ctx.textRendering = "optimizeLegibility"; + ctx.wordSpacing = "20px"; + + ctx.reset(); + + ctx.fillText("Lorem ipsum dolor sit amet, consectetur adipiscing elit", 0, 10); + reference: | + ctx.fillText("Lorem ipsum dolor sit amet, consectetur adipiscing elit", 0, 10); + +- name: 2d.reset.render.line + desc: check that lines are correctly rendered after reset + size: [400, 400] + code: | + ctx.lineWidth = 10; + ctx.lineCap = "round"; + ctx.lineJoin = "bevel"; + ctx.lineDashOffset = 10; + ctx.setLineDash([20]); + + ctx.reset(); + + ctx.beginPath(); + ctx.moveTo(100, 100); + ctx.lineTo(100, 300); + ctx.lineTo(300, 300); + ctx.lineTo(300, 100); + ctx.stroke(); + reference: | + ctx.beginPath(); + ctx.moveTo(100, 100); + ctx.lineTo(100, 300); + ctx.lineTo(300, 300); + ctx.lineTo(300, 100); + ctx.stroke(); + +- name: 2d.reset.render.miter_limit + desc: check that the lines are correctly rendered with the default miter limit after reset + size: [400, 400] + code: | + ctx.miterLimit = 6; + + ctx.reset(); + + ctx.lineWidth = 10; + + ctx.beginPath(); + ctx.moveTo(0, 100); + for (let i = 0; i < 24; i++) { + const dy = i % 2 === 0 ? 25 : -25; + ctx.lineTo(Math.pow(i, 1.5) * 2, 75 + dy); + } + ctx.stroke(); + reference: | + ctx.lineWidth = 10; + + ctx.beginPath(); + ctx.moveTo(0, 100); + for (let i = 0; i < 24; i++) { + const dy = i % 2 === 0 ? 25 : -25; + ctx.lineTo(Math.pow(i, 1.5) * 2, 75 + dy); + } + ctx.stroke(); + +- name: 2d.reset.render.global_composite_operation + desc: check that canvas correctly renders rectangles with the default global composite operation after reset + size: [400, 400] + code: | + ctx.globalCompositeOperation = "xor"; + + ctx.reset(); + + ctx.fillRect(10, 10, 100, 100); + ctx.fillRect(50, 50, 100, 100); + reference: | + ctx.fillRect(10, 10, 100, 100); + ctx.fillRect(50, 50, 100, 100); + +- name: 2d.reset.render.misc + desc: check that canvas correctly renders rectangles after reset (states not covered by other tests) + size: [400, 400] + code: | + ctx.fillStyle = "red"; + ctx.strokeStyle = "red"; + ctx.globalAlpha = 0.5; + ctx.filter = "blur(2px)"; + + ctx.reset(); + + ctx.fillRect(0, 0, 100, 100); + ctx.strokeRect(150, 150, 100, 100); + reference: | + ctx.fillRect(0, 0, 100, 100); + ctx.strokeRect(150, 150, 100, 100); diff --git a/testing/web-platform/tests/html/canvas/tools/yaml-new/scroll.yaml b/testing/web-platform/tests/html/canvas/tools/yaml-new/scroll.yaml new file mode 100644 index 0000000000..dd088aa396 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/yaml-new/scroll.yaml @@ -0,0 +1,76 @@ +- name: 2d.scrollPathIntoView.basic + desc: scrollPathIntoView() works + canvasType: + ['HTMLCanvas'] + code: | + var div = document.createElement('div'); + div.style.cssText = 'width: 200vw; height: 200vh'; + document.body.appendChild(div); + canvas.style.cssText = 'position: absolute; top: 100px; left: 200px; border: none;'; + window.scrollTo(0, 0); + + ctx.beginPath(); + ctx.rect(4, 8, 16, 32); + ctx.scrollPathIntoView(); + var rect = canvas.getBoundingClientRect(); + @assert Math.round(rect.top) === -8; + @assert Math.round(rect.left) === 200; + +- name: 2d.scrollPathIntoView.verticalLR + desc: scrollPathIntoView() works in vertical-lr writing mode + canvasType: + ['HTMLCanvas'] + code: | + document.documentElement.style.cssText = 'writing-mode: vertical-lr'; + var div = document.createElement('div'); + div.style.cssText = 'width: 200vw; height: 200vh'; + document.body.appendChild(div); + canvas.style.cssText = 'position: absolute; top: 100px; left: 200px; border: none;'; + window.scrollTo(0, 0); + + ctx.beginPath(); + ctx.rect(4, 8, 16, 32); + ctx.scrollPathIntoView(); + var rect = canvas.getBoundingClientRect(); + @assert Math.round(rect.top) === 100; + @assert Math.round(rect.left) === -4; + +- name: 2d.scrollPathIntoView.verticalRL + desc: scrollPathIntoView() works in vertical-rl writing mode + canvasType: + ['HTMLCanvas'] + code: | + document.documentElement.style.cssText = 'writing-mode: vertical-rl'; + var div = document.createElement('div'); + div.style.cssText = 'width: 200vw; height: 200vh'; + document.body.appendChild(div); + canvas.style.cssText = 'position: absolute; top: 100px; right: 200px; border: none;'; + window.scrollTo(0, 0); + + ctx.beginPath(); + ctx.rect(4, 8, 16, 32); + ctx.scrollPathIntoView(); + var rect = canvas.getBoundingClientRect(); + var viewportWidth = document.scrollingElement.clientWidth; + var canvasWidth = canvas.width; + @assert Math.round(rect.top) === 100; + @assert Math.round(rect.right) === viewportWidth + (canvasWidth - 4 - 16); + +- name: 2d.scrollPathIntoView.path + desc: scrollPathIntoView() with path argument works + canvasType: + ['HTMLCanvas'] + code: | + var div = document.createElement('div'); + div.style.cssText = 'width: 200vw; height: 200vh'; + document.body.appendChild(div); + canvas.style.cssText = 'position: absolute; top: 100px; left: 200px; border: none;'; + window.scrollTo(0, 0); + + var path = new Path2D(); + path.rect(4, 8, 16, 32); + ctx.scrollPathIntoView(path); + var rect = canvas.getBoundingClientRect(); + @assert Math.round(rect.top) === -8; + @assert Math.round(rect.left) === 200; + diff --git a/testing/web-platform/tests/html/canvas/tools/yaml-new/shadows.yaml b/testing/web-platform/tests/html/canvas/tools/yaml-new/shadows.yaml new file mode 100644 index 0000000000..953ab2c555 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/yaml-new/shadows.yaml @@ -0,0 +1,1090 @@ +- name: 2d.shadow.attributes.shadowBlur.initial + code: | + @assert ctx.shadowBlur === 0; + +- name: 2d.shadow.attributes.shadowBlur.valid + code: | + ctx.shadowBlur = 1; + @assert ctx.shadowBlur === 1; + + ctx.shadowBlur = 0.5; + @assert ctx.shadowBlur === 0.5; + + ctx.shadowBlur = 1e6; + @assert ctx.shadowBlur === 1e6; + + ctx.shadowBlur = 0; + @assert ctx.shadowBlur === 0; + +- name: 2d.shadow.attributes.shadowBlur.invalid + code: | + ctx.shadowBlur = 1; + ctx.shadowBlur = -2; + @assert ctx.shadowBlur === 1; + + ctx.shadowBlur = 1; + ctx.shadowBlur = Infinity; + @assert ctx.shadowBlur === 1; + + ctx.shadowBlur = 1; + ctx.shadowBlur = -Infinity; + @assert ctx.shadowBlur === 1; + + ctx.shadowBlur = 1; + ctx.shadowBlur = NaN; + @assert ctx.shadowBlur === 1; + + ctx.shadowBlur = 1; + ctx.shadowBlur = 'string'; + @assert ctx.shadowBlur === 1; + + ctx.shadowBlur = 1; + ctx.shadowBlur = true; + @assert ctx.shadowBlur === 1; + + ctx.shadowBlur = 1; + ctx.shadowBlur = false; + @assert ctx.shadowBlur === 0; + +- name: 2d.shadow.attributes.shadowOffset.initial + code: | + @assert ctx.shadowOffsetX === 0; + @assert ctx.shadowOffsetY === 0; + +- name: 2d.shadow.attributes.shadowOffset.valid + code: | + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + @assert ctx.shadowOffsetX === 1; + @assert ctx.shadowOffsetY === 2; + + ctx.shadowOffsetX = 0.5; + ctx.shadowOffsetY = 0.25; + @assert ctx.shadowOffsetX === 0.5; + @assert ctx.shadowOffsetY === 0.25; + + ctx.shadowOffsetX = -0.5; + ctx.shadowOffsetY = -0.25; + @assert ctx.shadowOffsetX === -0.5; + @assert ctx.shadowOffsetY === -0.25; + + ctx.shadowOffsetX = 0; + ctx.shadowOffsetY = 0; + @assert ctx.shadowOffsetX === 0; + @assert ctx.shadowOffsetY === 0; + + ctx.shadowOffsetX = 1e6; + ctx.shadowOffsetY = 1e6; + @assert ctx.shadowOffsetX === 1e6; + @assert ctx.shadowOffsetY === 1e6; + +- name: 2d.shadow.attributes.shadowOffset.invalid + code: | + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + ctx.shadowOffsetX = Infinity; + ctx.shadowOffsetY = Infinity; + @assert ctx.shadowOffsetX === 1; + @assert ctx.shadowOffsetY === 2; + + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + ctx.shadowOffsetX = -Infinity; + ctx.shadowOffsetY = -Infinity; + @assert ctx.shadowOffsetX === 1; + @assert ctx.shadowOffsetY === 2; + + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + ctx.shadowOffsetX = NaN; + ctx.shadowOffsetY = NaN; + @assert ctx.shadowOffsetX === 1; + @assert ctx.shadowOffsetY === 2; + + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + ctx.shadowOffsetX = 'string'; + ctx.shadowOffsetY = 'string'; + @assert ctx.shadowOffsetX === 1; + @assert ctx.shadowOffsetY === 2; + + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + ctx.shadowOffsetX = true; + ctx.shadowOffsetY = true; + @assert ctx.shadowOffsetX === 1; + @assert ctx.shadowOffsetY === 1; + + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + ctx.shadowOffsetX = false; + ctx.shadowOffsetY = false; + @assert ctx.shadowOffsetX === 0; + @assert ctx.shadowOffsetY === 0; + +- name: 2d.shadow.attributes.shadowColor.initial + code: | + @assert ctx.shadowColor === 'rgba(0, 0, 0, 0)'; + +- name: 2d.shadow.attributes.shadowColor.valid + code: | + ctx.shadowColor = 'lime'; + @assert ctx.shadowColor === '#00ff00'; + + ctx.shadowColor = 'RGBA(0,255, 0,0)'; + @assert ctx.shadowColor === 'rgba(0, 255, 0, 0)'; + +- name: 2d.shadow.attributes.shadowColor.current.basic + desc: currentColor is computed from the canvas element + canvasType: ['HtmlCanvas'] + code: | + canvas.style.color = '#0f0'; + ctx.shadowColor = 'currentColor'; + @assert ctx.shadowColor === '#00ff00'; + +- name: 2d.shadow.attributes.shadowColor.current.changed + desc: currentColor is computed when the attribute is set, not when it is painted + canvasType: ['HtmlCanvas'] + code: | + canvas.style.color = '#0f0'; + ctx.shadowColor = 'currentColor'; + canvas.style.color = '#f00'; + @assert ctx.shadowColor === '#00ff00'; + +- name: 2d.shadow.attributes.shadowColor.current.removed + desc: currentColor is solid black when the canvas element is not in a document + canvasType: ['HtmlCanvas'] + code: | + // Try not to let it undetectably incorrectly pick up opaque-black + // from other parts of the document: + document.documentElement.style.color = '#f00'; + document.body.style.color = '#f00'; + canvas.style.color = '#f00'; + + canvas.remove(); + ctx.shadowColor = 'currentColor'; + @assert ctx.shadowColor === '#000000'; + +- name: 2d.shadow.attributes.shadowColor.invalid + code: | + ctx.shadowColor = '#00ff00'; + ctx.shadowColor = 'bogus'; + @assert ctx.shadowColor === '#00ff00'; + + ctx.shadowColor = '#00ff00'; + ctx.shadowColor = 'red bogus'; + @assert ctx.shadowColor === '#00ff00'; + + ctx.shadowColor = '#00ff00'; + ctx.shadowColor = ctx; + @assert ctx.shadowColor === '#00ff00'; + + ctx.shadowColor = '#00ff00'; + ctx.shadowColor = undefined; + @assert ctx.shadowColor === '#00ff00'; + +- name: 2d.shadow.enable.off.1 + desc: Shadows are not drawn when only shadowColor is set + code: | + ctx.shadowColor = '#f00'; + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.shadow.enable.off.2 + desc: Shadows are not drawn when only shadowColor is set + code: | + ctx.globalCompositeOperation = 'destination-atop'; + ctx.shadowColor = '#f00'; + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.shadow.enable.blur + desc: Shadows are drawn if shadowBlur is set + code: | + ctx.globalCompositeOperation = 'destination-atop'; + ctx.shadowColor = '#0f0'; + ctx.shadowBlur = 0.1; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.shadow.enable.x + desc: Shadows are drawn if shadowOffsetX is set + code: | + ctx.globalCompositeOperation = 'destination-atop'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 0.1; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.shadow.enable.y + desc: Shadows are drawn if shadowOffsetY is set + code: | + ctx.globalCompositeOperation = 'destination-atop'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 0.1; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.shadow.offset.positiveX + desc: Shadows can be offset with positive x + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 50; + ctx.fillRect(0, 0, 50, 50); + @assert pixel 25,25 == 0,255,0,255; + @assert pixel 75,25 == 0,255,0,255; + expected: green + +- name: 2d.shadow.offset.negativeX + desc: Shadows can be offset with negative x + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = -50; + ctx.fillRect(50, 0, 50, 50); + @assert pixel 25,25 == 0,255,0,255; + @assert pixel 75,25 == 0,255,0,255; + expected: green + +- name: 2d.shadow.offset.positiveY + desc: Shadows can be offset with positive y + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 25; + ctx.fillRect(0, 0, 100, 25); + @assert pixel 50,12 == 0,255,0,255; + @assert pixel 50,37 == 0,255,0,255; + expected: green + +- name: 2d.shadow.offset.negativeY + desc: Shadows can be offset with negative y + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = -25; + ctx.fillRect(0, 25, 100, 25); + @assert pixel 50,12 == 0,255,0,255; + @assert pixel 50,37 == 0,255,0,255; + expected: green + +- name: 2d.shadow.outside + desc: Shadows of shapes outside the visible area can be offset onto the visible + area + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 100; + ctx.fillRect(-100, 0, 25, 50); + ctx.shadowOffsetX = -100; + ctx.fillRect(175, 0, 25, 50); + ctx.shadowOffsetX = 0; + ctx.shadowOffsetY = 100; + ctx.fillRect(25, -100, 50, 25); + ctx.shadowOffsetY = -100; + ctx.fillRect(25, 125, 50, 25); + @assert pixel 12,25 == 0,255,0,255; + @assert pixel 87,25 == 0,255,0,255; + @assert pixel 50,12 == 0,255,0,255; + @assert pixel 50,37 == 0,255,0,255; + expected: green + +- name: 2d.shadow.clip.1 + desc: Shadows of clipped shapes are still drawn within the clipping region + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + + ctx.save(); + ctx.beginPath(); + ctx.rect(50, 0, 50, 50); + ctx.clip(); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 50; + ctx.fillRect(0, 0, 50, 50); + ctx.restore(); + + @assert pixel 25,25 == 0,255,0,255; + @assert pixel 75,25 == 0,255,0,255; + expected: green + +- name: 2d.shadow.clip.2 + desc: Shadows are not drawn outside the clipping region + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 50); + + ctx.save(); + ctx.beginPath(); + ctx.rect(0, 0, 50, 50); + ctx.clip(); + ctx.shadowColor = '#f00'; + ctx.shadowOffsetX = 50; + ctx.fillRect(0, 0, 50, 50); + ctx.restore(); + + @assert pixel 25,25 == 0,255,0,255; + @assert pixel 75,25 == 0,255,0,255; + expected: green + +- name: 2d.shadow.clip.3 + desc: Shadows of clipped shapes are still drawn within the clipping region + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 50); + + ctx.save(); + ctx.beginPath(); + ctx.rect(0, 0, 50, 50); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 50; + ctx.fillRect(-50, 0, 50, 50); + ctx.restore(); + + @assert pixel 25,25 == 0,255,0,255; + @assert pixel 75,25 == 0,255,0,255; + expected: green + +- name: 2d.shadow.stroke.basic + desc: Shadows are drawn for strokes + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.beginPath(); + ctx.lineWidth = 50; + ctx.moveTo(0, -25); + ctx.lineTo(100, -25); + ctx.stroke(); + + @assert pixel 1,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 98,25 == 0,255,0,255; + expected: green + +- name: 2d.shadow.stroke.cap.1 + desc: Shadows are not drawn for areas outside stroke caps + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#f00'; + ctx.shadowOffsetY = 50; + ctx.beginPath(); + ctx.lineWidth = 50; + ctx.lineCap = 'butt'; + ctx.moveTo(-50, -25); + ctx.lineTo(0, -25); + ctx.moveTo(100, -25); + ctx.lineTo(150, -25); + ctx.stroke(); + + @assert pixel 1,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 98,25 == 0,255,0,255; + expected: green + +- name: 2d.shadow.stroke.cap.2 + desc: Shadows are drawn for stroke caps + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.beginPath(); + ctx.lineWidth = 50; + ctx.lineCap = 'square'; + ctx.moveTo(25, -25); + ctx.lineTo(75, -25); + ctx.stroke(); + + @assert pixel 1,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 98,25 == 0,255,0,255; + expected: green + +- name: 2d.shadow.stroke.join.1 + desc: Shadows are not drawn for areas outside stroke joins + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#f00'; + ctx.shadowOffsetX = 100; + ctx.lineWidth = 200; + ctx.lineJoin = 'bevel'; + ctx.beginPath(); + ctx.moveTo(-200, -50); + ctx.lineTo(-150, -50); + ctx.lineTo(-151, -100); + ctx.stroke(); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 48,48 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.shadow.stroke.join.2 + desc: Shadows are drawn for stroke joins + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 100; + ctx.lineWidth = 200; + ctx.lineJoin = 'miter'; + ctx.beginPath(); + ctx.moveTo(-200, -50); + ctx.lineTo(-150, -50); + ctx.lineTo(-151, -100); + ctx.stroke(); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 48,48 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.shadow.stroke.join.3 + desc: Shadows are drawn for stroke joins respecting miter limit + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#f00'; + ctx.shadowOffsetX = 100; + ctx.lineWidth = 200; + ctx.lineJoin = 'miter'; + ctx.miterLimit = 0.1; + ctx.beginPath(); + ctx.moveTo(-200, -50); + ctx.lineTo(-150, -50); + ctx.lineTo(-151, -100); // (not an exact right angle, to avoid some other bug in Firefox 3) + ctx.stroke(); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 48,48 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green + +- name: 2d.shadow.image.basic + desc: Shadows are drawn for images + images: + - red.png + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + {{ load_image }} + ctx.drawImage(img, 0, -50); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + variants: &load-image-variant-definition + _HtmlCanvas: + canvasType: ['HtmlCanvas'] + load_image: var img = document.getElementById('{{ images[0] }}'); + _OffscreenCanvas: + canvasType: ['OffscreenCanvas', 'Worker'] + test_type: promise + load_image: |- + var response = await fetch('/images/{{ images[0] }}') + var blob = await response.blob(); + var img = await createImageBitmap(blob); + +- name: 2d.shadow.image.transparent.1 + desc: Shadows are not drawn for transparent images + images: + - transparent.png + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#f00'; + ctx.shadowOffsetY = 50; + {{ load_image }} + ctx.drawImage(img, 0, -50); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + variants: *load-image-variant-definition + +- name: 2d.shadow.image.transparent.2 + desc: Shadows are not drawn for transparent parts of images + images: + - redtransparent.png + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + {{ load_image }} + ctx.drawImage(img, 50, -50); + ctx.shadowColor = '#f00'; + ctx.drawImage(img, -50, -50); + + @assert pixel 25,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 75,25 == 0,255,0,255; + expected: green + variants: *load-image-variant-definition + +- name: 2d.shadow.image.alpha + desc: Shadows are drawn correctly for partially-transparent images + images: + - transparent50.png + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#00f'; + {{ load_image }} + ctx.drawImage(img, 0, -50); + + @assert pixel 50,25 ==~ 127,0,127,255; + expected: | + size 100 50 + cr.set_source_rgb(0.5, 0, 0.5) + cr.rectangle(0, 0, 100, 50) + cr.fill() + variants: *load-image-variant-definition + +- name: 2d.shadow.image.section + desc: Shadows are not drawn for areas outside image source rectangles + images: + - redtransparent.png + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#f00'; + {{ load_image }} + ctx.drawImage(img, 50, 0, 50, 50, 0, -50, 50, 50); + + @assert pixel 25,25 ==~ 0,255,0,255; + @assert pixel 50,25 ==~ 0,255,0,255; + @assert pixel 75,25 ==~ 0,255,0,255; + expected: green + variants: *load-image-variant-definition + +- name: 2d.shadow.image.scale + desc: Shadows are drawn correctly for scaled images + images: + - redtransparent.png + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + {{ load_image }} + ctx.drawImage(img, 0, 0, 100, 50, -10, -50, 240, 50); + + @assert pixel 25,25 ==~ 0,255,0,255; + @assert pixel 50,25 ==~ 0,255,0,255; + @assert pixel 75,25 ==~ 0,255,0,255; + expected: green + variants: *load-image-variant-definition + +- name: 2d.shadow.canvas.basic + desc: Shadows are drawn for canvases + code: | + {{ create_canvas2 }} + var ctx2 = canvas2.getContext('2d'); + ctx2.fillStyle = '#f00'; + ctx2.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.drawImage(canvas2, 0, -50); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + variants: &create-canvas2-variant-definition + _HtmlCanvas: + canvasType: ['HtmlCanvas'] + create_canvas2: |- + var canvas2 = document.createElement('canvas'); + canvas2.width = 100; + canvas2.height = 50; + _OffscreenCanvas: + canvasType: ['OffscreenCanvas', 'Worker'] + create_canvas2: |- + var canvas2 = new OffscreenCanvas(100, 50); + +- name: 2d.shadow.canvas.transparent.1 + desc: Shadows are not drawn for transparent canvases + code: | + {{ create_canvas2 }} + var ctx2 = canvas2.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#f00'; + ctx.shadowOffsetY = 50; + ctx.drawImage(canvas2, 0, -50); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + variants: *create-canvas2-variant-definition + +- name: 2d.shadow.canvas.transparent.2 + desc: Shadows are not drawn for transparent parts of canvases + code: | + {{ create_canvas2 }} + var ctx2 = canvas2.getContext('2d'); + ctx2.fillStyle = '#f00'; + ctx2.fillRect(0, 0, 50, 50); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.drawImage(canvas2, 50, -50); + ctx.shadowColor = '#f00'; + ctx.drawImage(canvas2, -50, -50); + + @assert pixel 25,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 75,25 == 0,255,0,255; + expected: green + variants: *create-canvas2-variant-definition + +- name: 2d.shadow.canvas.alpha + desc: Shadows are drawn correctly for partially-transparent canvases + code: | + {{ create_canvas2 }} + var ctx2 = canvas2.getContext('2d'); + ctx2.fillStyle = 'rgba(255, 0, 0, 0.5)'; + ctx2.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#00f'; + ctx.drawImage(canvas2, 0, -50); + + @assert pixel 50,25 ==~ 127,0,127,255; + expected: | + size 100 50 + cr.set_source_rgb(0.5, 0, 0.5) + cr.rectangle(0, 0, 100, 50) + cr.fill() + variants: *create-canvas2-variant-definition + +- name: 2d.shadow.pattern.basic + desc: Shadows are drawn for fill patterns + # http://bugs.webkit.org/show_bug.cgi?id=15266 + images: + - red.png + code: | + {{ load_image }} + var pattern = ctx.createPattern(img, 'repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + variants: *load-image-variant-definition + +- name: 2d.shadow.pattern.transparent.1 + desc: Shadows are not drawn for transparent fill patterns + # http://bugs.webkit.org/show_bug.cgi?id=15266 + images: + - transparent.png + code: | + {{ load_image }} + var pattern = ctx.createPattern(img, 'repeat'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#f00'; + ctx.shadowOffsetY = 50; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + variants: *load-image-variant-definition + +- name: 2d.shadow.pattern.transparent.2 + desc: Shadows are not drawn for transparent parts of fill patterns + # http://bugs.webkit.org/show_bug.cgi?id=15266 + images: + - redtransparent.png + code: | + {{ load_image }} + var pattern = ctx.createPattern(img, 'repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + + @assert pixel 25,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 75,25 == 0,255,0,255; + expected: green + variants: *load-image-variant-definition + +- name: 2d.shadow.pattern.alpha + desc: Shadows are drawn correctly for partially-transparent fill patterns + # http://bugs.webkit.org/show_bug.cgi?id=15266 + images: + - transparent50.png + code: | + {{ load_image }} + var pattern = ctx.createPattern(img, 'repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#00f'; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + + @assert pixel 50,25 ==~ 127,0,127,255; + expected: | + size 100 50 + cr.set_source_rgb(0.5, 0, 0.5) + cr.rectangle(0, 0, 100, 50) + cr.fill() + variants: *load-image-variant-definition + +- name: 2d.shadow.gradient.basic + desc: Shadows are drawn for gradient fills + # http://bugs.webkit.org/show_bug.cgi?id=15266 + code: | + var gradient = ctx.createLinearGradient(0, 0, 100, 0); + gradient.addColorStop(0, '#f00'); + gradient.addColorStop(1, '#f00'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.fillStyle = gradient; + ctx.fillRect(0, -50, 100, 50); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.shadow.gradient.transparent.1 + desc: Shadows are not drawn for transparent gradient fills + # http://bugs.webkit.org/show_bug.cgi?id=15266 + code: | + var gradient = ctx.createLinearGradient(0, 0, 100, 0); + gradient.addColorStop(0, 'rgba(0,0,0,0)'); + gradient.addColorStop(1, 'rgba(0,0,0,0)'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#f00'; + ctx.shadowOffsetY = 50; + ctx.fillStyle = gradient; + ctx.fillRect(0, -50, 100, 50); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.shadow.gradient.transparent.2 + desc: Shadows are not drawn for transparent parts of gradient fills + # http://bugs.webkit.org/show_bug.cgi?id=15266 + code: | + var gradient = ctx.createLinearGradient(0, 0, 100, 0); + gradient.addColorStop(0, '#f00'); + gradient.addColorStop(0.499, '#f00'); + gradient.addColorStop(0.5, 'rgba(0,0,0,0)'); + gradient.addColorStop(1, 'rgba(0,0,0,0)'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.fillStyle = gradient; + ctx.fillRect(0, -50, 100, 50); + + @assert pixel 25,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 75,25 == 0,255,0,255; + expected: green + +- name: 2d.shadow.gradient.alpha + desc: Shadows are drawn correctly for partially-transparent gradient fills + # http://bugs.webkit.org/show_bug.cgi?id=15266 + code: | + var gradient = ctx.createLinearGradient(0, 0, 100, 0); + gradient.addColorStop(0, 'rgba(255,0,0,0.5)'); + gradient.addColorStop(1, 'rgba(255,0,0,0.5)'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#00f'; + ctx.fillStyle = gradient; + ctx.fillRect(0, -50, 100, 50); + + @assert pixel 50,25 ==~ 127,0,127,255; + expected: | + size 100 50 + cr.set_source_rgb(0.5, 0, 0.5) + cr.rectangle(0, 0, 100, 50) + cr.fill() + +- name: 2d.shadow.transform.1 + desc: Shadows take account of transformations + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.translate(100, 100); + ctx.fillRect(-100, -150, 100, 50); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.shadow.transform.2 + desc: Shadow offsets are not affected by transformations + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.rotate(Math.PI) + ctx.fillRect(-100, 0, 100, 50); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.shadow.blur.low + desc: Shadows look correct for small blurs + manual: + code: | + ctx.fillStyle = '#ff0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#00f'; + ctx.shadowOffsetY = 25; + for (var x = 0; x < 100; ++x) { + ctx.save(); + ctx.beginPath(); + ctx.rect(x, 0, 1, 50); + ctx.clip(); + ctx.shadowBlur = x; + ctx.fillRect(-200, -200, 500, 200); + ctx.restore(); + } + expected: | + size 100 50 + import math + cr.set_source_rgb(0, 0, 1) + cr.rectangle(0, 0, 1, 25) + cr.fill() + cr.set_source_rgb(1, 1, 0) + cr.rectangle(0, 25, 1, 25) + cr.fill() + for x in range(1, 100): + sigma = x/2.0 + filter = [] + for i in range(-24, 26): + filter.append(math.exp(-i*i / (2*sigma*sigma)) / (math.sqrt(2*math.pi)*sigma)) + accum = [0] + for f in filter: + accum.append(accum[-1] + f) + for y in range(0, 50): + cr.set_source_rgb(accum[y], accum[y], 1-accum[y]) + cr.rectangle(x, y, 1, 1) + cr.fill() + +- name: 2d.shadow.blur.high + desc: Shadows look correct for large blurs + manual: + code: | + ctx.fillStyle = '#ff0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#00f'; + ctx.shadowOffsetY = 0; + ctx.shadowBlur = 100; + ctx.fillRect(-200, -200, 200, 400); + expected: | + size 100 50 + import math + sigma = 100.0/2 + filter = [] + for i in range(-200, 100): + filter.append(math.exp(-i*i / (2*sigma*sigma)) / (math.sqrt(2*math.pi)*sigma)) + accum = [0] + for f in filter: + accum.append(accum[-1] + f) + for x in range(0, 100): + cr.set_source_rgb(accum[x+200], accum[x+200], 1-accum[x+200]) + cr.rectangle(x, 0, 1, 50) + cr.fill() + +- name: 2d.shadow.alpha.1 + desc: Shadow color alpha components are used + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = 'rgba(255, 0, 0, 0.01)'; + ctx.shadowOffsetY = 50; + ctx.fillRect(0, -50, 100, 50); + + @assert pixel 50,25 ==~ 0,255,0,255 +/- 4; + expected: green + +- name: 2d.shadow.alpha.2 + desc: Shadow color alpha components are used + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = 'rgba(0, 0, 255, 0.5)'; + ctx.shadowOffsetY = 50; + ctx.fillRect(0, -50, 100, 50); + + @assert pixel 50,25 ==~ 127,0,127,255; + expected: | + size 100 50 + cr.set_source_rgb(0.5, 0, 0.5) + cr.rectangle(0, 0, 100, 50) + cr.fill() + +- name: 2d.shadow.alpha.3 + desc: Shadows are affected by globalAlpha + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; // (work around broken Firefox globalAlpha caching) + ctx.shadowColor = '#00f'; + ctx.shadowOffsetY = 50; + ctx.globalAlpha = 0.5; + ctx.fillRect(0, -50, 100, 50); + + @assert pixel 50,25 ==~ 127,0,127,255; + expected: | + size 100 50 + cr.set_source_rgb(0.5, 0, 0.5) + cr.rectangle(0, 0, 100, 50) + cr.fill() + +- name: 2d.shadow.alpha.4 + desc: Shadows with alpha components are correctly affected by globalAlpha + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; // (work around broken Firefox globalAlpha caching) + ctx.shadowColor = 'rgba(0, 0, 255, 0.707)'; + ctx.shadowOffsetY = 50; + ctx.globalAlpha = 0.707; + ctx.fillRect(0, -50, 100, 50); + + @assert pixel 50,25 ==~ 127,0,127,255; + expected: | + size 100 50 + cr.set_source_rgb(0.5, 0, 0.5) + cr.rectangle(0, 0, 100, 50) + cr.fill() + +- name: 2d.shadow.alpha.5 + desc: Shadows of shapes with alpha components are drawn correctly + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = 'rgba(64, 0, 0, 0.5)'; + ctx.shadowColor = '#00f'; + ctx.shadowOffsetY = 50; + ctx.fillRect(0, -50, 100, 50); + + @assert pixel 50,25 ==~ 127,0,127,255; + expected: | + size 100 50 + cr.set_source_rgb(0.5, 0, 0.5) + cr.rectangle(0, 0, 100, 50) + cr.fill() + +- name: 2d.shadow.composite.1 + desc: Shadows are drawn using globalCompositeOperation + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.shadowColor = '#f00'; + ctx.shadowOffsetX = 100; + ctx.fillStyle = '#0f0'; + ctx.fillRect(-100, 0, 200, 50); + + @assert pixel 50,25 ==~ 0,255,0,255; + expected: green + +- name: 2d.shadow.composite.2 + desc: Shadows are drawn using globalCompositeOperation + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.shadowColor = '#f00'; + ctx.shadowBlur = 1; + ctx.fillStyle = '#0f0'; + ctx.fillRect(-10, -10, 120, 70); + + @assert pixel 50,25 ==~ 0,255,0,255; + expected: green + +- name: 2d.shadow.composite.3 + desc: Areas outside shadows are drawn correctly with destination-out + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-out'; + ctx.shadowColor = '#f00'; + ctx.shadowBlur = 10; + ctx.fillStyle = '#f00'; + ctx.fillRect(200, 0, 100, 50); + + @assert pixel 5,5 ==~ 0,255,0,255; + @assert pixel 50,25 ==~ 0,255,0,255; + expected: green diff --git a/testing/web-platform/tests/html/canvas/tools/yaml-new/text.yaml b/testing/web-platform/tests/html/canvas/tools/yaml-new/text.yaml new file mode 100644 index 0000000000..ca945c2953 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/yaml-new/text.yaml @@ -0,0 +1,1680 @@ +- name: 2d.text.font.parse.basic + 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 + code: | + ctx.font = '1px sans-serif'; + @assert ctx.font === '1px sans-serif'; + +- name: 2d.text.font.parse.complex + code: | + ctx.font = 'small-caps italic 400 12px/2 Unknown Font, sans-serif'; + @assert ['italic small-caps 12px "Unknown Font", sans-serif', 'italic small-caps 12px Unknown Font, sans-serif'].includes(ctx.font); + +- name: 2d.text.font.parse.complex2 + code: | + ctx.font = 'small-caps italic 400 12px/2 "Unknown Font #2", sans-serif'; + @assert ctx.font === 'italic small-caps 12px "Unknown Font #2", sans-serif'; + +- name: 2d.text.font.parse.family + code: | + ctx.font = '20px cursive,fantasy,monospace,sans-serif,serif,UnquotedFont,"QuotedFont\\\\\\","'; + @assert ctx.font === '20px cursive, fantasy, monospace, sans-serif, serif, UnquotedFont, "QuotedFont\\\\\\","'; + + # 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.size.percentage + canvas: 'style="font-size: 144px"' + canvasType: ['HtmlCanvas'] + code: | + ctx.font = '50% serif'; + @assert ctx.font === '72px serif'; @moz-todo + canvas.setAttribute('style', 'font-size: 100px'); + @assert ctx.font === '72px serif'; @moz-todo + +- name: 2d.text.font.parse.size.percentage.default + canvasType: ['HtmlCanvas'] + code: | + var canvas2 = document.createElement('canvas'); + var ctx2 = canvas2.getContext('2d'); + ctx2.font = '1000% serif'; + @assert ctx2.font === '100px serif'; @moz-todo + +- name: 2d.text.font.parse.system + desc: System fonts must be computed to explicit values + code: | + ctx.font = 'message-box'; + @assert ctx.font !== 'message-box'; + +- name: 2d.text.font.parse.invalid + code: | + ctx.font = '20px serif'; + @assert ctx.font === '20px serif'; + + ctx.font = '20px serif'; + ctx.font = ''; + @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 = '10px revert'; + @assert ctx.font === '20px serif'; + + ctx.font = '20px serif'; + ctx.font = 'var(--x)'; + @assert ctx.font === '20px serif'; + + ctx.font = '20px serif'; + ctx.font = 'var(--x, 10px serif)'; + @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 + code: | + @assert ctx.font === '10px sans-serif'; + +- name: 2d.text.font.relative_size + canvasType: ['HTMLCanvas'] + code: | + var canvas2 = document.createElement('canvas'); + var ctx2 = canvas2.getContext('2d'); + ctx2.font = '1em sans-serif'; + @assert ctx2.font === '10px sans-serif'; + +- name: 2d.text.font.relative_size + canvasType: ['OffscreenCanvas', 'Worker'] + code: | + ctx.font = '1em sans-serif'; + @assert ctx.font === '10px sans-serif'; + +- name: 2d.text.font.weight + code: | + ctx.font = 'italic 400 12px serif'; + @assert ctx.font === 'italic 12px serif'; + + ctx.font = 'italic 300 12px serif'; + @assert ctx.font === 'italic 300 12px serif'; + +- name: 2d.text.align.valid + 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 + 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 + code: | + @assert ctx.textAlign === 'start'; + +- name: 2d.text.baseline.valid + 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 + 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 + code: | + @assert ctx.textBaseline === 'alphabetic'; + +- name: 2d.text.draw.baseline.top + desc: textBaseline top is the top of the em square (not the bounding box) + test_type: promise + fonts: + - CanvasTest + code: | + {{ load_font }} + ctx.font = '50px CanvasTest'; + 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; + expected: green + variants: &load-font-variant-definition + _HtmlCanvas: + canvasType: ['HtmlCanvas'] + load_font: |- + await document.fonts.ready; + _OffscreenCanvas: + canvasType: ['OffscreenCanvas', 'Worker'] + load_font: |- + var f = new FontFace("{{ fonts[0] }}", "url('/fonts/{{ fonts[0] }}.ttf')"); + f.load(); + {% set root = 'self' if canvas_type == 'worker' else 'document' %} + {{ root }}.fonts.add(f); + await {{ root }}.fonts.ready; + +- name: 2d.text.draw.baseline.bottom + desc: textBaseline bottom is the bottom of the em square (not the bounding box) + test_type: promise + fonts: + - CanvasTest + code: | + {{ load_font }} + ctx.font = '50px CanvasTest'; + 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; + expected: green + variants: *load-font-variant-definition + +- name: 2d.text.draw.baseline.middle + desc: textBaseline middle is the middle of the em square (not the bounding box) + test_type: promise + fonts: + - CanvasTest + code: | + {{ load_font }} + ctx.font = '50px CanvasTest'; + 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; + expected: green + variants: *load-font-variant-definition + +- name: 2d.text.draw.baseline.alphabetic + test_type: promise + fonts: + - CanvasTest + code: | + {{ load_font }} + ctx.font = '50px CanvasTest'; + 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; + expected: green + variants: *load-font-variant-definition + +- name: 2d.text.draw.baseline.ideographic + test_type: promise + fonts: + - CanvasTest + code: | + {{ load_font }} + ctx.font = '50px CanvasTest'; + 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 + expected: green + variants: *load-font-variant-definition + +- name: 2d.text.draw.baseline.hanging + test_type: promise + fonts: + - CanvasTest + code: | + {{ load_font }} + ctx.font = '50px CanvasTest'; + 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; + expected: green + variants: *load-font-variant-definition + +- name: 2d.text.draw.space.collapse.space + desc: Space characters are converted to U+0020, and are NOT collapsed + test_type: promise + fonts: + - CanvasTest + code: | + {{ load_font }} + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('E EE', 0, 37.5); + @assert pixel 25,25 ==~ 0,255,0,255; + @assert pixel 75,25 ==~ 255,0,0,255; + expected: green + variants: *load-font-variant-definition + +- name: 2d.text.draw.space.collapse.other + desc: Space characters are converted to U+0020, and are NOT collapsed + test_type: promise + fonts: + - CanvasTest + code: | + {{ load_font }} + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('E \x09\x0a\x0c\x0d \x09\x0a\x0c\x0dEE', 0, 37.5); + @assert pixel 25,25 ==~ 0,255,0,255; + @assert pixel 75,25 ==~ 255,0,0,255; + expected: green + variants: *load-font-variant-definition + +- name: 2d.text.draw.space.collapse.start + desc: Space characters at the start of a line are NOT collapsed + test_type: promise + fonts: + - CanvasTest + code: | + {{ load_font }} + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText(' EE', 0, 37.5); + @assert pixel 25,25 ==~ 255,0,0,255; @moz-todo + @assert pixel 75,25 ==~ 0,255,0,255; + expected: green + variants: *load-font-variant-definition + +- name: 2d.text.draw.space.collapse.end + desc: Space characters at the end of a line are NOT collapsed + test_type: promise + fonts: + - CanvasTest + code: | + {{ load_font }} + ctx.font = '50px CanvasTest'; + 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 ==~ 255,0,0,255; + expected: green + variants: *load-font-variant-definition + +- name: 2d.text.measure.width.space + desc: Space characters are converted to U+0020 and NOT collapsed + test_type: promise + fonts: + - CanvasTest + code: | + {{ load_font }} + ctx.font = '50px CanvasTest'; + @assert ctx.measureText('A B').width === 150; + @assert ctx.measureText('A B').width === 200; + @assert ctx.measureText('A \x09\x0a\x0c\x0d \x09\x0a\x0c\x0dB').width === 650; + @assert ctx.measureText('A \x0b B').width >= 200; + + @assert ctx.measureText(' AB').width === 150; + @assert ctx.measureText('AB ').width === 150; + variants: *load-font-variant-definition + +- name: 2d.text.drawing.style.measure.rtl.text + desc: Measurement should follow canvas direction instead text direction + code: | + metrics = ctx.measureText('اَلْعَرَبِيَّةُ'); + @assert metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight; + + metrics = ctx.measureText('hello'); + @assert metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight; + +- name: 2d.text.drawing.style.measure.textAlign + desc: Measurement should be related to textAlignment + code: | + ctx.textAlign = "right"; + metrics = ctx.measureText('hello'); + @assert metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight; + + ctx.textAlign = "left" + metrics = ctx.measureText('hello'); + @assert metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight; + +- name: 2d.text.drawing.style.measure.direction + desc: Measurement should follow text direction + code: | + ctx.direction = "ltr"; + metrics = ctx.measureText('hello'); + @assert metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight; + + ctx.direction = "rtl"; + metrics = ctx.measureText('hello'); + @assert metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight; + +- name: 2d.text.draw.fill.basic + desc: fillText draws filled text + manual: + 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 + 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: + 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: + 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 + 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 + 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 + 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 + 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: + 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 + 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: + 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 + test_type: promise + fonts: + - CanvasTest + code: | + {{ load_font }} + ctx.font = '50px CanvasTest'; + 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; + expected: green + variants: *load-font-variant-definition + +- name: 2d.text.draw.fill.maxWidth.bound + desc: fillText handles maxWidth based on line size, not bounding box size + test_type: promise + fonts: + - CanvasTest + code: | + {{ load_font }} + ctx.font = '50px CanvasTest'; + 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; + expected: green + variants: *load-font-variant-definition + +- name: 2d.text.draw.fontface + fonts: + - CanvasTest + test_type: promise + code: | + {{ load_font }} + ctx.font = '67px CanvasTest'; + 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; + expected: green + variants: *load-font-variant-definition + +- 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.) + test_type: promise + fonts: + - CanvasTest + font_unused_in_dom: true + code: | + {{ load_font }} + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.font = '67px CanvasTest'; + ctx.fillStyle = '#0f0'; + ctx.fillText('AA', 0, 50); + + await new Promise(resolve => t.step_timeout(resolve, 500)); + ctx.fillText('AA', 0, 50); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + expected: green + variants: *load-font-variant-definition + +- name: 2d.text.draw.fontface.notinpage + desc: '@font-face fonts should work even if they are not used in the page' + test_type: promise + fonts: + - CanvasTest + font_unused_in_dom: true + code: | + {{ load_font }} + ctx.font = '67px CanvasTest'; + 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 + expected: green + variants: *load-font-variant-definition + +- name: 2d.text.draw.align.left + desc: textAlign left is the left of the first em square (not the bounding box) + test_type: promise + fonts: + - CanvasTest + code: | + {{ load_font }} + ctx.font = '50px CanvasTest'; + 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; + expected: green + variants: *load-font-variant-definition + +- name: 2d.text.draw.align.right + desc: textAlign right is the right of the last em square (not the bounding box) + test_type: promise + fonts: + - CanvasTest + code: | + {{ load_font }} + ctx.font = '50px CanvasTest'; + 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; + expected: green + variants: *load-font-variant-definition + +- name: 2d.text.draw.align.start.ltr + desc: textAlign start with ltr is the left edge + canvas: dir="ltr" + test_type: promise + fonts: + - CanvasTest + code: | + {{ load_font }} + ctx.font = '50px CanvasTest'; + {% if canvas_type != 'htmlcanvas' %} + ctx.direction = 'ltr'; + {% endif %} + 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; + expected: green + variants: *load-font-variant-definition + +- name: 2d.text.draw.align.start.rtl + desc: textAlign start with rtl is the right edge + canvas: dir="rtl" + test_type: promise + fonts: + - CanvasTest + code: | + {{ load_font }} + ctx.font = '50px CanvasTest'; + {% if canvas_type != 'htmlcanvas' %} + ctx.direction = 'rtl'; + {% endif %} + 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; + expected: green + variants: *load-font-variant-definition + +- name: 2d.text.draw.align.end.ltr + desc: textAlign end with ltr is the right edge + test_type: promise + canvas: dir="ltr" + fonts: + - CanvasTest + code: | + {{ load_font }} + ctx.font = '50px CanvasTest'; + {% if canvas_type != 'htmlcanvas' %} + ctx.direction = 'ltr'; + {% endif %} + 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; + expected: green + variants: *load-font-variant-definition + +- name: 2d.text.draw.align.end.rtl + desc: textAlign end with rtl is the left edge + canvas: dir="rtl" + test_type: promise + fonts: + - CanvasTest + code: | + {{ load_font }} + ctx.font = '50px CanvasTest'; + {% if canvas_type != 'htmlcanvas' %} + ctx.direction = 'rtl'; + {% endif %} + 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; + expected: green + variants: *load-font-variant-definition + +- name: 2d.text.draw.align.center + desc: textAlign center is the center of the em squares (not the bounding box) + test_type: promise + fonts: + - CanvasTest + code: | + {{ load_font }} + ctx.font = '50px CanvasTest'; + 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; + expected: green + variants: *load-font-variant-definition + + +- name: 2d.text.draw.space.basic + desc: U+0020 is rendered the correct size (1em wide) + test_type: promise + fonts: + - CanvasTest + code: | + {{ load_font }} + ctx.font = '50px CanvasTest'; + 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; + expected: green + variants: *load-font-variant-definition + +- name: 2d.text.draw.space.collapse.nonspace + desc: Non-space characters are not converted to U+0020 and collapsed + test_type: promise + fonts: + - CanvasTest + code: | + {{ load_font }} + ctx.font = '50px CanvasTest'; + 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; + expected: green + variants: *load-font-variant-definition + +- name: 2d.text.measure.width.basic + desc: The width of character is same as font used + test_type: promise + fonts: + - CanvasTest + code: | + {{ load_font }} + 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; + variants: *load-font-variant-definition + +- name: 2d.text.measure.width.empty + desc: The empty string has zero width + test_type: promise + fonts: + - CanvasTest + code: | + {{ load_font }} + ctx.font = '50px CanvasTest'; + @assert ctx.measureText("").width === 0; + variants: *load-font-variant-definition + +- name: 2d.text.measure.advances + desc: Testing width advances + test_type: promise + fonts: + - CanvasTest + code: | + {{ load_font }} + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.align = 'left' + // Some platforms may return '-0'. + @assert Math.abs(ctx.measureText('Hello').advances[0]) === 0; + // Different platforms may render text slightly different. + @assert ctx.measureText('Hello').advances[1] >= 36; + @assert ctx.measureText('Hello').advances[2] >= 58; + @assert ctx.measureText('Hello').advances[3] >= 70; + @assert ctx.measureText('Hello').advances[4] >= 80; + + var tm = ctx.measureText('Hello'); + @assert ctx.measureText('Hello').advances[0] === tm.advances[0]; + @assert ctx.measureText('Hello').advances[1] === tm.advances[1]; + @assert ctx.measureText('Hello').advances[2] === tm.advances[2]; + @assert ctx.measureText('Hello').advances[3] === tm.advances[3]; + @assert ctx.measureText('Hello').advances[4] === tm.advances[4]; + variants: *load-font-variant-definition + +- name: 2d.text.measure.actualBoundingBox + desc: Testing actualBoundingBox + test_type: promise + fonts: + - CanvasTest + code: | + {{ load_font }} + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.align = 'left' + ctx.baseline = 'alphabetic' + // Different platforms may render text slightly different. + // Values that are nominally expected to be zero might actually vary by a + // pixel or so if the UA accounts for antialiasing at glyph edges, so we + // allow a slight deviation. + @assert Math.abs(ctx.measureText('A').actualBoundingBoxLeft) <= 1; + @assert ctx.measureText('A').actualBoundingBoxRight >= 50; + @assert ctx.measureText('A').actualBoundingBoxAscent >= 35; + @assert Math.abs(ctx.measureText('A').actualBoundingBoxDescent) <= 1; + + @assert ctx.measureText('D').actualBoundingBoxLeft >= 48; + @assert ctx.measureText('D').actualBoundingBoxLeft <= 52; + @assert ctx.measureText('D').actualBoundingBoxRight >= 75; + @assert ctx.measureText('D').actualBoundingBoxRight <= 80; + @assert ctx.measureText('D').actualBoundingBoxAscent >= 35; + @assert ctx.measureText('D').actualBoundingBoxAscent <= 40; + @assert ctx.measureText('D').actualBoundingBoxDescent >= 12; + @assert ctx.measureText('D').actualBoundingBoxDescent <= 15; + + @assert Math.abs(ctx.measureText('ABCD').actualBoundingBoxLeft) <= 1; + @assert ctx.measureText('ABCD').actualBoundingBoxRight >= 200; + @assert ctx.measureText('ABCD').actualBoundingBoxAscent >= 85; + @assert ctx.measureText('ABCD').actualBoundingBoxDescent >= 37; + variants: *load-font-variant-definition + +- name: 2d.text.measure.fontBoundingBox + desc: Testing fontBoundingBox measurements + test_type: promise + fonts: + - CanvasTest + code: | + {{ load_font }} + ctx.font = '40px CanvasTest'; + ctx.direction = 'ltr'; + ctx.align = 'left' + @assert ctx.measureText('A').fontBoundingBoxAscent === 30; + @assert ctx.measureText('A').fontBoundingBoxDescent === 10; + + @assert ctx.measureText('ABCD').fontBoundingBoxAscent === 30; + @assert ctx.measureText('ABCD').fontBoundingBoxDescent === 10; + variants: *load-font-variant-definition + +- name: 2d.text.measure.fontBoundingBox.ahem + desc: Testing fontBoundingBox for font ahem + test_type: promise + fonts: + - Ahem + code: | + {{ load_font }} + ctx.font = '50px Ahem'; + ctx.direction = 'ltr'; + ctx.align = 'left' + @assert ctx.measureText('A').fontBoundingBoxAscent === 40; + @assert ctx.measureText('A').fontBoundingBoxDescent === 10; + @assert ctx.measureText('ABCD').fontBoundingBoxAscent === 40; + @assert ctx.measureText('ABCD').fontBoundingBoxDescent === 10; + variants: *load-font-variant-definition + +- name: 2d.text.measure.fontBoundingBox-reduced-ascent + desc: Testing fontBoundingBox for OffscreenCanvas with reduced ascent metric + test_type: promise + fonts: + - CanvasTest-ascent256 + code: | + {{ load_font }} + ctx.font = '40px CanvasTest-ascent256'; + ctx.direction = 'ltr'; + ctx.align = 'left' + @assert ctx.measureText('A').fontBoundingBoxAscent === 10; + @assert ctx.measureText('A').fontBoundingBoxDescent === 10; + + @assert ctx.measureText('ABCD').fontBoundingBoxAscent === 10; + @assert ctx.measureText('ABCD').fontBoundingBoxDescent === 10; + variants: *load-font-variant-definition + +- name: 2d.text.measure.fontBoundingBox-zero-descent + desc: Testing fontBoundingBox for OffscreenCanvas with zero descent metric + test_type: promise + fonts: + - CanvasTest-descent0 + code: | + {{ load_font }} + ctx.font = '40px CanvasTest-descent0'; + ctx.direction = 'ltr'; + ctx.align = 'left' + @assert ctx.measureText('A').fontBoundingBoxAscent === 30; + @assert ctx.measureText('A').fontBoundingBoxDescent === 0; + + @assert ctx.measureText('ABCD').fontBoundingBoxAscent === 30; + @assert ctx.measureText('ABCD').fontBoundingBoxDescent === 0; + variants: *load-font-variant-definition + +- name: 2d.text.measure.emHeights + desc: Testing emHeights + test_type: promise + fonts: + - CanvasTest + code: | + {{ load_font }} + ctx.font = '40px CanvasTest'; + ctx.direction = 'ltr'; + ctx.align = 'left' + @assert ctx.measureText('A').emHeightAscent === 30; + @assert ctx.measureText('A').emHeightDescent === 10; + @assert ctx.measureText('A').emHeightDescent + ctx.measureText('A').emHeightAscent === 40; + + @assert ctx.measureText('ABCD').emHeightAscent === 30; + @assert ctx.measureText('ABCD').emHeightDescent === 10; + @assert ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent === 40; + variants: *load-font-variant-definition + +- name: 2d.text.measure.emHeights-low-ascent + desc: Testing emHeights with reduced ascent metric + test_type: promise + fonts: + - CanvasTest-ascent256 + code: | + {{ load_font }} + ctx.font = '40px CanvasTest-ascent256'; + ctx.direction = 'ltr'; + ctx.align = 'left' + @assert ctx.measureText('A').emHeightAscent === 20; + @assert ctx.measureText('A').emHeightDescent === 20; + @assert ctx.measureText('A').emHeightDescent + ctx.measureText('A').emHeightAscent === 40; + + @assert ctx.measureText('ABCD').emHeightAscent === 20; + @assert ctx.measureText('ABCD').emHeightDescent === 20; + @assert ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent === 40; + variants: *load-font-variant-definition + +- name: 2d.text.measure.emHeights-zero-descent + desc: Testing emHeights with zero descent metric + test_type: promise + fonts: + - CanvasTest-descent0 + code: | + {{ load_font }} + ctx.font = '40px CanvasTest-descent0'; + ctx.direction = 'ltr'; + ctx.align = 'left' + @assert ctx.measureText('A').emHeightAscent === 40; + @assert ctx.measureText('A').emHeightDescent === 0; + @assert ctx.measureText('A').emHeightDescent + ctx.measureText('A').emHeightAscent === 40; + + @assert ctx.measureText('ABCD').emHeightAscent === 40; + @assert ctx.measureText('ABCD').emHeightDescent === 0; + @assert ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent === 40; + variants: *load-font-variant-definition + +- name: 2d.text.measure.baselines + desc: Testing baselines + test_type: promise + fonts: + - CanvasTest + code: | + {{ load_font }} + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.align = 'left' + @assert Math.abs(ctx.measureText('A').alphabeticBaseline) === 0; + @assert ctx.measureText('A').ideographicBaseline === 6.25; + @assert ctx.measureText('A').hangingBaseline === 25; + + @assert Math.abs(ctx.measureText('ABCD').alphabeticBaseline) === 0; + @assert ctx.measureText('ABCD').ideographicBaseline === 6.25; + @assert ctx.measureText('ABCD').hangingBaseline === 25; + variants: *load-font-variant-definition + +- name: 2d.text.drawing.style.absolute.spacing + desc: Testing letter spacing and word spacing with absolute length + code: | + @assert ctx.letterSpacing === '0px'; + @assert ctx.wordSpacing === '0px'; + + ctx.letterSpacing = '3px'; + @assert ctx.letterSpacing === '3px'; + @assert ctx.wordSpacing === '0px'; + + ctx.wordSpacing = '5px'; + @assert ctx.letterSpacing === '3px'; + @assert ctx.wordSpacing === '5px'; + + ctx.letterSpacing = '-1px'; + ctx.wordSpacing = '-1px'; + @assert ctx.letterSpacing === '-1px'; + @assert ctx.wordSpacing === '-1px'; + + ctx.letterSpacing = '1PX'; + ctx.wordSpacing = '10PX'; + @assert ctx.letterSpacing === '1px'; + @assert ctx.wordSpacing === '10px'; + +- name: 2d.text.drawing.style.font-relative.spacing + desc: Testing letter spacing and word spacing with font-relative length + code: | + @assert ctx.letterSpacing === '0px'; + @assert ctx.wordSpacing === '0px'; + + ctx.letterSpacing = '1EX'; + ctx.wordSpacing = '1EM'; + @assert ctx.letterSpacing === '1ex'; + @assert ctx.wordSpacing === '1em'; + + ctx.letterSpacing = '1ch'; + ctx.wordSpacing = '1ic'; + @assert ctx.letterSpacing === '1ch'; + @assert ctx.wordSpacing === '1ic'; + +- name: 2d.text.drawing.style.nonfinite.spacing + desc: Testing letter spacing and word spacing with nonfinite inputs + code: | + @assert ctx.letterSpacing === '0px'; + @assert ctx.wordSpacing === '0px'; + + function test_word_spacing(value) { + ctx.wordSpacing = value; + ctx.letterSpacing = value; + @assert ctx.wordSpacing === '0px'; + @assert ctx.letterSpacing === '0px'; + } + @nonfinite test_word_spacing(<0 NaN Infinity -Infinity>); + +- name: 2d.text.drawing.style.invalid.spacing + desc: Testing letter spacing and word spacing with invalid units + code: | + @assert ctx.letterSpacing === '0px'; + @assert ctx.wordSpacing === '0px'; + + function test_word_spacing(value) { + ctx.wordSpacing = value; + ctx.letterSpacing = value; + @assert ctx.wordSpacing === '0px'; + @assert ctx.letterSpacing === '0px'; + } + @nonfinite test_word_spacing(< '0s' '1min' '1deg' '1pp' 'initial' 'inherit' 'normal' 'none'>); + +- name: 2d.text.drawing.style.letterSpacing.measure + desc: Testing letter spacing with different length units + code: | + @assert ctx.letterSpacing === '0px'; + @assert ctx.wordSpacing === '0px'; + var width_normal = ctx.measureText('Hello World').width; + + function test_letter_spacing(value, difference_spacing, epsilon) { + ctx.letterSpacing = value; + @assert ctx.letterSpacing === value; + @assert ctx.wordSpacing === '0px'; + width_with_letter_spacing = ctx.measureText('Hello World').width; + assert_approx_equals(width_with_letter_spacing, width_normal + difference_spacing, epsilon, "letter spacing doesn't work."); + } + + // The first value is the letter Spacing to be set, the second value the + // change in length of string 'Hello World', note that there are 11 letters + // in 'hello world', so the length difference is always letterSpacing * 11. + // and the third value is the acceptable differencee for the length change, + // note that unit such as 1cm/1mm doesn't map to an exact pixel value. + test_cases = [['3px', 33, 0.1], + ['5px', 55, 0.1], + ['-2px', -22, 0.1], + ['1em', 110, 0.1], + ['-0.1em', -11, 0.1], + ['1in', 1056, 0.1], + ['-0.1cm', -41.65, 0.2], + ['-0.6mm', -24,95, 0.2]] + + for (const test_case of test_cases) { + test_letter_spacing(test_case[0], test_case[1], test_case[2]); + } + +- name: 2d.text.drawing.style.wordSpacing.measure + desc: Testing word spacing with different length units + code: | + @assert ctx.letterSpacing === '0px'; + @assert ctx.wordSpacing === '0px'; + var width_normal = ctx.measureText('Hello World, again').width; + + function test_word_spacing(value, difference_spacing, epsilon) { + ctx.wordSpacing = value; + @assert ctx.letterSpacing === '0px'; + @assert ctx.wordSpacing === value; + width_with_word_spacing = ctx.measureText('Hello World, again').width; + assert_approx_equals(width_with_word_spacing, width_normal + difference_spacing, epsilon, "word spacing doesn't work."); + } + + // The first value is the word Spacing to be set, the second value the + // change in length of string 'Hello World', note that there are 2 words + // in 'Hello World, again', so the length difference is always wordSpacing * 2. + // and the third value is the acceptable differencee for the length change, + // note that unit such as 1cm/1mm doesn't map to an exact pixel value. + test_cases = [['3px', 6, 0.1], + ['5px', 10, 0.1], + ['-2px', -4, 0.1], + ['1em', 20, 0.1], + ['-0.5em', -10, 0.1], + ['1in', 192, 0.1], + ['-0.1cm', -7.57, 0.2], + ['-0.6mm', -4.54, 0.2]] + + for (const test_case of test_cases) { + test_word_spacing(test_case[0], test_case[1], test_case[2]); + } + +- name: 2d.text.drawing.style.letterSpacing.change.font + desc: Set letter spacing and word spacing to font dependent value and verify it works after font change. + code: | + @assert ctx.letterSpacing === '0px'; + @assert ctx.wordSpacing === '0px'; + // Get the width for 'Hello World' at default size, 10px. + var width_normal = ctx.measureText('Hello World').width; + + ctx.letterSpacing = '1em'; + @assert ctx.letterSpacing === '1em'; + // 1em = 10px. Add 10px after each letter in "Hello World", + // makes it 110px longer. + var width_with_spacing = ctx.measureText('Hello World').width; + assert_approx_equals(width_with_spacing, width_normal + 110, 0.1, "letter-spacing error"); + + // Changing font to 20px. Without resetting the spacing, 1em letterSpacing + // is now 20px, so it's suppose to be 220px longer without any letterSpacing set. + ctx.font = '20px serif'; + width_with_spacing = ctx.measureText('Hello World').width; + // Now calculate the reference spacing for "Hello World" with no spacing. + ctx.letterSpacing = '0em'; + width_normal = ctx.measureText('Hello World').width; + assert_approx_equals(width_with_spacing, width_normal + 220, 0.1, "letter-spacing error after font change"); + +- name: 2d.text.drawing.style.wordSpacing.change.font + desc: Set word spacing and word spacing to font dependent value and verify it works after font change. + code: | + @assert ctx.letterSpacing === '0px'; + @assert ctx.wordSpacing === '0px'; + // Get the width for 'Hello World, again' at default size, 10px. + var width_normal = ctx.measureText('Hello World, again').width; + + ctx.wordSpacing = '1em'; + @assert ctx.wordSpacing === '1em'; + // 1em = 10px. Add 10px after each word in "Hello World, again", + // makes it 20px longer. + var width_with_spacing = ctx.measureText('Hello World, again').width; + @assert width_with_spacing === width_normal + 20; + + // Changing font to 20px. Without resetting the spacing, 1em wordSpacing + // is now 20px, so it's suppose to be 40px longer without any wordSpacing set. + ctx.font = '20px serif'; + width_with_spacing = ctx.measureText('Hello World, again').width; + // Now calculate the reference spacing for "Hello World, again" with no spacing. + ctx.wordSpacing = '0em'; + width_normal = ctx.measureText('Hello World, again').width; + @assert width_with_spacing === width_normal + 40; + +- name: 2d.text.drawing.style.fontKerning + desc: Testing basic functionalities of fontKerning for canvas + code: | + @assert ctx.fontKerning === "auto"; + ctx.fontKerning = "normal"; + @assert ctx.fontKerning === "normal"; + width_normal = ctx.measureText("TAWATAVA").width; + ctx.fontKerning = "none"; + @assert ctx.fontKerning === "none"; + width_none = ctx.measureText("TAWATAVA").width; + @assert width_normal < width_none; + +- name: 2d.text.drawing.style.fontKerning.with.uppercase + desc: Testing basic functionalities of fontKerning for canvas + code: | + @assert ctx.fontKerning === "auto"; + ctx.fontKerning = "Normal"; + @assert ctx.fontKerning === "auto"; + ctx.fontKerning = "normal"; + @assert ctx.fontKerning === "normal"; + ctx.fontKerning = "Auto"; + @assert ctx.fontKerning === "normal"; + ctx.fontKerning = "auto"; + ctx.fontKerning = "noRmal"; + @assert ctx.fontKerning === "auto"; + ctx.fontKerning = "auto"; + ctx.fontKerning = "NoRMal"; + @assert ctx.fontKerning === "auto"; + ctx.fontKerning = "auto"; + ctx.fontKerning = "NORMAL"; + @assert ctx.fontKerning === "auto"; + + ctx.fontKerning = "None"; + @assert ctx.fontKerning === "auto"; + ctx.fontKerning = "none"; + @assert ctx.fontKerning === "none"; + ctx.fontKerning = "Auto"; + @assert ctx.fontKerning === "none"; + ctx.fontKerning = "auto"; + ctx.fontKerning = "nOne"; + @assert ctx.fontKerning === "auto"; + ctx.fontKerning = "auto"; + ctx.fontKerning = "nonE"; + @assert ctx.fontKerning === "auto"; + ctx.fontKerning = "auto"; + ctx.fontKerning = "NONE"; + @assert ctx.fontKerning === "auto"; + +- name: 2d.text.drawing.style.fontVariant.settings + desc: Testing basic functionalities of fontVariant for canvas + code: | + // Setting fontVariantCaps with lower cases + @assert ctx.fontVariantCaps === "normal"; + + ctx.fontVariantCaps = "normal"; + @assert ctx.fontVariantCaps === "normal"; + + ctx.fontVariantCaps = "small-caps"; + @assert ctx.fontVariantCaps === "small-caps"; + + ctx.fontVariantCaps = "all-small-caps"; + @assert ctx.fontVariantCaps === "all-small-caps"; + + ctx.fontVariantCaps = "petite-caps"; + @assert ctx.fontVariantCaps === "petite-caps"; + + ctx.fontVariantCaps = "all-petite-caps"; + @assert ctx.fontVariantCaps === "all-petite-caps"; + + ctx.fontVariantCaps = "unicase"; + @assert ctx.fontVariantCaps === "unicase"; + + ctx.fontVariantCaps = "titling-caps"; + @assert ctx.fontVariantCaps === "titling-caps"; + + // Setting fontVariantCaps with mixed-case values is not valid + ctx.fontVariantCaps = "nORmal"; + @assert ctx.fontVariantCaps === "titling-caps"; + + ctx.fontVariantCaps = "normal"; + @assert ctx.fontVariantCaps === "normal"; + + ctx.fontVariantCaps = "smaLL-caps"; + @assert ctx.fontVariantCaps === "normal"; + + ctx.fontVariantCaps = "all-small-CAPS"; + @assert ctx.fontVariantCaps === "normal"; + + ctx.fontVariantCaps = "pEtitE-caps"; + @assert ctx.fontVariantCaps === "normal"; + + ctx.fontVariantCaps = "All-Petite-Caps"; + @assert ctx.fontVariantCaps === "normal"; + + ctx.fontVariantCaps = "uNIcase"; + @assert ctx.fontVariantCaps === "normal"; + + ctx.fontVariantCaps = "titling-CAPS"; + @assert ctx.fontVariantCaps === "normal"; + + // Setting fontVariantCaps with non-existing font variant. + ctx.fontVariantCaps = "titling-caps"; + ctx.fontVariantCaps = "abcd"; + @assert ctx.fontVariantCaps === "titling-caps"; + +- name: 2d.text.drawing.style.textRendering.settings + desc: Testing basic functionalities of textRendering in Canvas + code: | + // Setting textRendering with correct case. + @assert ctx.textRendering === "auto"; + + ctx.textRendering = "optimizeSpeed"; + @assert ctx.textRendering === "optimizeSpeed"; + + ctx.textRendering = "optimizeLegibility"; + @assert ctx.textRendering === "optimizeLegibility"; + + ctx.textRendering = "geometricPrecision"; + @assert ctx.textRendering === "geometricPrecision"; + + ctx.textRendering = "auto"; + @assert ctx.textRendering === "auto"; + + // Setting textRendering with incorrect case is ignored. + ctx.textRendering = "OPtimizeSpeed"; + @assert ctx.textRendering === "auto"; + + ctx.textRendering = "OPtimizELEgibility"; + @assert ctx.textRendering === "auto"; + + ctx.textRendering = "GeometricPrecision"; + @assert ctx.textRendering === "auto"; + + ctx.textRendering = "optimizespeed"; + @assert ctx.textRendering === "auto"; + + ctx.textRendering = "optimizelegibility"; + @assert ctx.textRendering === "auto"; + + ctx.textRendering = "geometricprecision"; + @assert ctx.textRendering === "auto"; + + ctx.textRendering = "optimizeLegibility"; + @assert ctx.textRendering === "optimizeLegibility"; + + ctx.textRendering = "AUTO"; + @assert ctx.textRendering === "optimizeLegibility"; + + ctx.textRendering = "Auto"; + @assert ctx.textRendering === "optimizeLegibility"; + + // Setting textRendering with non-existing font variant. + ctx.textRendering = "abcd"; + @assert ctx.textRendering === "optimizeLegibility"; + + ctx.textRendering = "normal"; + @assert ctx.textRendering === "optimizeLegibility"; + + ctx.textRendering = ""; + @assert ctx.textRendering === "optimizeLegibility"; + + ctx.textRendering = "auto"; + @assert ctx.textRendering === "auto"; + +- name: 2d.text.drawing.style.fontStretch.settings + desc: Testing value setting of fontStretch in Canvas + code: | + // Setting textRendering with lower cases + ctx.fontStretch = "ultra-condensed"; + @assert ctx.fontStretch === "ultra-condensed"; + + ctx.fontStretch = "extra-condensed"; + @assert ctx.fontStretch === "extra-condensed"; + + ctx.fontStretch = "condensed"; + @assert ctx.fontStretch === "condensed"; + + ctx.fontStretch = "semi-condensed"; + @assert ctx.fontStretch === "semi-condensed"; + + ctx.fontStretch = "normal"; + @assert ctx.fontStretch === "normal"; + + ctx.fontStretch = "semi-expanded"; + @assert ctx.fontStretch === "semi-expanded"; + + ctx.fontStretch = "expanded"; + @assert ctx.fontStretch === "expanded"; + + ctx.fontStretch = "extra-expanded"; + @assert ctx.fontStretch === "extra-expanded"; + + ctx.fontStretch = "ultra-expanded"; + @assert ctx.fontStretch === "ultra-expanded"; + + // Setting fontStretch with lower cases and upper cases word, + // these values should be ignored. + ctx.fontStretch = "ulTra-condensed"; + @assert ctx.fontStretch === "ultra-expanded"; + + ctx.fontStretch = "Extra-condensed"; + @assert ctx.fontStretch === "ultra-expanded"; + + ctx.fontStretch = "cOndensed"; + @assert ctx.fontStretch === "ultra-expanded"; + + ctx.fontStretch = "Semi-Condensed"; + @assert ctx.fontStretch === "ultra-expanded"; + + ctx.fontStretch = "normaL"; + @assert ctx.fontStretch === "ultra-expanded"; + + ctx.fontStretch = "semi-Expanded"; + @assert ctx.fontStretch === "ultra-expanded"; + + ctx.fontStretch = "Expanded"; + @assert ctx.fontStretch === "ultra-expanded"; + + ctx.fontStretch = "eXtra-expanded"; + @assert ctx.fontStretch === "ultra-expanded"; + + ctx.fontStretch = "abcd"; + @assert ctx.fontStretch === "ultra-expanded"; + +- name: 2d.text.fontVariantCaps1 + desc: Testing small caps setting in fontVariant + code: | + ctx.font = "32px serif"; + ctx.fontVariantCaps = "small-caps"; + // This should render the same as font = "small-caps 32px serif". + ctx.fillText("Hello World", 20, 100); + reference: | + ctx.font = "small-caps 32px serif"; + ctx.fillText("Hello World", 20, 100); + +- name: 2d.text.fontVariantCaps2 + desc: Testing small caps setting in fontVariant + code: | + ctx.font = "small-caps 32px serif"; + // "mismatch" test, to verify that small-caps does change the rendering. + smallCaps_len = ctx.measureText("Hello World").width; + + ctx.font = "32px serif"; + normalCaps_len = ctx.measureText("Hello World").width; + @assert smallCaps_len != normalCaps_len; + +- name: 2d.text.fontVariantCaps3 + desc: Testing small caps setting in fontVariant + code: | + ctx.font = "32px serif"; + ctx.fontVariantCaps = "all-small-caps"; + // This should render the same as using font = "small-caps 32px serif" + // with all the underlying text in lowercase. + ctx.fillText("Hello World", 20, 100); + reference: | + ctx.font = "small-caps 32px serif"; + ctx.fillText("hello world", 20, 100); + +- name: 2d.text.fontVariantCaps4 + desc: Testing small caps setting in fontVariant + code: | + ctx.font = "small-caps 32px serif"; + // fontVariantCaps overrides the small-caps setting from the font attribute + // (spec unclear, cf. https://github.com/whatwg/html/issues/8103) + ctx.fontVariantCaps = "all-small-caps"; + ctx.fillText("Hello World", 20, 100); + reference: | + ctx.font = "small-caps 32px serif"; + ctx.fillText("hello world", 20, 100); + +- name: 2d.text.fontVariantCaps5 + desc: Testing small caps setting in fontVariant + code: | + ctx.font = "small-caps 32px serif"; + // fontVariantCaps 'normal' does not override the setting from the font attribute. + // (spec unclear, cf. https://github.com/whatwg/html/issues/8103) + ctx.fontVariantCaps = "normal"; + ctx.fillText("Hello World", 20, 100); + reference: | + ctx.font = "small-caps 32px serif"; + ctx.fillText("Hello World", 20, 100); + +- name: 2d.text.fontVariantCaps6 + desc: Testing small caps setting in fontVariant + code: | + // fontVariantCaps is reset when the font attribute is set. + // (spec unclear, cf. https://github.com/whatwg/html/issues/8103) + ctx.fontVariantCaps = "all-small-caps"; + ctx.font = "32px serif"; + ctx.fillText("Hello World", 20, 100); + reference: | + ctx.font = "32px serif"; + ctx.fillText("Hello World", 20, 100); + +- name: 2d.text.setFont.mathFont + desc: crbug.com/1212190, make sure offscreencanvas doesn't crash with Math Font + code: | + ctx.font = "math serif"; + +# TODO: shadows, alpha, composite, clip diff --git a/testing/web-platform/tests/html/canvas/tools/yaml-new/the-canvas-state.yaml b/testing/web-platform/tests/html/canvas/tools/yaml-new/the-canvas-state.yaml new file mode 100644 index 0000000000..0452086154 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/yaml-new/the-canvas-state.yaml @@ -0,0 +1,89 @@ +- name: 2d.state.saverestore.transformation + desc: save()/restore() affects the current transformation matrix + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.save(); + ctx.translate(200, 0); + ctx.restore(); + ctx.fillStyle = '#f00'; + ctx.fillRect(-200, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.state.saverestore.clip + desc: save()/restore() affects the clipping path + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.save(); + ctx.rect(0, 0, 1, 1); + ctx.clip(); + ctx.restore(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.state.saverestore.path + desc: save()/restore() does not affect the current path + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.save(); + ctx.rect(0, 0, 100, 50); + ctx.restore(); + ctx.fillStyle = '#0f0'; + ctx.fill(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.state.saverestore.bitmap + desc: save()/restore() does not affect the current bitmap + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.save(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.restore(); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.state.saverestore.stack + desc: save()/restore() can be nested as a stack + code: | + ctx.lineWidth = 1; + ctx.save(); + ctx.lineWidth = 2; + ctx.save(); + ctx.lineWidth = 3; + @assert ctx.lineWidth === 3; + ctx.restore(); + @assert ctx.lineWidth === 2; + ctx.restore(); + @assert ctx.lineWidth === 1; + +- name: 2d.state.saverestore.stackdepth + desc: save()/restore() stack depth is not unreasonably limited + code: | + var limit = 512; + for (var i = 1; i < limit; ++i) + { + ctx.save(); + ctx.lineWidth = i; + } + for (var i = limit-1; i > 0; --i) + { + @assert ctx.lineWidth === i; + ctx.restore(); + } + +- name: 2d.state.saverestore.underflow + desc: restore() with an empty stack has no effect + code: | + for (var i = 0; i < 16; ++i) + ctx.restore(); + ctx.lineWidth = 0.5; + ctx.restore(); + @assert ctx.lineWidth === 0.5; diff --git a/testing/web-platform/tests/html/canvas/tools/yaml-new/transformations.yaml b/testing/web-platform/tests/html/canvas/tools/yaml-new/transformations.yaml new file mode 100644 index 0000000000..0d2265be7a --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/yaml-new/transformations.yaml @@ -0,0 +1,356 @@ +- name: 2d.transformation.order + desc: Transformations are applied in the right order + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.scale(2, 1); + ctx.rotate(Math.PI / 2); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, -50, 50, 50); + @assert pixel 75,25 == 0,255,0,255; + expected: green + + +- name: 2d.transformation.scale.basic + desc: scale() works + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.scale(2, 4); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 12.5); + @assert pixel 90,40 == 0,255,0,255; + expected: green + +- name: 2d.transformation.scale.zero + desc: scale() with a scale factor of zero works + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.save(); + ctx.translate(50, 0); + ctx.scale(0, 1); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.restore(); + + ctx.save(); + ctx.translate(0, 25); + ctx.scale(1, 0); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.restore(); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.transformation.scale.negative + desc: scale() with negative scale factors works + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.save(); + ctx.scale(-1, 1); + ctx.fillStyle = '#0f0'; + ctx.fillRect(-50, 0, 50, 50); + ctx.restore(); + + ctx.save(); + ctx.scale(1, -1); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, -50, 50, 50); + ctx.restore(); + @assert pixel 25,25 == 0,255,0,255; + @assert pixel 75,25 == 0,255,0,255; + expected: green + +- name: 2d.transformation.scale.large + desc: scale() with large scale factors works + notes: Not really that large at all, but it hits the limits in Firefox. + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.scale(1e5, 1e5); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 1, 1); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.transformation.scale.nonfinite + desc: scale() with Infinity/NaN is ignored + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.translate(100, 10); + @nonfinite ctx.scale(<0.1 Infinity -Infinity NaN>, <0.1 Infinity -Infinity NaN>); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(-100, -10, 100, 50); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.transformation.scale.multiple + desc: Multiple scale()s combine + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.scale(Math.sqrt(2), Math.sqrt(2)); + ctx.scale(Math.sqrt(2), Math.sqrt(2)); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 25); + @assert pixel 90,40 == 0,255,0,255; + expected: green + + +- name: 2d.transformation.rotate.zero + desc: rotate() by 0 does nothing + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.rotate(0); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.transformation.rotate.radians + desc: rotate() uses radians + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.rotate(Math.PI); // should fail obviously if this is 3.1 degrees + ctx.fillStyle = '#0f0'; + ctx.fillRect(-100, -50, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.transformation.rotate.direction + desc: rotate() is clockwise + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.rotate(Math.PI / 2); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, -100, 50, 100); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.transformation.rotate.wrap + desc: rotate() wraps large positive values correctly + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.rotate(Math.PI * (1 + 4096)); // == pi (mod 2*pi) + // We need about pi +/- 0.001 in order to get correct-looking results + // 32-bit floats can store pi*4097 with precision 2^-10, so that should + // be safe enough on reasonable implementations + ctx.fillStyle = '#0f0'; + ctx.fillRect(-100, -50, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 98,2 == 0,255,0,255; + @assert pixel 98,47 == 0,255,0,255; + expected: green + +- name: 2d.transformation.rotate.wrapnegative + desc: rotate() wraps large negative values correctly + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.rotate(-Math.PI * (1 + 4096)); + ctx.fillStyle = '#0f0'; + ctx.fillRect(-100, -50, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 98,2 == 0,255,0,255; + @assert pixel 98,47 == 0,255,0,255; + expected: green + +- name: 2d.transformation.rotate.nonfinite + desc: rotate() with Infinity/NaN is ignored + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.translate(100, 10); + @nonfinite ctx.rotate(<0.1 Infinity -Infinity NaN>); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(-100, -10, 100, 50); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.transformation.translate.basic + desc: translate() works + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.translate(100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(-100, -50, 100, 50); + @assert pixel 90,40 == 0,255,0,255; + expected: green + +- name: 2d.transformation.translate.nonfinite + desc: translate() with Infinity/NaN is ignored + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.translate(100, 10); + @nonfinite ctx.translate(<0.1 Infinity -Infinity NaN>, <0.1 Infinity -Infinity NaN>); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(-100, -10, 100, 50); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + + +- name: 2d.transformation.transform.identity + desc: transform() with the identity matrix does nothing + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.transform(1,0, 0,1, 0,0); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.transformation.transform.skewed + desc: transform() with skewy matrix transforms correctly + code: | + // Create green with a red square ring inside it + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(20, 10, 60, 30); + ctx.fillStyle = '#0f0'; + ctx.fillRect(40, 20, 20, 10); + + // Draw a skewed shape to fill that gap, to make sure it is aligned correctly + ctx.transform(1,4, 2,3, 5,6); + // Post-transform coordinates: + // [[20,10],[80,10],[80,40],[20,40],[20,10],[40,20],[40,30],[60,30],[60,20],[40,20],[20,10]]; + // Hence pre-transform coordinates: + var pts=[[-7.4,11.2],[-43.4,59.2],[-31.4,53.2],[4.6,5.2],[-7.4,11.2], + [-15.4,25.2],[-11.4,23.2],[-23.4,39.2],[-27.4,41.2],[-15.4,25.2], + [-7.4,11.2]]; + ctx.beginPath(); + ctx.moveTo(pts[0][0], pts[0][1]); + for (var i = 0; i < pts.length; ++i) + ctx.lineTo(pts[i][0], pts[i][1]); + ctx.fill(); + @assert pixel 21,11 == 0,255,0,255; + @assert pixel 79,11 == 0,255,0,255; + @assert pixel 21,39 == 0,255,0,255; + @assert pixel 79,39 == 0,255,0,255; + @assert pixel 39,19 == 0,255,0,255; + @assert pixel 61,19 == 0,255,0,255; + @assert pixel 39,31 == 0,255,0,255; + @assert pixel 61,31 == 0,255,0,255; + expected: green + +- name: 2d.transformation.transform.multiply + desc: transform() multiplies the CTM + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.transform(1,2, 3,4, 5,6); + ctx.transform(-2,1, 3/2,-1/2, 1,-2); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.transformation.transform.nonfinite + desc: transform() with Infinity/NaN is ignored + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.translate(100, 10); + @nonfinite ctx.transform(<0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(-100, -10, 100, 50); + + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.transformation.setTransform.skewed + code: | + // Create green with a red square ring inside it + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(20, 10, 60, 30); + ctx.fillStyle = '#0f0'; + ctx.fillRect(40, 20, 20, 10); + + // Draw a skewed shape to fill that gap, to make sure it is aligned correctly + ctx.setTransform(1,4, 2,3, 5,6); + // Post-transform coordinates: + // [[20,10],[80,10],[80,40],[20,40],[20,10],[40,20],[40,30],[60,30],[60,20],[40,20],[20,10]]; + // Hence pre-transform coordinates: + var pts=[[-7.4,11.2],[-43.4,59.2],[-31.4,53.2],[4.6,5.2],[-7.4,11.2], + [-15.4,25.2],[-11.4,23.2],[-23.4,39.2],[-27.4,41.2],[-15.4,25.2], + [-7.4,11.2]]; + ctx.beginPath(); + ctx.moveTo(pts[0][0], pts[0][1]); + for (var i = 0; i < pts.length; ++i) + ctx.lineTo(pts[i][0], pts[i][1]); + ctx.fill(); + @assert pixel 21,11 == 0,255,0,255; + @assert pixel 79,11 == 0,255,0,255; + @assert pixel 21,39 == 0,255,0,255; + @assert pixel 79,39 == 0,255,0,255; + @assert pixel 39,19 == 0,255,0,255; + @assert pixel 61,19 == 0,255,0,255; + @assert pixel 39,31 == 0,255,0,255; + @assert pixel 61,31 == 0,255,0,255; + expected: green + +- name: 2d.transformation.setTransform.multiple + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.setTransform(1/2,0, 0,1/2, 0,0); + ctx.setTransform(); + ctx.setTransform(2,0, 0,2, 0,0); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 25); + @assert pixel 75,35 == 0,255,0,255; + expected: green + +- name: 2d.transformation.setTransform.nonfinite + desc: setTransform() with Infinity/NaN is ignored + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx.translate(100, 10); + @nonfinite ctx.setTransform(<0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(-100, -10, 100, 50); + + @assert pixel 50,25 == 0,255,0,255; + expected: green diff --git a/testing/web-platform/tests/html/canvas/tools/yaml-new/video.yaml b/testing/web-platform/tests/html/canvas/tools/yaml-new/video.yaml new file mode 100644 index 0000000000..f9b48fb8da --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/yaml-new/video.yaml @@ -0,0 +1,10 @@ +- name: 2d.video.invalid + desc: Verify test doesn't crash with invalid video. + canvasType: + ['HTMLCanvas'] + code: | + var v = document.createElement('video'); + v.play(); + // Test is deliberately not waiting for the 'playing' event to fire. + ctx.createPattern(v, 'repeat-x'); + ctx.drawImage(v, 0, 0); diff --git a/testing/web-platform/tests/html/canvas/tools/yaml/element/meta.yaml b/testing/web-platform/tests/html/canvas/tools/yaml/element/meta.yaml new file mode 100644 index 0000000000..5fd8b68498 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/yaml/element/meta.yaml @@ -0,0 +1,539 @@ +- meta: | + cases = [ + ("zero", "0", 0), + ("empty", "", None), + ("onlyspace", " ", None), + ("space", " 100", 100), + ("whitespace", "\r\n\t\f100", 100), + ("plus", "+100", 100), + ("minus", "-100", None), + ("octal", "0100", 100), + ("hex", "0x100", 0), + ("exp", "100e1", 100), + ("decimal", "100.999", 100), + ("percent", "100%", 100), + ("em", "100em", 100), + ("junk", "#!?", None), + ("trailingjunk", "100#!?", 100), + ] + def gen(name, string, exp, code): + if exp is None: + code += "@assert canvas.width === 300;\n@assert canvas.height === 150;\n" + expected = "size 300 150" + else: + code += "@assert canvas.width === %s;\n@assert canvas.height === %s;\n" % (exp, exp) + expected = "size %s %s" % (exp, exp) + + # With "100%", Opera gets canvas.width = 100 but renders at 100% of the frame width, + # so check the CSS display width + code += '@assert window.getComputedStyle(canvas, null).getPropertyValue("width") === "%spx";\n' % (exp, ) + + code += "@assert canvas.getAttribute('width') === %r;\n" % string + code += "@assert canvas.getAttribute('height') === %r;\n" % string + + if exp == 0: + expected = None # can't generate zero-sized PNGs for the expected image + + return code, expected + + for name, string, exp in cases: + code = "" + code, expected = gen(name, string, exp, code) + # We need to replace \r with because \r\n gets converted to \n in the HTML parser. + htmlString = string.replace('\r', ' ') + tests.append( { + "name": "2d.canvas.host.size.attributes.parse.%s" % name, + "desc": "Parsing of non-negative integers", + "size": '%s, %s' % (htmlString, htmlString), + "code": code, + "expected": expected + } ) + + for name, string, exp in cases: + code = "canvas.setAttribute('width', %r);\ncanvas.setAttribute('height', %r);\n" % (string, string) + code, expected = gen(name, string, exp, code) + tests.append( { + "name": "2d.canvas.host.size.attributes.setAttribute.%s" % name, + "desc": "Parsing of non-negative integers in setAttribute", + "size": '50, 50', + "code": code, + "expected": expected + } ) + +- meta: | + state = [ # some non-default values to test with + ('strokeStyle', '"#ff0000"'), + ('fillStyle', '"#ff0000"'), + ('globalAlpha', 0.5), + ('lineWidth', 0.5), + ('lineCap', '"round"'), + ('lineJoin', '"round"'), + ('miterLimit', 0.5), + ('shadowOffsetX', 5), + ('shadowOffsetY', 5), + ('shadowBlur', 5), + ('shadowColor', '"#ff0000"'), + ('globalCompositeOperation', '"copy"'), + ('font', '"25px serif"'), + ('textAlign', '"center"'), + ('textBaseline', '"bottom"'), + ] + for key,value in state: + tests.append( { + 'name': '2d.state.saverestore.%s' % key, + 'desc': 'save()/restore() works for %s' % key, + 'code': + """// Test that restore() undoes any modifications + var old = ctx.%(key)s; + ctx.save(); + ctx.%(key)s = %(value)s; + ctx.restore(); + @assert ctx.%(key)s === old; + + // Also test that save() doesn't modify the values + ctx.%(key)s = %(value)s; + old = ctx.%(key)s; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against %(value)s + ctx.save(); + @assert ctx.%(key)s === old; + ctx.restore(); + """ % { 'key':key, 'value':value } + } ) + + tests.append( { + 'name': '2d.canvas.host.initial.reset.2dstate', + 'desc': 'Resetting the canvas state resets 2D state variables', + 'code': + """canvas.width = 100; + var default_val; + """ + "".join( + """ + default_val = ctx.%(key)s; + ctx.%(key)s = %(value)s; + canvas.width = 100; + @assert ctx.%(key)s === default_val; + """ % { 'key':key, 'value':value } + for key,value in state), + } ) + +- meta: | + # Composite operation tests + # + ops = [ + # name FA FB + ('source-over', '1', '1-aA'), + ('destination-over', '1-aB', '1'), + ('source-in', 'aB', '0'), + ('destination-in', '0', 'aA'), + ('source-out', '1-aB', '0'), + ('destination-out', '0', '1-aA'), + ('source-atop', 'aB', '1-aA'), + ('destination-atop', '1-aB', 'aA'), + ('xor', '1-aB', '1-aA'), + ('copy', '1', '0'), + ('lighter', '1', '1'), + ('clear', '0', '0'), + ] + + # The ones that change the output when src = (0,0,0,0): + ops_trans = [ 'source-in', 'destination-in', 'source-out', 'destination-atop', 'copy' ]; + + def calc_output(A, B, FA_code, FB_code): + (RA, GA, BA, aA) = A + (RB, GB, BB, aB) = B + rA, gA, bA = RA*aA, GA*aA, BA*aA + rB, gB, bB = RB*aB, GB*aB, BB*aB + + FA = eval(FA_code) + FB = eval(FB_code) + + rO = rA*FA + rB*FB + gO = gA*FA + gB*FB + bO = bA*FA + bB*FB + aO = aA*FA + aB*FB + + rO = min(255, rO) + gO = min(255, gO) + bO = min(255, bO) + aO = min(1, aO) + + if aO: + RO = rO / aO + GO = gO / aO + BO = bO / aO + else: RO = GO = BO = 0 + + return (RO, GO, BO, aO) + + def to_test(color): + r, g, b, a = color + return '%d,%d,%d,%d' % (round(r), round(g), round(b), round(a*255)) + def to_cairo(color): + r, g, b, a = color + return '%f,%f,%f,%f' % (r/255., g/255., b/255., a) + + for (name, src, dest) in [ + ('solid', (255, 255, 0, 1.0), (0, 255, 255, 1.0)), + ('transparent', (0, 0, 255, 0.75), (0, 255, 0, 0.5)), + # catches the atop, xor and lighter bugs in Opera 9.10 + ]: + for op, FA_code, FB_code in ops: + expected = calc_output(src, dest, FA_code, FB_code) + tests.append( { + 'name': '2d.composite.%s.%s' % (name, op), + 'code': """ + ctx.fillStyle = 'rgba%s'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = '%s'; + ctx.fillStyle = 'rgba%s'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 ==~ %s +/- 5; + """ % (dest, op, src, to_test(expected)), + 'expected': """size 100 50 + cr.set_source_rgba(%s) + cr.rectangle(0, 0, 100, 50) + cr.fill() + """ % to_cairo(expected), + } ) + + for (name, src, dest) in [ ('image', (255, 255, 0, 0.75), (0, 255, 255, 0.5)) ]: + for op, FA_code, FB_code in ops: + expected = calc_output(src, dest, FA_code, FB_code) + tests.append( { + 'name': '2d.composite.%s.%s' % (name, op), + 'images': [ 'yellow75.png' ], + 'code': """ + ctx.fillStyle = 'rgba%s'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = '%s'; + ctx.drawImage(document.getElementById('yellow75.png'), 0, 0); + @assert pixel 50,25 ==~ %s +/- 5; + """ % (dest, op, to_test(expected)), + 'expected': """size 100 50 + cr.set_source_rgba(%s) + cr.rectangle(0, 0, 100, 50) + cr.fill() + """ % to_cairo(expected), + } ) + + for (name, src, dest) in [ ('canvas', (255, 255, 0, 0.75), (0, 255, 255, 0.5)) ]: + for op, FA_code, FB_code in ops: + expected = calc_output(src, dest, FA_code, FB_code) + tests.append( { + 'name': '2d.composite.%s.%s' % (name, op), + 'images': [ 'yellow75.png' ], + 'code': """ + var canvas2 = document.createElement('canvas'); + canvas2.width = canvas.width; + canvas2.height = canvas.height; + var ctx2 = canvas2.getContext('2d'); + ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0); + ctx.fillStyle = 'rgba%s'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = '%s'; + ctx.drawImage(canvas2, 0, 0); + @assert pixel 50,25 ==~ %s +/- 5; + """ % (dest, op, to_test(expected)), + 'expected': """size 100 50 + cr.set_source_rgba(%s) + cr.rectangle(0, 0, 100, 50) + cr.fill() + """ % to_cairo(expected), + } ) + + + for (name, src, dest) in [ ('uncovered.fill', (0, 0, 255, 0.75), (0, 255, 0, 0.5)) ]: + for op, FA_code, FB_code in ops: + if op not in ops_trans: continue + expected0 = calc_output((0,0,0,0.0), dest, FA_code, FB_code) + tests.append( { + 'name': '2d.composite.%s.%s' % (name, op), + 'desc': 'fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.', + 'code': """ + ctx.fillStyle = 'rgba%s'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = '%s'; + ctx.fillStyle = 'rgba%s'; + ctx.translate(0, 25); + ctx.fillRect(0, 50, 100, 50); + @assert pixel 50,25 ==~ %s +/- 5; + """ % (dest, op, src, to_test(expected0)), + 'expected': """size 100 50 + cr.set_source_rgba(%s) + cr.rectangle(0, 0, 100, 50) + cr.fill() + """ % (to_cairo(expected0)), + } ) + + for (name, src, dest) in [ ('uncovered.image', (255, 255, 0, 1.0), (0, 255, 255, 0.5)) ]: + for op, FA_code, FB_code in ops: + if op not in ops_trans: continue + expected0 = calc_output((0,0,0,0.0), dest, FA_code, FB_code) + tests.append( { + 'name': '2d.composite.%s.%s' % (name, op), + 'desc': 'drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.', + 'images': [ 'yellow.png' ], + 'code': """ + ctx.fillStyle = 'rgba%s'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = '%s'; + ctx.drawImage(document.getElementById('yellow.png'), 40, 40, 10, 10, 40, 50, 10, 10); + @assert pixel 15,15 ==~ %s +/- 5; + @assert pixel 50,25 ==~ %s +/- 5; + """ % (dest, op, to_test(expected0), to_test(expected0)), + 'expected': """size 100 50 + cr.set_source_rgba(%s) + cr.rectangle(0, 0, 100, 50) + cr.fill() + """ % (to_cairo(expected0)), + } ) + + for (name, src, dest) in [ ('uncovered.nocontext', (255, 255, 0, 1.0), (0, 255, 255, 0.5)) ]: + for op, FA_code, FB_code in ops: + if op not in ops_trans: continue + expected0 = calc_output((0,0,0,0.0), dest, FA_code, FB_code) + tests.append( { + 'name': '2d.composite.%s.%s' % (name, op), + 'desc': 'drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged.', + 'code': """ + ctx.fillStyle = 'rgba%s'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = '%s'; + var canvas2 = document.createElement('canvas'); + ctx.drawImage(canvas2, 0, 0); + @assert pixel 50,25 ==~ %s +/- 5; + """ % (dest, op, to_test(expected0)), + 'expected': """size 100 50 + cr.set_source_rgba(%s) + cr.rectangle(0, 0, 100, 50) + cr.fill() + """ % (to_cairo(expected0)), + } ) + + for (name, src, dest) in [ ('uncovered.pattern', (255, 255, 0, 1.0), (0, 255, 255, 0.5)) ]: + for op, FA_code, FB_code in ops: + if op not in ops_trans: continue + expected0 = calc_output((0,0,0,0.0), dest, FA_code, FB_code) + tests.append( { + 'name': '2d.composite.%s.%s' % (name, op), + 'desc': 'Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.', + 'images': [ 'yellow.png' ], + 'code': """ + ctx.fillStyle = 'rgba%s'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = '%s'; + ctx.fillStyle = ctx.createPattern(document.getElementById('yellow.png'), 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + @assert pixel 50,25 ==~ %s +/- 5; + """ % (dest, op, to_test(expected0)), + 'expected': """size 100 50 + cr.set_source_rgba(%s) + cr.rectangle(0, 0, 100, 50) + cr.fill() + """ % (to_cairo(expected0)), + } ) + + for op, FA_code, FB_code in ops: + tests.append( { + 'name': '2d.composite.clip.%s' % (op), + 'desc': 'fill() does not affect pixels outside the clip region.', + 'code': """ + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = '%s'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + @assert pixel 25,25 == 0,255,0,255; + @assert pixel 75,25 == 0,255,0,255; + """ % (op), + 'expected': 'green' + } ) + +- meta: | + # Color parsing tests + + # Try most of the CSS3 Color values - http://www.w3.org/TR/css3-color/#colorunits + big_float = '1' + ('0' * 39) + big_double = '1' + ('0' * 310) + for name, string, r,g,b,a, notes in [ + ('html4', 'limE', 0,255,0,255, ""), + ('hex3', '#0f0', 0,255,0,255, ""), + ('hex4', '#0f0f', 0,255,0,255, ""), + ('hex6', '#00fF00', 0,255,0,255, ""), + ('hex8', '#00ff00ff', 0,255,0,255, ""), + ('rgb-num', 'rgb(0,255,0)', 0,255,0,255, ""), + ('rgb-clamp-1', 'rgb(-1000, 1000, -1000)', 0,255,0,255, 'Assumes colors are clamped to [0,255].'), + ('rgb-clamp-2', 'rgb(-200%, 200%, -200%)', 0,255,0,255, 'Assumes colors are clamped to [0,255].'), + ('rgb-clamp-3', 'rgb(-2147483649, 4294967298, -18446744073709551619)', 0,255,0,255, 'Assumes colors are clamped to [0,255].'), + ('rgb-clamp-4', 'rgb(-'+big_float+', '+big_float+', -'+big_float+')', 0,255,0,255, 'Assumes colors are clamped to [0,255].'), + ('rgb-clamp-5', 'rgb(-'+big_double+', '+big_double+', -'+big_double+')', 0,255,0,255, 'Assumes colors are clamped to [0,255].'), + ('rgb-percent', 'rgb(0% ,100% ,0%)', 0,255,0,255, 'CSS3 Color says "The integer value 255 corresponds to 100%". (In particular, it is not 254...)'), + ('rgb-eof', 'rgb(0, 255, 0', 0,255,0,255, ""), # see CSS2.1 4.2 "Unexpected end of style sheet" + ('rgba-solid-1', 'rgba( 0 , 255 , 0 , 1 )', 0,255,0,255, ""), + ('rgba-solid-2', 'rgba( 0 , 255 , 0 , 1.0 )', 0,255,0,255, ""), + ('rgba-solid-3', 'rgba( 0 , 255 , 0 , +1 )', 0,255,0,255, ""), + ('rgba-solid-4', 'rgba( -0 , 255 , +0 , 1 )', 0,255,0,255, ""), + ('rgba-num-1', 'rgba( 0 , 255 , 0 , .499 )', 0,255,0,127, ""), + ('rgba-num-2', 'rgba( 0 , 255 , 0 , 0.499 )', 0,255,0,127, ""), + ('rgba-percent', 'rgba(0%,100%,0%,0.499)', 0,255,0,127, ""), # 0.499*255 rounds to 127, both down and nearest, so it should be safe + ('rgba-clamp-1', 'rgba(0, 255, 0, -2)', 0,0,0,0, ""), + ('rgba-clamp-2', 'rgba(0, 255, 0, 2)', 0,255,0,255, ""), + ('rgba-eof', 'rgba(0, 255, 0, 1', 0,255,0,255, ""), + ('transparent-1', 'transparent', 0,0,0,0, ""), + ('transparent-2', 'TrAnSpArEnT', 0,0,0,0, ""), + ('hsl-1', 'hsl(120, 100%, 50%)', 0,255,0,255, ""), + ('hsl-2', 'hsl( -240 , 100% , 50% )', 0,255,0,255, ""), + ('hsl-3', 'hsl(360120, 100%, 50%)', 0,255,0,255, ""), + ('hsl-4', 'hsl(-360240, 100%, 50%)', 0,255,0,255, ""), + ('hsl-5', 'hsl(120.0, 100.0%, 50.0%)', 0,255,0,255, ""), + ('hsl-6', 'hsl(+120, +100%, +50%)', 0,255,0,255, ""), + ('hsl-clamp-1', 'hsl(120, 200%, 50%)', 0,255,0,255, ""), + ('hsl-clamp-2', 'hsl(120, -200%, 49.9%)', 127,127,127,255, ""), + ('hsl-clamp-3', 'hsl(120, 100%, 200%)', 255,255,255,255, ""), + ('hsl-clamp-4', 'hsl(120, 100%, -200%)', 0,0,0,255, ""), + ('hsla-1', 'hsla(120, 100%, 50%, 0.499)', 0,255,0,127, ""), + ('hsla-2', 'hsla( 120.0 , 100.0% , 50.0% , 1 )', 0,255,0,255, ""), + ('hsla-clamp-1', 'hsla(120, 200%, 50%, 1)', 0,255,0,255, ""), + ('hsla-clamp-2', 'hsla(120, -200%, 49.9%, 1)', 127,127,127,255, ""), + ('hsla-clamp-3', 'hsla(120, 100%, 200%, 1)', 255,255,255,255, ""), + ('hsla-clamp-4', 'hsla(120, 100%, -200%, 1)', 0,0,0,255, ""), + ('hsla-clamp-5', 'hsla(120, 100%, 50%, 2)', 0,255,0,255, ""), + ('hsla-clamp-6', 'hsla(120, 100%, 0%, -2)', 0,0,0,0, ""), + ('svg-1', 'gray', 128,128,128,255, ""), + ('svg-2', 'grey', 128,128,128,255, ""), + # css-color-4 rgb() color function + # https://drafts.csswg.org/css-color/#numeric-rgb + ('css-color-4-rgb-1', 'rgb(0, 255.0, 0)', 0,255,0,255, ""), + ('css-color-4-rgb-2', 'rgb(0, 255, 0, 0.2)', 0,255,0,51, ""), + ('css-color-4-rgb-3', 'rgb(0, 255, 0, 20%)', 0,255,0,51, ""), + ('css-color-4-rgb-4', 'rgb(0 255 0)', 0,255,0,255, ""), + ('css-color-4-rgb-5', 'rgb(0 255 0 / 0.2)', 0,255,0,51, ""), + ('css-color-4-rgb-6', 'rgb(0 255 0 / 20%)', 0,255,0,51, ""), + ('css-color-4-rgba-1', 'rgba(0, 255.0, 0)', 0,255,0,255, ""), + ('css-color-4-rgba-2', 'rgba(0, 255, 0, 0.2)', 0,255,0,51, ""), + ('css-color-4-rgba-3', 'rgba(0, 255, 0, 20%)', 0,255,0,51, ""), + ('css-color-4-rgba-4', 'rgba(0 255 0)', 0,255,0,255, ""), + ('css-color-4-rgba-5', 'rgba(0 255 0 / 0.2)', 0,255,0,51, ""), + ('css-color-4-rgba-6', 'rgba(0 255 0 / 20%)', 0,255,0,51, ""), + # css-color-4 hsl() color function + # https://drafts.csswg.org/css-color/#the-hsl-notation + ('css-color-4-hsl-1', 'hsl(120 100.0% 50.0%)', 0,255,0,255, ""), + ('css-color-4-hsl-2', 'hsl(120 100.0% 50.0% / 0.2)', 0,255,0,51, ""), + ('css-color-4-hsl-3', 'hsl(120.0, 100.0%, 50.0%, 0.2)', 0,255,0,51, ""), + ('css-color-4-hsl-4', 'hsl(120.0, 100.0%, 50.0%, 20%)', 0,255,0,51, ""), + ('css-color-4-hsl-5', 'hsl(120deg, 100.0%, 50.0%, 0.2)', 0,255,0,51, ""), + ('css-color-4-hsl-6', 'hsl(120deg, 100.0%, 50.0%)', 0,255,0,255, ""), + ('css-color-4-hsl-7', 'hsl(133.33333333grad, 100.0%, 50.0%)', 0,255,0,255, ""), + ('css-color-4-hsl-8', 'hsl(2.0943951024rad, 100.0%, 50.0%)', 0,255,0,255, ""), + ('css-color-4-hsl-9', 'hsl(0.3333333333turn, 100.0%, 50.0%)', 0,255,0,255, ""), + ('css-color-4-hsla-1', 'hsl(120 100.0% 50.0%)', 0,255,0,255, ""), + ('css-color-4-hsla-2', 'hsl(120 100.0% 50.0% / 0.2)', 0,255,0,51, ""), + ('css-color-4-hsla-3', 'hsl(120.0, 100.0%, 50.0%, 0.2)', 0,255,0,51, ""), + ('css-color-4-hsla-4', 'hsl(120.0, 100.0%, 50.0%, 20%)', 0,255,0,51, ""), + ('css-color-4-hsla-5', 'hsl(120deg, 100.0%, 50.0%, 0.2)', 0,255,0,51, ""), + ('css-color-4-hsla-6', 'hsl(120deg, 100.0%, 50.0%)', 0,255,0,255, ""), + ('css-color-4-hsla-7', 'hsl(133.33333333grad, 100.0%, 50.0%)', 0,255,0,255, ""), + ('css-color-4-hsla-8', 'hsl(2.0943951024rad, 100.0%, 50.0%)', 0,255,0,255, ""), + ('css-color-4-hsla-9', 'hsl(0.3333333333turn, 100.0%, 50.0%)', 0,255,0,255, ""), + # currentColor is handled later + ]: + # TODO: test by retrieving fillStyle, instead of actually drawing? + # TODO: test strokeStyle, shadowColor in the same way + test = { + 'name': '2d.fillStyle.parse.%s' % name, + 'notes': notes, + 'code': """ + ctx.fillStyle = '#f00'; + ctx.fillStyle = '%s'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == %d,%d,%d,%d; + """ % (string, r,g,b,a), + 'expected': """size 100 50 + cr.set_source_rgba(%f, %f, %f, %f) + cr.rectangle(0, 0, 100, 50) + cr.fill() + """ % (r/255., g/255., b/255., a/255.), + } + tests.append(test) + + # Also test that invalid colors are ignored + for name, string in [ + ('hex1', '#f'), + ('hex2', '#f0'), + ('hex3', '#g00'), + ('hex4', '#fg00'), + ('hex5', '#ff000'), + ('hex6', '#fg0000'), + ('hex7', '#ff0000f'), + ('hex8', '#fg0000ff'), + ('rgb-1', 'rgb(255.0, 0, 0,)'), + ('rgb-2', 'rgb(100%, 0, 0)'), + ('rgb-3', 'rgb(255, - 1, 0)'), + ('rgba-1', 'rgba(100%, 0, 0, 1)'), + ('rgba-2', 'rgba(255, 0, 0, 1. 0)'), + ('rgba-3', 'rgba(255, 0, 0, 1.)'), + ('rgba-4', 'rgba(255, 0, 0, '), + ('rgba-5', 'rgba(255, 0, 0, 1,)'), + ('hsl-1', 'hsl(0%, 100%, 50%)'), + ('hsl-2', 'hsl(z, 100%, 50%)'), + ('hsl-3', 'hsl(0, 0, 50%)'), + ('hsl-4', 'hsl(0, 100%, 0)'), + ('hsl-5', 'hsl(0, 100.%, 50%)'), + ('hsl-6', 'hsl(0, 100%, 50%,)'), + ('hsla-1', 'hsla(0%, 100%, 50%, 1)'), + ('hsla-2', 'hsla(0, 0, 50%, 1)'), + ('hsla-3', 'hsla(0, 0, 50%, 1,)'), + ('name-1', 'darkbrown'), + ('name-2', 'firebrick1'), + ('name-3', 'red blue'), + ('name-4', '"red"'), + ('name-5', '"red'), + # css-color-4 color function + # comma and comma-less expressions should not mix together. + ('css-color-4-rgb-1', 'rgb(255, 0, 0 / 1)'), + ('css-color-4-rgb-2', 'rgb(255 0 0, 1)'), + ('css-color-4-rgb-3', 'rgb(255, 0 0)'), + ('css-color-4-rgba-1', 'rgba(255, 0, 0 / 1)'), + ('css-color-4-rgba-2', 'rgba(255 0 0, 1)'), + ('css-color-4-rgba-3', 'rgba(255, 0 0)'), + ('css-color-4-hsl-1', 'hsl(0, 100%, 50% / 1)'), + ('css-color-4-hsl-2', 'hsl(0 100% 50%, 1)'), + ('css-color-4-hsl-3', 'hsl(0, 100% 50%)'), + ('css-color-4-hsla-1', 'hsla(0, 100%, 50% / 1)'), + ('css-color-4-hsla-2', 'hsla(0 100% 50%, 1)'), + ('css-color-4-hsla-3', 'hsla(0, 100% 50%)'), + # trailing slash + ('css-color-4-rgb-4', 'rgb(0 0 0 /)'), + ('css-color-4-rgb-5', 'rgb(0, 0, 0 /)'), + ('css-color-4-hsl-4', 'hsl(0 100% 50% /)'), + ('css-color-4-hsl-5', 'hsl(0, 100%, 50% /)'), + ]: + test = { + 'name': '2d.fillStyle.parse.invalid.%s' % name, + 'code': """ + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '%s'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + """ % string, + 'expected': 'green' + } + tests.append(test) + + # Some can't have positive tests, only negative tests, because we don't know what color they're meant to be + for name, string in [ + ('system', 'ThreeDDarkShadow'), + #('flavor', 'flavor'), # removed from latest CSS3 Color drafts + ]: + test = { + 'name': '2d.fillStyle.parse.%s' % name, + 'code': """ + ctx.fillStyle = '#f00'; + ctx.fillStyle = '%s'; + @assert ctx.fillStyle =~ /^#(?!(FF0000|ff0000|f00)$)/; // test that it's not red + """ % (string,), + } + tests.append(test) \ No newline at end of file diff --git a/testing/web-platform/tests/html/canvas/tools/yaml/element/the-canvas-element.yaml b/testing/web-platform/tests/html/canvas/tools/yaml/element/the-canvas-element.yaml new file mode 100644 index 0000000000..1ecf8ccdbf --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/yaml/element/the-canvas-element.yaml @@ -0,0 +1,143 @@ +- name: 2d.canvas.context.exists + desc: The 2D context is implemented + code: | + @assert canvas.getContext('2d') !== null; + +- name: 2d.canvas.context.invalid.args + desc: Calling getContext with invalid arguments. + code: | + @assert canvas.getContext('') === null; + @assert canvas.getContext('2d#') === null; + @assert canvas.getContext('This is clearly not a valid context name.') === null; + @assert canvas.getContext('2d\0') === null; + @assert canvas.getContext('2\uFF44') === null; + @assert canvas.getContext('2D') === null; + @assert throws TypeError canvas.getContext(); + @assert canvas.getContext('null') === null; + @assert canvas.getContext('undefined') === null; + +- name: 2d.canvas.context.extraargs.create + desc: The 2D context doesn't throw with extra getContext arguments (new context) + code: | + @assert document.createElement("canvas").getContext('2d', false, {}, [], 1, "2") !== null; + @assert document.createElement("canvas").getContext('2d', 123) !== null; + @assert document.createElement("canvas").getContext('2d', "test") !== null; + @assert document.createElement("canvas").getContext('2d', undefined) !== null; + @assert document.createElement("canvas").getContext('2d', null) !== null; + @assert document.createElement("canvas").getContext('2d', Symbol.hasInstance) !== null; + +- name: 2d.canvas.context.extraargs.cache + desc: The 2D context doesn't throw with extra getContext arguments (cached) + code: | + @assert canvas.getContext('2d', false, {}, [], 1, "2") !== null; + @assert canvas.getContext('2d', 123) !== null; + @assert canvas.getContext('2d', "test") !== null; + @assert canvas.getContext('2d', undefined) !== null; + @assert canvas.getContext('2d', null) !== null; + @assert canvas.getContext('2d', Symbol.hasInstance) !== null; + +- name: 2d.canvas.context.type.exists + desc: The 2D context interface is a property of 'window' + notes: &bindings Defined in "Web IDL" (draft) + code: | + @assert window.CanvasRenderingContext2D; + +- name: 2d.canvas.context.type.prototype + desc: window.CanvasRenderingContext2D.prototype are not [[Writable]] and not [[Configurable]], + and its methods are [[Configurable]]. + notes: *bindings + code: | + @assert window.CanvasRenderingContext2D.prototype; + @assert window.CanvasRenderingContext2D.prototype.fill; + window.CanvasRenderingContext2D.prototype = null; + @assert window.CanvasRenderingContext2D.prototype; + delete window.CanvasRenderingContext2D.prototype; + @assert window.CanvasRenderingContext2D.prototype; + window.CanvasRenderingContext2D.prototype.fill = 1; + @assert window.CanvasRenderingContext2D.prototype.fill === 1; + delete window.CanvasRenderingContext2D.prototype.fill; + @assert window.CanvasRenderingContext2D.prototype.fill === undefined; + +- name: 2d.canvas.context.type.replace + desc: Interface methods can be overridden + notes: *bindings + code: | + var fillRect = window.CanvasRenderingContext2D.prototype.fillRect; + window.CanvasRenderingContext2D.prototype.fillRect = function (x, y, w, h) + { + this.fillStyle = '#0f0'; + fillRect.call(this, x, y, w, h); + }; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.canvas.context.type.extend + desc: Interface methods can be added + notes: *bindings + code: | + window.CanvasRenderingContext2D.prototype.fillRectGreen = function (x, y, w, h) + { + this.fillStyle = '#0f0'; + this.fillRect(x, y, w, h); + }; + ctx.fillStyle = '#f00'; + ctx.fillRectGreen(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.canvas.context.unique + desc: getContext('2d') returns the same object + code: | + @assert canvas.getContext('2d') === canvas.getContext('2d'); + +- name: 2d.canvas.context.shared + desc: getContext('2d') returns objects which share canvas state + code: | + var ctx2 = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx2.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + expected: green + +- name: 2d.canvas.host.scaled + desc: CSS-scaled canvases get drawn correctly + size: 50, 25 + canvas: 'style="width: 100px; height: 50px"' + manual: + code: | + ctx.fillStyle = '#00f'; + ctx.fillRect(0, 0, 50, 25); + ctx.fillStyle = '#0ff'; + ctx.fillRect(0, 0, 25, 10); + expected: | + size 100 50 + cr.set_source_rgb(0, 0, 1) + cr.rectangle(0, 0, 100, 50) + cr.fill() + cr.set_source_rgb(0, 1, 1) + cr.rectangle(0, 0, 50, 20) + cr.fill() + +- name: 2d.canvas.host.reference + desc: CanvasRenderingContext2D.canvas refers back to its canvas + code: | + @assert ctx.canvas === canvas; + +- name: 2d.canvas.host.readonly + desc: CanvasRenderingContext2D.canvas is readonly + code: | + var c = document.createElement('canvas'); + var d = ctx.canvas; + @assert c !== d; + ctx.canvas = c; + @assert ctx.canvas === d; + +- name: 2d.canvas.context.prototype + desc: checks CanvasRenderingContext2D prototype + code: | + @assert Object.getPrototypeOf(CanvasRenderingContext2D.prototype) === Object.prototype; + @assert Object.getPrototypeOf(ctx) === CanvasRenderingContext2D.prototype; + t.done(); diff --git a/testing/web-platform/tests/html/canvas/tools/yaml/offscreen/meta.yaml b/testing/web-platform/tests/html/canvas/tools/yaml/offscreen/meta.yaml new file mode 100644 index 0000000000..7b44fd9f26 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/yaml/offscreen/meta.yaml @@ -0,0 +1,539 @@ +- meta: | + state = [ # some non-default values to test with + ('strokeStyle', '"#ff0000"'), + ('fillStyle', '"#ff0000"'), + ('globalAlpha', 0.5), + ('lineWidth', 0.5), + ('lineCap', '"round"'), + ('lineJoin', '"round"'), + ('miterLimit', 0.5), + ('shadowOffsetX', 5), + ('shadowOffsetY', 5), + ('shadowBlur', 5), + ('shadowColor', '"#ff0000"'), + ('globalCompositeOperation', '"copy"'), + ] + for key,value in state: + tests.append( { + 'name': '2d.state.saverestore.%s' % key, + 'desc': 'save()/restore() works for %s' % key, + 'code': + """// Test that restore() undoes any modifications + var old = ctx.%(key)s; + ctx.save(); + ctx.%(key)s = %(value)s; + ctx.restore(); + @assert ctx.%(key)s === old; + + // Also test that save() doesn't modify the values + ctx.%(key)s = %(value)s; + old = ctx.%(key)s; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against %(value)s + ctx.save(); + @assert ctx.%(key)s === old; + ctx.restore(); + t.done(); + """ % { 'key':key, 'value':value } + } ) + + tests.append( { + 'name': '2d.canvas.host.initial.reset.2dstate', + 'desc': 'Resetting the canvas state resets 2D state variables', + 'code': + """canvas.width = 100; + var default_val; + """ + "".join( + """ + default_val = ctx.%(key)s; + ctx.%(key)s = %(value)s; + canvas.width = 100; + @assert ctx.%(key)s === default_val; + """ % { 'key':key, 'value':value } + for key,value in state) + "\nt.done();", + } ) + +- meta: | + # Composite operation tests + # + ops = [ + # name FA FB + ('source-over', '1', '1-aA'), + ('destination-over', '1-aB', '1'), + ('source-in', 'aB', '0'), + ('destination-in', '0', 'aA'), + ('source-out', '1-aB', '0'), + ('destination-out', '0', '1-aA'), + ('source-atop', 'aB', '1-aA'), + ('destination-atop', '1-aB', 'aA'), + ('xor', '1-aB', '1-aA'), + ('copy', '1', '0'), + ('lighter', '1', '1'), + ('clear', '0', '0'), + ] + + # The ones that change the output when src = (0,0,0,0): + ops_trans = [ 'source-in', 'destination-in', 'source-out', 'destination-atop', 'copy' ]; + + def calc_output(A, B, FA_code, FB_code): + RA, GA, BA, aA = A + RB, GB, BB, aB = B + rA, gA, bA = RA*aA, GA*aA, BA*aA + rB, gB, bB = RB*aB, GB*aB, BB*aB + + FA = eval(FA_code) + FB = eval(FB_code) + + rO = rA*FA + rB*FB + gO = gA*FA + gB*FB + bO = bA*FA + bB*FB + aO = aA*FA + aB*FB + + rO = min(255, rO) + gO = min(255, gO) + bO = min(255, bO) + aO = min(1, aO) + + if aO: + RO = rO / aO + GO = gO / aO + BO = bO / aO + else: RO = GO = BO = 0 + + return (RO, GO, BO, aO) + + def to_test(color): + r, g, b, a = color + return '%d,%d,%d,%d' % (round(r), round(g), round(b), round(a*255)) + def to_cairo(color): + r, g, b, a = color + return '%f,%f,%f,%f' % (r/255., g/255., b/255., a) + + for (name, src, dest) in [ + ('solid', (255, 255, 0, 1.0), (0, 255, 255, 1.0)), + ('transparent', (0, 0, 255, 0.75), (0, 255, 0, 0.5)), + # catches the atop, xor and lighter bugs in Opera 9.10 + ]: + for op, FA_code, FB_code in ops: + expected = calc_output(src, dest, FA_code, FB_code) + tests.append( { + 'name': '2d.composite.%s.%s' % (name, op), + 'code': """ + ctx.fillStyle = 'rgba%s'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = '%s'; + ctx.fillStyle = 'rgba%s'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 ==~ %s +/- 5; + t.done(); + """ % (dest, op, src, to_test(expected)), + } ) + + for (name, src, dest) in [ ('image', (255, 255, 0, 0.75), (0, 255, 255, 0.5)) ]: + for op, FA_code, FB_code in ops: + expected = calc_output(src, dest, FA_code, FB_code) + tests.append( { + 'name': '2d.composite.%s.%s' % (name, op), + 'images': [ 'yellow75.png' ], + 'code': """ + ctx.fillStyle = 'rgba%s'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = '%s'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + @assert pixel 50,25 ==~ %s +/- 5; + }); + }).then(t_pass, t_fail); + """ % (dest, op, to_test(expected)), + } ) + + for (name, src, dest) in [ ('canvas', (255, 255, 0, 0.75), (0, 255, 255, 0.5)) ]: + for op, FA_code, FB_code in ops: + expected = calc_output(src, dest, FA_code, FB_code) + tests.append( { + 'name': '2d.composite.%s.%s' % (name, op), + 'images': [ 'yellow75.png' ], + 'code': """ + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba%s'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = '%s'; + ctx.drawImage(offscreenCanvas2, 0, 0); + @assert pixel 50,25 ==~ %s +/- 5; + }); + }).then(t_pass, t_fail); + """ % (dest, op, to_test(expected)), + } ) + + for (name, src, dest) in [ ('uncovered.fill', (0, 0, 255, 0.75), (0, 255, 0, 0.5)) ]: + for op, FA_code, FB_code in ops: + if op not in ops_trans: continue + expected0 = calc_output((0,0,0,0.0), dest, FA_code, FB_code) + new_test = { + 'name': '2d.composite.%s.%s' % (name, op), + 'desc': 'fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.', + 'code': """ + ctx.fillStyle = 'rgba%s'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = '%s'; + ctx.fillStyle = 'rgba%s'; + ctx.translate(0, 25); + ctx.fillRect(0, 50, 100, 50); + @assert pixel 50,25 ==~ %s +/- 5; + t.done(); + """ % (dest, op, src, to_test(expected0)), + } + if op == 'destination-in': + new_test['timeout'] = 'long' + tests.append(new_test) + + for (name, src, dest) in [ ('uncovered.image', (255, 255, 0, 1.0), (0, 255, 255, 0.5)) ]: + for op, FA_code, FB_code in ops: + if op not in ops_trans: continue + expected0 = calc_output((0,0,0,0.0), dest, FA_code, FB_code) + tests.append( { + 'name': '2d.composite.%s.%s' % (name, op), + 'desc': 'drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.', + 'images': [ 'yellow.png' ], + 'code': """ + ctx.fillStyle = 'rgba%s'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = '%s'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); + @assert pixel 15,15 ==~ %s +/- 5; + @assert pixel 50,25 ==~ %s +/- 5; + }); + }).then(t_pass, t_fail); + """ % (dest, op, to_test(expected0), to_test(expected0)), + } ) + + for (name, src, dest) in [ ('uncovered.nocontext', (255, 255, 0, 1.0), (0, 255, 255, 0.5)) ]: + for op, FA_code, FB_code in ops: + if op not in ops_trans: continue + expected0 = calc_output((0,0,0,0.0), dest, FA_code, FB_code) + tests.append( { + 'name': '2d.composite.%s.%s' % (name, op), + 'desc': 'drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged.', + 'code': """ + ctx.fillStyle = 'rgba%s'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = '%s'; + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + ctx.drawImage(offscreenCanvas2, 0, 0); + @assert pixel 50,25 ==~ %s +/- 5; + t.done(); + """ % (dest, op, to_test(expected0)), + } ) + + for (name, src, dest) in [ ('uncovered.pattern', (255, 255, 0, 1.0), (0, 255, 255, 0.5)) ]: + for op, FA_code, FB_code in ops: + if op not in ops_trans: continue + expected0 = calc_output((0,0,0,0.0), dest, FA_code, FB_code) + tests.append( { + 'name': '2d.composite.%s.%s' % (name, op), + 'desc': 'Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.', + 'images': [ 'yellow.png' ], + 'code': """ + ctx.fillStyle = 'rgba%s'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = '%s'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + return createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + @assert pixel 50,25 ==~ %s +/- 5; + }); + }).then(t_pass, t_fail); + """ % (dest, op, to_test(expected0)), + } ) + + for op, FA_code, FB_code in ops: + tests.append( { + 'name': '2d.composite.clip.%s' % (op), + 'desc': 'fill() does not affect pixels outside the clip region.', + 'code': """ + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = '%s'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + @assert pixel 25,25 == 0,255,0,255; + @assert pixel 75,25 == 0,255,0,255; + t.done(); + """ % (op), + } ) + +- meta: | + # Color parsing tests + + # Try most of the CSS3 Color values - http://www.w3.org/TR/css3-color/#colorunits + big_float = '1' + ('0' * 39) + big_double = '1' + ('0' * 310) + for name, string, r,g,b,a, notes in [ + ('html4', 'limE', 0,255,0,255, ""), + ('hex3', '#0f0', 0,255,0,255, ""), + ('hex4', '#0f0f', 0,255,0,255, ""), + ('hex6', '#00fF00', 0,255,0,255, ""), + ('hex8', '#00ff00ff', 0,255,0,255, ""), + ('rgb-num', 'rgb(0,255,0)', 0,255,0,255, ""), + ('rgb-clamp-1', 'rgb(-1000, 1000, -1000)', 0,255,0,255, 'Assumes colors are clamped to [0,255].'), + ('rgb-clamp-2', 'rgb(-200%, 200%, -200%)', 0,255,0,255, 'Assumes colors are clamped to [0,255].'), + ('rgb-clamp-3', 'rgb(-2147483649, 4294967298, -18446744073709551619)', 0,255,0,255, 'Assumes colors are clamped to [0,255].'), + ('rgb-clamp-4', 'rgb(-'+big_float+', '+big_float+', -'+big_float+')', 0,255,0,255, 'Assumes colors are clamped to [0,255].'), + ('rgb-clamp-5', 'rgb(-'+big_double+', '+big_double+', -'+big_double+')', 0,255,0,255, 'Assumes colors are clamped to [0,255].'), + ('rgb-percent', 'rgb(0% ,100% ,0%)', 0,255,0,255, 'CSS3 Color says "The integer value 255 corresponds to 100%". (In particular, it is not 254...)'), + ('rgb-eof', 'rgb(0, 255, 0', 0,255,0,255, ""), # see CSS2.1 4.2 "Unexpected end of style sheet" + ('rgba-solid-1', 'rgba( 0 , 255 , 0 , 1 )', 0,255,0,255, ""), + ('rgba-solid-2', 'rgba( 0 , 255 , 0 , 1.0 )', 0,255,0,255, ""), + ('rgba-solid-3', 'rgba( 0 , 255 , 0 , +1 )', 0,255,0,255, ""), + ('rgba-solid-4', 'rgba( -0 , 255 , +0 , 1 )', 0,255,0,255, ""), + ('rgba-num-1', 'rgba( 0 , 255 , 0 , .499 )', 0,255,0,127, ""), + ('rgba-num-2', 'rgba( 0 , 255 , 0 , 0.499 )', 0,255,0,127, ""), + ('rgba-percent', 'rgba(0%,100%,0%,0.499)', 0,255,0,127, ""), # 0.499*255 rounds to 127, both down and nearest, so it should be safe + ('rgba-clamp-1', 'rgba(0, 255, 0, -2)', 0,0,0,0, ""), + ('rgba-clamp-2', 'rgba(0, 255, 0, 2)', 0,255,0,255, ""), + ('rgba-eof', 'rgba(0, 255, 0, 1', 0,255,0,255, ""), + ('transparent-1', 'transparent', 0,0,0,0, ""), + ('transparent-2', 'TrAnSpArEnT', 0,0,0,0, ""), + ('hsl-1', 'hsl(120, 100%, 50%)', 0,255,0,255, ""), + ('hsl-2', 'hsl( -240 , 100% , 50% )', 0,255,0,255, ""), + ('hsl-3', 'hsl(360120, 100%, 50%)', 0,255,0,255, ""), + ('hsl-4', 'hsl(-360240, 100%, 50%)', 0,255,0,255, ""), + ('hsl-5', 'hsl(120.0, 100.0%, 50.0%)', 0,255,0,255, ""), + ('hsl-6', 'hsl(+120, +100%, +50%)', 0,255,0,255, ""), + ('hsl-clamp-1', 'hsl(120, 200%, 50%)', 0,255,0,255, ""), + ('hsl-clamp-2', 'hsl(120, -200%, 49.9%)', 127,127,127,255, ""), + ('hsl-clamp-3', 'hsl(120, 100%, 200%)', 255,255,255,255, ""), + ('hsl-clamp-4', 'hsl(120, 100%, -200%)', 0,0,0,255, ""), + ('hsla-1', 'hsla(120, 100%, 50%, 0.499)', 0,255,0,127, ""), + ('hsla-2', 'hsla( 120.0 , 100.0% , 50.0% , 1 )', 0,255,0,255, ""), + ('hsla-clamp-1', 'hsla(120, 200%, 50%, 1)', 0,255,0,255, ""), + ('hsla-clamp-2', 'hsla(120, -200%, 49.9%, 1)', 127,127,127,255, ""), + ('hsla-clamp-3', 'hsla(120, 100%, 200%, 1)', 255,255,255,255, ""), + ('hsla-clamp-4', 'hsla(120, 100%, -200%, 1)', 0,0,0,255, ""), + ('hsla-clamp-5', 'hsla(120, 100%, 50%, 2)', 0,255,0,255, ""), + ('hsla-clamp-6', 'hsla(120, 100%, 0%, -2)', 0,0,0,0, ""), + ('svg-1', 'gray', 128,128,128,255, ""), + ('svg-2', 'grey', 128,128,128,255, ""), + # css-color-4 rgb() color function + # https://drafts.csswg.org/css-color/#numeric-rgb + ('css-color-4-rgb-1', 'rgb(0, 255.0, 0)', 0,255,0,255, ""), + ('css-color-4-rgb-2', 'rgb(0, 255, 0, 0.2)', 0,255,0,51, ""), + ('css-color-4-rgb-3', 'rgb(0, 255, 0, 20%)', 0,255,0,51, ""), + ('css-color-4-rgb-4', 'rgb(0 255 0)', 0,255,0,255, ""), + ('css-color-4-rgb-5', 'rgb(0 255 0 / 0.2)', 0,255,0,51, ""), + ('css-color-4-rgb-6', 'rgb(0 255 0 / 20%)', 0,255,0,51, ""), + ('css-color-4-rgba-1', 'rgba(0, 255.0, 0)', 0,255,0,255, ""), + ('css-color-4-rgba-2', 'rgba(0, 255, 0, 0.2)', 0,255,0,51, ""), + ('css-color-4-rgba-3', 'rgba(0, 255, 0, 20%)', 0,255,0,51, ""), + ('css-color-4-rgba-4', 'rgba(0 255 0)', 0,255,0,255, ""), + ('css-color-4-rgba-5', 'rgba(0 255 0 / 0.2)', 0,255,0,51, ""), + ('css-color-4-rgba-6', 'rgba(0 255 0 / 20%)', 0,255,0,51, ""), + # css-color-4 hsl() color function + # https://drafts.csswg.org/css-color/#the-hsl-notation + ('css-color-4-hsl-1', 'hsl(120 100.0% 50.0%)', 0,255,0,255, ""), + ('css-color-4-hsl-2', 'hsl(120 100.0% 50.0% / 0.2)', 0,255,0,51, ""), + ('css-color-4-hsl-3', 'hsl(120.0, 100.0%, 50.0%, 0.2)', 0,255,0,51, ""), + ('css-color-4-hsl-4', 'hsl(120.0, 100.0%, 50.0%, 20%)', 0,255,0,51, ""), + ('css-color-4-hsl-5', 'hsl(120deg, 100.0%, 50.0%, 0.2)', 0,255,0,51, ""), + ('css-color-4-hsl-6', 'hsl(120deg, 100.0%, 50.0%)', 0,255,0,255, ""), + ('css-color-4-hsl-7', 'hsl(133.33333333grad, 100.0%, 50.0%)', 0,255,0,255, ""), + ('css-color-4-hsl-8', 'hsl(2.0943951024rad, 100.0%, 50.0%)', 0,255,0,255, ""), + ('css-color-4-hsl-9', 'hsl(0.3333333333turn, 100.0%, 50.0%)', 0,255,0,255, ""), + ('css-color-4-hsla-1', 'hsl(120 100.0% 50.0%)', 0,255,0,255, ""), + ('css-color-4-hsla-2', 'hsl(120 100.0% 50.0% / 0.2)', 0,255,0,51, ""), + ('css-color-4-hsla-3', 'hsl(120.0, 100.0%, 50.0%, 0.2)', 0,255,0,51, ""), + ('css-color-4-hsla-4', 'hsl(120.0, 100.0%, 50.0%, 20%)', 0,255,0,51, ""), + ('css-color-4-hsla-5', 'hsl(120deg, 100.0%, 50.0%, 0.2)', 0,255,0,51, ""), + ('css-color-4-hsla-6', 'hsl(120deg, 100.0%, 50.0%)', 0,255,0,255, ""), + ('css-color-4-hsla-7', 'hsl(133.33333333grad, 100.0%, 50.0%)', 0,255,0,255, ""), + ('css-color-4-hsla-8', 'hsl(2.0943951024rad, 100.0%, 50.0%)', 0,255,0,255, ""), + ('css-color-4-hsla-9', 'hsl(0.3333333333turn, 100.0%, 50.0%)', 0,255,0,255, ""), + # currentColor is handled later + ]: + # TODO: test by retrieving fillStyle, instead of actually drawing? + # TODO: test strokeStyle, shadowColor in the same way + test = { + 'name': '2d.fillStyle.parse.%s' % name, + 'notes': notes, + 'code': """ + ctx.fillStyle = '#f00'; + ctx.fillStyle = '%s'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == %d,%d,%d,%d; + t.done(); + """ % (string, r,g,b,a), + } + tests.append(test) + + # Also test that invalid colors are ignored + for name, string in [ + ('hex1', '#f'), + ('hex2', '#f0'), + ('hex3', '#g00'), + ('hex4', '#fg00'), + ('hex5', '#ff000'), + ('hex6', '#fg0000'), + ('hex7', '#ff0000f'), + ('hex8', '#fg0000ff'), + ('rgb-1', 'rgb(255.0, 0, 0,)'), + ('rgb-2', 'rgb(100%, 0, 0)'), + ('rgb-3', 'rgb(255, - 1, 0)'), + ('rgba-1', 'rgba(100%, 0, 0, 1)'), + ('rgba-2', 'rgba(255, 0, 0, 1. 0)'), + ('rgba-3', 'rgba(255, 0, 0, 1.)'), + ('rgba-4', 'rgba(255, 0, 0, '), + ('rgba-5', 'rgba(255, 0, 0, 1,)'), + ('hsl-1', 'hsl(0%, 100%, 50%)'), + ('hsl-2', 'hsl(z, 100%, 50%)'), + ('hsl-3', 'hsl(0, 0, 50%)'), + ('hsl-4', 'hsl(0, 100%, 0)'), + ('hsl-5', 'hsl(0, 100.%, 50%)'), + ('hsl-6', 'hsl(0, 100%, 50%,)'), + ('hsla-1', 'hsla(0%, 100%, 50%, 1)'), + ('hsla-2', 'hsla(0, 0, 50%, 1)'), + ('hsla-3', 'hsla(0, 0, 50%, 1,)'), + ('name-1', 'darkbrown'), + ('name-2', 'firebrick1'), + ('name-3', 'red blue'), + ('name-4', '"red"'), + ('name-5', '"red'), + # css-color-4 color function + # comma and comma-less expressions should not mix together. + ('css-color-4-rgb-1', 'rgb(255, 0, 0 / 1)'), + ('css-color-4-rgb-2', 'rgb(255 0 0, 1)'), + ('css-color-4-rgb-3', 'rgb(255, 0 0)'), + ('css-color-4-rgba-1', 'rgba(255, 0, 0 / 1)'), + ('css-color-4-rgba-2', 'rgba(255 0 0, 1)'), + ('css-color-4-rgba-3', 'rgba(255, 0 0)'), + ('css-color-4-hsl-1', 'hsl(0, 100%, 50% / 1)'), + ('css-color-4-hsl-2', 'hsl(0 100% 50%, 1)'), + ('css-color-4-hsl-3', 'hsl(0, 100% 50%)'), + ('css-color-4-hsla-1', 'hsla(0, 100%, 50% / 1)'), + ('css-color-4-hsla-2', 'hsla(0 100% 50%, 1)'), + ('css-color-4-hsla-3', 'hsla(0, 100% 50%)'), + # trailing slash + ('css-color-4-rgb-4', 'rgb(0 0 0 /)'), + ('css-color-4-rgb-5', 'rgb(0, 0, 0 /)'), + ('css-color-4-hsl-4', 'hsl(0 100% 50% /)'), + ('css-color-4-hsl-5', 'hsl(0, 100%, 50% /)'), + ]: + test = { + 'name': '2d.fillStyle.parse.invalid.%s' % name, + 'code': """ + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '%s'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + t.done(); + """ % string, + } + tests.append(test) + + # Some can't have positive tests, only negative tests, because we don't know what color they're meant to be + for name, string in [ + ('system', 'ThreeDDarkShadow'), + #('flavor', 'flavor'), # removed from latest CSS3 Color drafts + ]: + test = { + 'name': '2d.fillStyle.parse.%s' % name, + 'code': """ + ctx.fillStyle = '#f00'; + ctx.fillStyle = '%s'; + @assert ctx.fillStyle =~ /^#(?!(FF0000|ff0000|f00)$)/; // test that it's not red + t.done(); + """ % (string,), + } + tests.append(test) + +- meta: | + cases = [ + ("zero", "0", 0), + ("empty", "", 0), + ("onlyspace", " ", 0), + ("space", " 100", 100), + ("whitespace", "\t\f100", 100), + ("plus", "+100", 100), + ("minus", "-100", "exception"), + ("octal", "0100", 100), + ("hex", "0x100", 0x100), + ("exp", "100e1", 100e1), + ("decimal", "100.999", 100), + ("percent", "100%", "exception"), + ("em", "100em", "exception"), + ("junk", "#!?", "exception"), + ("trailingjunk", "100#!?", "exception"), + ] + def gen(name, string, exp, code): + if exp is None: + code += "canvas.width = '%s';\ncanvas.height = '%s';\n" % (string, string) + code += "@assert canvas.width === 100;\n@assert canvas.height === 50;\n" + expected = None + elif exp == "exception": + code += "@assert throws TypeError canvas.width = '%s';\n" % string + expected = None + else: + code += "canvas.width = '%s';\ncanvas.height = '%s';\n" % (string, string) + code += "@assert canvas.width === %s;\n@assert canvas.height === %s;\n" % (exp, exp) + expected = None + + code += "t.done();\n" + + if exp == 0: + expected = None # can't generate zero-sized PNGs for the expected image + + return code, expected + + for name, string, exp in cases: + code = "" + code, expected = gen(name, string, exp, code) + tests.append( { + "name": "2d.canvas.host.size.attributes.parse.%s" % name, + "desc": "Parsing of non-negative integers", + "code": code, + } ) diff --git a/testing/web-platform/tests/html/canvas/tools/yaml/offscreen/the-offscreen-canvas.yaml b/testing/web-platform/tests/html/canvas/tools/yaml/offscreen/the-offscreen-canvas.yaml new file mode 100644 index 0000000000..ccabe094b8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/yaml/offscreen/the-offscreen-canvas.yaml @@ -0,0 +1,269 @@ +- name: 2d.canvas.host.reference + desc: canvas refers back to its canvas + code: | + @assert ctx.canvas === canvas; + t.done(); + +- name: 2d.canvas.host.readonly + desc: canvas is readonly + code: | + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var d = ctx.canvas; + @assert offscreenCanvas2 !== d; + ctx.canvas = offscreenCanvas2; + @assert ctx.canvas === d; + t.done(); + +- name: 2d.canvas.context.exists + desc: The 2D context is implemented + code: | + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + @assert offscreenCanvas2.getContext('2d') !== null; + t.done(); + +- name: 2d.canvas.context.extraargs.create + desc: The 2D context doesn't throw with extra getContext arguments (new context) + code: | + @assert (new OffscreenCanvas(100, 50)).getContext('2d', false, {}, [], 1, "2") !== null; + @assert (new OffscreenCanvas(100, 50)).getContext('2d', 123) !== null; + @assert (new OffscreenCanvas(100, 50)).getContext('2d', "test") !== null; + @assert (new OffscreenCanvas(100, 50)).getContext('2d', undefined) !== null; + @assert (new OffscreenCanvas(100, 50)).getContext('2d', null) !== null; + @assert (new OffscreenCanvas(100, 50)).getContext('2d', Symbol.hasInstance) !== null; + t.done(); + +- name: 2d.canvas.context.extraargs.cache + desc: The 2D context doesn't throw with extra getContext arguments (cached) + code: | + @assert canvas.getContext('2d', false, {}, [], 1, "2") !== null; + @assert canvas.getContext('2d', 123) !== null; + @assert canvas.getContext('2d', "test") !== null; + @assert canvas.getContext('2d', undefined) !== null; + @assert canvas.getContext('2d', null) !== null; + @assert canvas.getContext('2d', Symbol.hasInstance) !== null; + t.done(); + +- name: 2d.canvas.context.unique + desc: getContext('2d') returns the same object + code: | + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + @assert offscreenCanvas2.getContext('2d') === offscreenCanvas2.getContext('2d'); + t.done(); + +- name: 2d.canvas.context.shared + desc: getContext('2d') returns objects which share canvas state + code: | + var ctx2 = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx2.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + t.done(); + +- name: 2d.canvas.context.emptystring + desc: getContext with empty string returns null + code: | + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + @assert throws TypeError offscreenCanvas2.getContext(""); + t.done(); + +- name: 2d.canvas.context.unrecognised.badname + desc: getContext with unrecognised context name returns null + code: | + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + @assert throws TypeError offscreenCanvas2.getContext('This is not an implemented context in any real browser'); + t.done(); + +- name: 2d.canvas.context.unrecognised.badsuffix + desc: Context name "2d" plus a suffix is unrecognised + code: | + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + @assert throws TypeError offscreenCanvas2.getContext("2d#"); + t.done(); + +- name: 2d.canvas.context.unrecognised.nullsuffix + desc: Context name "2d" plus a "\0" suffix is unrecognised + code: | + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + @assert throws TypeError offscreenCanvas2.getContext("2d\0"); + t.done(); + +- name: 2d.canvas.context.unrecognised.unicode + desc: Context name which kind of looks like "2d" is unrecognised + code: | + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + @assert throws TypeError offscreenCanvas2.getContext("2\uFF44"); + t.done(); + +- name: 2d.canvas.context.casesensitive + desc: Context name "2D" is unrecognised; matching is case sensitive + code: | + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + @assert throws TypeError offscreenCanvas2.getContext('2D'); + t.done(); + +- name: 2d.canvas.context.arguments.missing + code: | + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + @assert throws TypeError offscreenCanvas2.getContext(); @moz-todo + t.done(); + + +- name: 2d.canvas.host.initial.color + desc: Initial state is transparent black + code: | + @assert pixel 20,20 == 0,0,0,0; + t.done(); + +- name: 2d.canvas.host.initial.reset.different + desc: Changing size resets canvas to transparent black + code: | + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + @assert pixel 20,20 == 255,0,0,255; + canvas.width = 50; + @assert pixel 20,20 == 0,0,0,0; + t.done(); + +- name: 2d.canvas.host.initial.reset.same + desc: Setting size (not changing the value) resets canvas to transparent black + code: | + canvas.width = 100; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + @assert pixel 20,20 == 255,0,0,255; + canvas.width = 100; + @assert pixel 20,20 == 0,0,0,0; + t.done(); + +- name: 2d.canvas.host.initial.reset.path + desc: Resetting the canvas state resets the current path + code: | + canvas.width = 100; + ctx.rect(0, 0, 100, 50); + canvas.width = 100; + ctx.fillStyle = '#f00'; + ctx.fill(); + @assert pixel 20,20 == 0,0,0,0; + t.done(); + +- name: 2d.canvas.host.initial.reset.clip + desc: Resetting the canvas state resets the current clip region + code: | + canvas.width = 100; + ctx.rect(0, 0, 1, 1); + ctx.clip(); + canvas.width = 100; + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 20,20 == 0,255,0,255; + t.done(); + +- name: 2d.canvas.host.initial.reset.transform + desc: Resetting the canvas state resets the current transformation matrix + code: | + canvas.width = 100; + ctx.scale(0.1, 0.1); + canvas.width = 100; + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 20,20 == 0,255,0,255; + t.done(); + +- name: 2d.canvas.host.initial.reset.gradient + desc: Resetting the canvas state does not invalidate any existing gradients + code: | + canvas.width = 50; + var g = ctx.createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#0f0'); + canvas.width = 100; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + t.done(); + +- name: 2d.canvas.host.initial.reset.pattern + desc: Resetting the canvas state does not invalidate any existing patterns + code: | + canvas.width = 30; + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 30, 50); + var p = ctx.createPattern(canvas, 'repeat-x'); + canvas.width = 100; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = p; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + t.done(); + +- name: 2d.canvas.host.size.attributes.idl.set.zero + desc: Setting width/height IDL attributes to 0 + code: | + canvas.width = 0; + canvas.height = 0; + @assert canvas.width === 0; + @assert canvas.height === 0; + t.done(); + +- name: 2d.canvas.host.size.attributes.idl + desc: Getting/setting width/height IDL attributes + webidl: + - es-unsigned-long + code: | + canvas.width = "100"; + canvas.height = "100"; + @assert canvas.width === 100; + @assert canvas.height === 100; + canvas.width = "+1.5e2"; + canvas.height = "0x96"; + @assert canvas.width === 150; + @assert canvas.height === 150; + canvas.width = 301.999; + canvas.height = 301.001; + @assert canvas.width === 301; + @assert canvas.height === 301; + @assert throws TypeError canvas.width = "400x"; + @assert throws TypeError canvas.height = "foo"; + @assert canvas.width === 301; + @assert canvas.height === 301; + t.done(); + +- name: 2d.canvas.host.size.attributes.default + desc: Default width/height when attributes are missing + code: | + @assert canvas.width === 100; + @assert canvas.height === 50; + t.done(); + +- name: 2d.canvas.host.size.attributes.reflect.setidl + desc: Setting IDL attributes updates IDL and content attributes + code: | + canvas.width = 120; + canvas.height = 60; + @assert canvas.width === 120; + @assert canvas.height === 60; + t.done(); + +- name: 2d.canvas.host.size.attributes.reflect.setidlzero + desc: Setting IDL attributes to 0 updates IDL and content attributes + code: | + canvas.width = 0; + canvas.height = 0; + @assert canvas.width === 0; + @assert canvas.height === 0; + t.done(); + +- name: 2d.canvas.host.size.large + 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" + canvas.width = n; + canvas.height = n; + @assert canvas.width === n; + @assert canvas.height === n; + t.done(); -- cgit v1.2.3